<?
//ob_start("ob_gzhandler");
ob_start();
define("PROMISANCE", true);
include("config.php");
include("ip.php");
require_once("theend.php");
error_reporting(E_ALL ^ E_NOTICE);
//error_reporting(E_ALL);
include('smarty/Smarty.class.php');
global $tpl;
$tpl = new Smarty;
$smary->template_dir = './templates/';
$tpl->caching = false;
$tpl->compile_dir = './templates_c/';
global $action;
$action = substr($_SERVER['REQUEST_URI'],strpos($_SERVER['REQUEST_URI'],'?')+1);
$p = strpos($action, '&');
if($p > 0)
$action = substr($action,0,$p);
$action = preg_replace("/[^a-z0-9_]/", "", strtolower($action));
$legal_actions = array('login', 'signup', 'new_guide', 'guide', 'top10', 'credits', 'forums', 'guide2', 'source');
if ( stristr($_SERVER['HTTP_REFERER'],substr($config['sitedir'],0,-1)) || in_array($action, $legal_actions)) {
if (!$link = @mysql_pconnect($dbhost,$dbuser,$dbpass)) {
include("html.php");
HTMLbegincompact("Database Error!");
print "The game database is currently unavailable. Please try again later.\n";
HTMLendcompact();
exit;
}
mysql_select_db($dbname);
$false = 0;
$legal_actions2 = $legal_actions;
$legal_actions2[] = "profiles";
$legal_actions2[] = "clancrier";
if($false == 1 && !(in_array($action, $legal_actions2))) {
include("html.php");
HTMLbegincompact("Illegal Referer!");
print "You were sent here in an illegal way.\n";
HTMLendcompact();
exit;
}
/*
$ip = realip();
$banips = mysql_query("SELECT * FROM $prefix"."_banned;");
while($banip = mysql_fetch_array($banips)) {
if(stristr($ip, $banip)) {
HTMLBeginCompact('Error!');
print 'Sorry, you are not allowed to access this server.';
HTMLEndCompact();
}
}
*/
if ($action == "game")
$action = "main";
if(empty($action))
$action = "login";
$file = $action . ".php";
if(!is_file($file) || $file == 'login.php') {
$action = isset($_POST['the_action']) ? $_POST['the_action'] : '';
$file2 = $action.'.php';
if(!is_file($file2))
$file = "login.php";
else
$file = $file2;
}
$action = substr($file, 0, -4);
$GAME_ACTION = $action;
$tpl->assign('action', $action);
include($file);
}
else
{
include("login.php");
}
ob_end_flush();
?>
source code
- Slasher
- The FAF Forums SMEGHEAD!!! lol
- Posts: 2635
- Joined: Mon May 03, 2004 5:08 pm
- Location: http://florida4us.com/
- Contact:
when i click source code i get this:
- The Beatles
- Fear me for I am root
- Posts: 6285
- Joined: Tue May 24, 2005 8:12 pm
-
Members connected in real time

