View Full Version : Site Help
Luno1599
18-11-2007, 02:58 PM
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
$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
}
?>
Hope this made sence
Dan
Jamesy
18-11-2007, 03:01 PM
You mean when you change something the site is closed and you are redirected?
Luno1599
18-11-2007, 03:03 PM
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
<?php
$site_status = "open";
$closed_reason = "
- Site update<br>
- New pages
";
$open_date = "November 20, 2007";
if( $site != "open" )
{
header("Location: maintance.php");
} else
{
?>
?
Luno1599
18-11-2007, 03:27 PM
<?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
lolwut
18-11-2007, 03:51 PM
Changed a little so I can read easier.
<?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.
Luno1599
18-11-2007, 04:01 PM
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
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.