Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24
  1. #11
    Join Date
    Sep 2006
    Location
    Hobart, Australia
    Posts
    593
    Tokens
    0

    Default

    Quote Originally Posted by Invent View Post
    Timetables are quite easy to code :S

    I made mine in like 10 Minutes. Including the AJAX controls. (Changing days, etc).
    Ah yes, but you'd have seperate pages for each day? I didn't do that, I have it all in a table, so it was all hard coded.

  2. #12
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Ah yes, but you'd have seperate pages for each day? I didn't do that, I have it all in a table, so it was all hard coded.
    No...it was all done using one page...?

  3. #13
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    Made one for out panel so this isnt needed any more.

  4. #14
    Join Date
    Sep 2006
    Location
    Hobart, Australia
    Posts
    593
    Tokens
    0

    Default

    Quote Originally Posted by Invent View Post
    No...it was all done using one page...?
    I repeat, in table form? I'm not talking about booking/unbooking slots, I'm talking about echoing the details of the slot to the end user. If you managed to do this in table form in like ten minutes, I'd be interested in knowing how

  5. #15
    Join Date
    Jul 2005
    Location
    North Wales
    Posts
    4,233
    Tokens
    2,009

    Latest Awards:

    Default

    Quote Originally Posted by benzoenator View Post
    I repeat, in table form? I'm not talking about booking/unbooking slots, I'm talking about echoing the details of the slot to the end user. If you managed to do this in table form in like ten minutes, I'd be interested in knowing how
    ***? how is echoing somthing in a table hard?

  6. #16
    Join Date
    Oct 2007
    Location
    Luton, England
    Posts
    1,548
    Tokens
    388
    Habbo
    DeejayMachoo

    Latest Awards:

    Default

    Quote Originally Posted by redtom View Post
    ***? how is echoing somthing in a table hard?
    PHP Code:
    <?
    $table 
    mysql_query("SELECT * from timetable WHERE id='1'");
    $table mysql_fetch_array($table);
    if (
    $table[monday00] == '') {
    echo(
    "&nbsp;");
    } else {
    echo(
    "$table[monday00]");
    ?>
    ?>


  7. #17
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    PHP Code:
    <?php

    include("../../includes/config.php");
    include(
    "../../includes/functions.php");

    function 
    clean($var)
    {
        
        
    $var htmlspecialchars$varENT_QUOTES );

        if( 
    get_magic_quotes_gpc(   ) ) {

            
    $var stripslashes$var );
                    
        }
                
        
    $var str_replace"\""""$var );
        
    $var htmlentities$var );
        
    $var mysql_real_escape_string$var );
        
        return 
    $var;

    }

    if(
    $_GET['day'] && !$_GET['action'] && !$_GET['slot']) {
    ?>
    <style type="text/css">
    <!--
    td, a, a:link, a:active, input, select, textarea
    {
        font-size: 12px;
        font-family: Trebuchet MS;
        color: #6d6d6d;
        text-decoration: none;
    }
    -->
    </style>
    <br><div style="color: #999999; text-align: center">You are currently viewing <strong><div style="text-transform: uppercase"><? echo(""clean($_GET['day'] .""); ?></div></strong></div><br />
    <table width="200" align="center" cellpadding="0" cellspacing="0" style="border: solid 1px #EEEEEE">
      <tr>
        <td width="73" align="center"><div align="center"><strong>Time</strong></div></td>
        <td width="111" align="center"><div align="center"><strong>Options</strong></div></td>
      </tr>
      <tr>
        <td align="center">00:00</td>
        <td align="center">
        <?php
        
        $time 
    "00:00";


    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
        </tr>
      <tr>
        <td align="center">01:00</td>
        <td align="center">    <?php
        
        $time 
    "01:00";

        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>

      <tr>
        <td align="center">02:00</td>
        <td align="center">    <?php
        
        $time 
    "02:00";

        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">03:00</td>
        <td align="center">    <?php
        
        
    $time 
    "03:00";
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">04:00</td>
        <td align="center">    <?php
        
        $time 
    "04:00";
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">05:00</td>
        <td align="center">    <?php
        
        $time 
    "05:00";

    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">06:00</td>
        <td align="center">    <?php
        
        $time 
    "06:00";

        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">07:00</td>
        <td align="center"><?php
        
        $time 
    "07:00";

        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">08:00</td>
        <td align="center">    <?php
        
    $time 
    "08:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">09:00</td>
        <td align="center">    <?php
        
        $time 
    "09:00";

    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">10:00</td>
        <td align="center"><?php
        
        $time 
    "10:00";

    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">11:00</td>
        <td align="center"><?php
        
        $time 
    "11:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">12:00</td>
        <td align="center"><?php
        
        $time 
    "12:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
    ?></td>
      </tr>
      
      <tr>
        <td align="center">13:00</td>
        <td align="center"><?php
        
        $time 
    "13:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
    <tr>
      <td align="center">14:00</td>
      <td align="center"><?php
        
        $time 
    "14:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">15:00</td>
        <td align="center"><?php
        
        $time 
    "15:00";
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      
      <tr>
        <td align="center">16:00</td>
        <td align="center"><?php
        
        $time 
    "16:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");

    }

        
        
    ?></td>
      </tr>
    <tr>
      <td align="center">17:00</td>
      <td align="center"><?php
        
        $time 
    "17:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">18:00</td>
        <td align="center"><?php
        
        $time 
    "18:00";
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">19:00</td>
        <td align="center"><?php
        
        $time 
    "19:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
    ?></td>
      </tr>
      <tr>
        <td align="center">20:00</td>
        <td align="center"><?php
        
        $time 
    "20:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">21:00</td>
        <td align="center"><?php
        
        $time 
    "21:00";
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">22:00</td>
        <td align="center"><?php
        
        $time 
    "22:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
      <tr>
        <td align="center">23:00</td>
        <td align="center"><?php
        
        $time 
    "23:00";
        
    $grabs mysql_fetch_array(mysql_query("SELECT * FROM time"clean($_GET['day']) ." WHERE time = '$time'"));

    if(
    $grabs["slot"] == "") {
    echo(
    "No DJ");
    }
    else {
    echo(
    "<strong><span id=\"forum2\"><a href=\"../djprofile.php?name="$grabs["slot"] ."\" target=\"_self\">DJ "$grabs["slot"] ."</a></span></strong>");
    }

        
        
    ?></td>
      </tr>
    </table>
    <?
    die;
    }


    ?>
    <html>
    <head>
    <title>DJ Profile</title>
    <script type="text/javascript" src="../../includes/prototype.js"></script>
    <script type="text/javascript" src="../../includes/scriptaculous.js"></script>
    <script type="text/javascript" language="javascript">
    var xmlHttp

    function GetXmlHttpObject(){
        var objXMLHttp=null
        if (window.XMLHttpRequest){
            objXMLHttp=new XMLHttpRequest()
        }else if (window.ActiveXObject){
            objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
        }
        return objXMLHttp
    }

    function GetSlots(day){
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null){
    alert ("Browser does not support HTTP Request")
    return
    }

    var url="index.php?day="+day
    xmlHttp.open("GET",url,true)
    xmlHttp.onreadystatechange = function () {
    if (xmlHttp.readyState == 4) {
    document.getElementById("timetable").innerHTML = xmlHttp.responseText;
    }
    };
    xmlHttp.send(null);
    }

    ////////////>
    </script>
    <link href="../../css/inside.css" rel="stylesheet" type="text/css" />
    </head>
    <body style="margin: 10px;">
            <div id="content_title">
            Timetable
            </div>
            <div id="content" style="text-align: center">
            <br />
            <a onClick="GetSlots('monday')" style="cursor: pointer">Monday</a> | <a onClick="GetSlots('tuesday')" style="cursor: pointer">Tuesday</a> | <a onClick="GetSlots('wednesday')" style="cursor: pointer">Wednesday</a> | <a onClick="GetSlots('thursday')" style="cursor: pointer">Thursday</a> | <a onClick="GetSlots('friday')" style="cursor: pointer">Friday</a> | <a onClick="GetSlots('saturday')" style="cursor: pointer">Saturday</a> | <a onClick="GetSlots('sunday')" style="cursor: pointer">Sunday</a>
    <div id="timetable" style="text-align: center"></div>    
            </div>
    </body>
    </html>
    I coded that a while back, it can be done MUCH more efficiently using arrays.
    Last edited by Invent; 31-10-2007 at 05:35 PM.

  8. #18
    Join Date
    Apr 2006
    Location
    Leamington Spa
    Posts
    1,375
    Tokens
    72

    Latest Awards:

    Default

    Yoink.
    i've been here for over 8 years and i don't know why

  9. #19
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    Yoink.
    Use it if you want. Just say I made it

  10. #20
    Join Date
    Apr 2006
    Location
    Leamington Spa
    Posts
    1,375
    Tokens
    72

    Latest Awards:

    Default

    I didn't mean it, I've just quoting Yoink all day.
    Matt coded one already. Which suits us better(/is better). Thanks anyway.
    Last edited by lolwut; 31-10-2007 at 05:43 PM.
    i've been here for over 8 years and i don't know why

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •