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!


Results 1 to 7 of 7

Thread: Site Help

  1. #1
    Join Date
    Jun 2007
    Location
    England
    Posts
    495
    Tokens
    0

    Default Site Help

    Hey

    I have this at the top of my index page but i need to edit it so when its != to open if in the browser i put ?view=yes it will bypass the go to a new page and let me view the index page. How do i do this?

    PHP Code:
    <?php
    $site 
    "open";
    $reasion "
    - Site update<br>
    - New pages
    "
    ;
    $back "November 20, 2007";
    if(
    $site != "open"){
    include(
    "maintance.php");
    }else{
    ?>
    and this at the end
    PHP Code:
    <?php
    }
    ?>
    Hope this made sence
    Dan


  2. #2
    Join Date
    Nov 2006
    Location
    Narrich
    Posts
    5,687
    Tokens
    0
    Habbo
    Jamesy...

    Latest Awards:

    Default

    You mean when you change something the site is closed and you are redirected?
    Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/

  3. #3
    Join Date
    Jun 2007
    Location
    England
    Posts
    495
    Tokens
    0

    Default

    No say $site = closed

    it would send you to the maintance page but in the browser say the site was closed but you put ?view=yes it wouldnt go to the maintance page it would just view the index page
    Last edited by Luno1599; 18-11-2007 at 03:04 PM.


  4. #4
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    PHP Code:
    <?php
    $site_status 
    "open";

    $closed_reason "
    - Site update<br>
    - New pages
    "
    ;

    $open_date "November 20, 2007";

    if( 
    $site != "open" )
    {
    header("Location: maintance.php");
    } else
    {
    ?>
    ?

  5. #5
    Join Date
    Jun 2007
    Location
    England
    Posts
    495
    Tokens
    0

    Default

    Quote Originally Posted by Blob View Post
    PHP Code:
    <?php
    $site_status 
    "open";
     
    $closed_reason "
    - Site update<br>
    - New pages
    "
    ;
     
    $open_date "November 20, 2007";
     
    if( 
    $site != "open" )
    {
    header("Location: maintance.php");
    } else
    {
    ?>
    ?
    no the script i posted works... what i am trying to do is becasue its my site if i change that so the site is offline it will go to that page but say i updated the index page and wanted to see it.. i could just typein index.php?view=yes and i can see the index page even thought the page is still set to offline


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

    Latest Awards:

    Default

    Changed a little so I can read easier.

    PHP Code:
    <?php

    if($_GET['view'] != "yes"){

        
    $site "closed";

        
    $reason "because I'm immense.";

        
    $back "NOT VERY SOON SOZ";

        if(
    $site == "closed"){

            include(
    "maintenance.php");

        }elseif(
    $site == "open"){

            include(
    "site.php");

        }

    }else{

        include(
    "site.php");

    }

    ?>

    If you go to page.php?view=yes, it'll show the site, otherwise it'll be like "OMG NO SOZ!!" and take them to the maintenance page.
    Last edited by lolwut; 18-11-2007 at 03:55 PM.
    i've been here for over 8 years and i don't know why

  7. #7
    Join Date
    Jun 2007
    Location
    England
    Posts
    495
    Tokens
    0

    Default

    Quote Originally Posted by Waterfall View Post
    Changed a little so I can read easier.

    If you go to page.php?view=yes, it'll show the site, otherwise it'll be like "OMG NO SOZ!!" and take them to the maintenance page.
    Yes thats it, thanks alot =D


Posting Permissions

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