/* Author: Emiel Suilen Blitz-site 03-01-2008, 22:00 */ include ("config_data.php"); // All my Database stuff is stored here. Really should be first include ("database.php"); //All my database functions are stored here include ("actions.php"); //All my actions are stored here. include ("results.php"); //All my results actions, (SQL transactions) are stored here $DB = new database(MySQLServer, MySQLUser, MySQLPass, MySQLDB); $results= new results(); include("../cuip/cuip.php"); $cuip = new cuip(); include("../dsad/dsad.php"); $dsad = new dsad('cuip'); $ads = $dsad->showAd('images', 120, 600); $user = $cuip->checkCookies(); $userID = $user['id']; if($_GET['do'] == 'login') { if(empty($_POST['userid'])) { $userID = $cuip->checkUserName($_POST['username']); } else{ $userID = $_POST['userid']; } $userWithCookie = $cuip->checkLogin($userID, $_POST['password']); $user['cuip_hash'] = $userWithCookie['cuip_hash']; $userID = $userWithCookie['userID']; } $user = $cuip->secondUserCheck($user); if($user['id'] == -1) { $user['id'] = $userID; $user = $cuip->weakUserCheck($user); } if($user['cuip_hash'] == NULL && ($user['admin'] || $user['crew'])) { $user['login'] = true; $user['admin'] = false; } else if ($user['admin'] || $user['crew']) { $admin = true; } $publicMods = $results->getPublicMods(); $ip = $_SERVER['REMOTE_ADDR']; $ip = sprintf("%u", ip2long($ip)); if (!empty($_GET['lan'])) { $language = strtolower($_GET['lan']); } else{ $language = $results->checkCountry($ip); } if (!empty($_GET['mod'])) { $mod = strtolower($_GET['mod']); foreach ($publicMods as $publicMod) { if ($publicMod['mod']==$mod && $publicMod['public']!=1 && $admin != 'true') { $mod = DEFAULT_MOD; } } } else { $mod = DEFAULT_MOD; } if (!empty($_GET['action'])) { $action = ($_GET['action']); if(!$admin) { if($action == 'post_news') { $action = DEFAULT_PAGE; } } } else if($mod=='manual' /*&& empty($_GET['action'])*/ ) { $mod = 'blitz2'; $action = 'manual'; } else { $action = DEFAULT_PAGE; } include ('../counter.php'); $counter = new counter($mod); unset($counter); unset($DB); unset($results); $DB = new database(MySQLServer, MySQLUser, MySQLPass, MySQLDB); $results= new results(); $modData = $results->getModData($mod, $language); /*************************** * Start Actual HTML Output * ***************************/ $actions = new actions(); //print header printf("