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 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default Need Different Day Page Script

    Well i need a script where the page is different for each day of the week.
    Its for our DJ Panel Timetable, and I will find it realy usefull.
    + Rep for first person to help

  2. #2
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    HTML Code:
    <script type="text/javascript">
    <!--
    
      //Sunday
      var d0 = new Array('Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John');
    
      //Monday
      var d1 = new Array('Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John');
    
      //Tuesday
      var d2 = new Array('Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John');
    
      //Wednesday
      var d3 = new Array('Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John');
    
      //Thursday
      var d4 = new Array('Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John');
    
      //Friday
      var d5 = new Array('Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John');
    
      //Saturday
      var d6 = new Array('Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John', 'Bob', 'Dave', 'Mike', 'John');
    
    var dObj = new Date()
    var day = dObj.getDay()
    eval('var times = d'+day+';');
    
    for(i=0; i<24; i++) {
      ti = i;
      if(i<10) ti = '0'+i;
      document.write(ti+':00 - '+times[i]+'<br/>');
    }
    
    -->
    </script>
    Haven't tested, but it should solve your problem.
    kinda quit.

  3. #3
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    i needed it also but now i forgot what for. thanx josh

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  4. #4
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    I Mean like a different page. Like Monday - http://url.com/monday.php
    Tuesday - http://url.com/tuesday.php

  5. #5
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by .:jack120:. View Post
    I Mean like a different page. Like Monday - http://url.com/monday.php
    Tuesday - http://url.com/tuesday.php
    The script I posted will do what you're asking for, but if you're just looking for a simple PHP script:

    PHP Code:
    <? print file_get_contents(date('D').'.txt'); ?>
    "Mon.txt" to "Sun.txt" containing your HTML for those days.
    Last edited by nets; 27-09-2006 at 07:01 PM.
    kinda quit.

  6. #6
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by joshua View Post
    The script I posted will do what you're asking for, but if you're just looking for a simple PHP script:

    PHP Code:
    <? print file_get_contents(date('D').'.txt'); ?>
    "Mon.txt" to "Sun.txt" containing your HTML for those days.
    where do I put that, and does it have to be txt ?

  7. #7
    Join Date
    Jul 2005
    Location
    Birmingham
    Posts
    330
    Tokens
    0

    Default

    Quote Originally Posted by .:jack120:. View Post
    where do I put that, and does it have to be txt ?
    PHP Code:
    <? print file_get_contents(date('D').'.FILE-EXTENSION'); ?>
    Just change the 'FILE-EXTENSION' to what ext you want it to be




  8. #8
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    can some 1 post the full script, where all i have to do is put in the URL plz

  9. #9
    Join Date
    Jul 2005
    Location
    Birmingham
    Posts
    330
    Tokens
    0

    Default

    Quote Originally Posted by .:jack120:. View Post
    can some 1 post the full script, where all i have to do is put in the URL plz
    It's been posted by joshuar-




  10. #10
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Skacrazy View Post
    It's been posted by joshuar-
    so that i can add the urls, it keeps coming up with times

Page 1 of 2 12 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
  •