I have a big code here that i want simplified and stuck into one big code. When i did it, it wasn't showing my layout So, heres the code.
PHP:
<?
ob_start();
include("config.php");
if(!$logged[username] && $setting[status] == Offline){ // Checks to see if the person is logged in and if the status is offline
exit("$setting[reason]");
}elseif($logged[username] && $setting[status] == Offline && $setting[immunity] == 1){ // If they ARE logged in and the status is offline and the immunity is on, we check their level.
if($logged[username] && $logged[level] != $setting[immune_lvl]){ // If their level does NOT equal the immune level, we exit.
exit("$setting[reason]");
}else{ // If the person is immune, we show them the site :D
}
}elseif($setting[status] == Offline && $setting[immunity] == 0){ // If the status equals offline AND the immunity feature is off, we exit.
exit("$setting[reason]");
}elseif($setting[status] == Online){ // If the status is online, we show them the site :D
}
if ($logged[username])
{
echo("");
}
else
{
echo("<meta http-equiv=\"Refresh\" content=\"0; URL=http://hrwp.hrwp.exofire.net/\"/>");
}
?>
<?
ob_start();
include("config.php");
if ($logged[level] == 2)
{
echo("<meta http-equiv=\"Refresh\" content=\"0; URL=http://hrwp.hrwp.exofire.net/\"/>");
}
else
{
echo("");
}
?>
<?php
ob_start();
include("config.php");
if ($logged[banned] == banned)
{
echo "<meta http-equiv=\"Refresh\" content=\"0; URL=http://hrwp.hrwp.exofire.net/banned.php\"/>";
}else{
echo "";
}
?>