$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 = "";*/ $tpl = new phemplate(); $tpl->set_file("main", $base_folder."templates/main.htm"); $tpl->set_var("website_title", $website_title); $tpl->set_var("charset", $charset); $tpl->set_var("mainscript", $mainscript); $tpl->set_var("monthlyscript", $monthlyscript); $tpl->set_var("version", $version); $tpl->set_var("update", $update); $tpl->set_var("base", $base_folder); $tpl->set_var("content", $content); echo $tpl->process("", "main", 1); $mtime2 = explode(" ", microtime()); $endtime = $mtime2[1] + $mtime2[0]; $totaltime = ($endtime - $starttime); $totaltime = number_format($totaltime, 3); echo "


Page generated in $totaltime seconds
"; ?>
index.php 1.0.0