/*
* Copyright (c) 2003, Tomas Stucinskas a.k.a Baboon
* All rights reserved.
*
* Redistribution and use with or without modification, are
* permitted provided that the following conditions are met:
*
* Redistributions must retain the above copyright notice.
* File licence.txt must not be removed from the package.
*
* Author : Tomas Stucinskas a.k.a Baboon
* E-mail : baboon@ai-hq.com
*/
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$mtime1 = explode(" ", microtime());
$starttime = $mtime1[1] + $mtime1[0];
$base_folder = "";
$mainscript = $_SERVER['PHP_SELF']."?";
$monthlyscript = "monthlystats/index.php?";
$content = "";
$rowclass1 = "tablerow1";
$rowclass2 = "tablerow2";
$selectedasc = "selectedasc";
$selecteddesc = "selecteddesc";
$unselected = "unselected";
require $base_folder."config.php";
require $base_folder."common.php";
require $base_folder."weapons.php";
require $base_folder."gametypes.php";
require $base_folder."rating.php";
require $base_folder."functions.php";
if($HTTP_POST_VARS) foreach($HTTP_POST_VARS as $Key=>$Value) $$Key = $Value;
if($HTTP_COOKIE_VARS) foreach($HTTP_COOKIE_VARS as $Key=>$Value) $$Key = $Value;
if($HTTP_GET_VARS) foreach($HTTP_GET_VARS as $Key=>$Value) $$Key = $Value;
if($HTTP_SERVER_VARS) foreach($HTTP_SERVER_VARS as $Key=>$Value) $$Key = $Value;
if($HTTP_ENV_VARS) foreach($HTTP_ENV_VARS as $Key=>$Value) $$Key = $Value;
DBConnect();
MakeTableNames();
require $base_folder."phemplate_class.php";
if(!(@mysql_query("SELECT * FROM $awards_table"))) {
$file = "error";
$content = "Click Here to install the database.";
} else {
$files = array('install.php', 'update.php');
foreach($files as $value) {
if (file_exists($base_folder.$value)) {
$file = "error";
$errs[] = $value;
$content = "Please delete the following files before proceeding:
";
$i = 0;
foreach($errs as $value){
$i++;
if(file_exists($base_folder.$value)) {
$content .= "$i: $base_folder$value
";
}
}
}
}
}
if($content == "") {
if(!isset($action) || $action == "") $action = "start";
if(file_exists($base_folder."modules/$action.php")) {
include $base_folder."modules/$action.php";
} else {
$content = "
Error: Module '$action' does not exist
"; } } /*$fp = file("http://www.babstats.com/version/neos_version.txt"); $update = ""; $latest = trim($fp[0]); if($latest > $version) $update = "| Neos.Chronos version $fp[0] is available for download |