FF OFFLINE
Offline wegens database fout!
ENDHTML; exit; } error_reporting ( 0 ); session_start(); include("_include-funcs.php"); if(isset($_SESSION['login'])) { $dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']}'"); $data = mysql_fetch_object($dbres); if($data->ip == '') { $IP = $_SERVER['REMOTE_ADDR']; mysql_query("UPDATE `[users]` SET `IP`='$IP' WHERE `login`='$data->login'"); } } foreach($_POST as $key => $value) { if(gettype($_POST[$key]) == "array") foreach($_POST[$key] as $key2 => $value2) $_POST[$key][$key2] = addslashes($_POST[$key][$key2]); else $_POST[$key] = addslashes($_POST[$key]); } foreach($_GET as $key => $value) { if(gettype($_GET[$key]) == "array") foreach($_GET[$key] as $key2 => $value2) $_GET[$key][$key2] = addslashes($_GET[$key][$key2]); else $_GET[$key] = addslashes($_GET[$key]); } foreach($_COOKIE as $key => $value) { if(gettype($_COOKIE[$key]) == "array") foreach($_COOKIE[$key] as $key2 => $value2) $_COOKIE[$key][$key2] = addslashes($_COOKIE[$key][$key2]); else $_COOKIE[$key] = addslashes($_COOKIE[$key]); } $clientIP = $_SERVER['REMOTE_ADDR']; $forwardedFor = ($_SERVER['HTTP_X_FORWARDED_FOR'] != "") ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['HTTP_CLIENT_IP']; $forwardedFor = preg_replace('/, .+/','',$forwardedFor); $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `level`='-1' AND `login`='{$data->login}'"); if(isset($UPDATE_DB)) { $dbres = mysql_query("SELECT UNIX_TIMESTAMP(`time`) AS `time`,`name` FROM `[cron]`"); while($x = mysql_fetch_object($dbres)) $update[$x->name] = $x->time; if(floor($update['hour']/3600) != floor(time()/3600)) { $dbres = mysql_query("SELECT GET_LOCK('hour_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='hour'"); include("_cron_hour.php"); mysql_query("SELECT RELEASE_LOCK('hour_update')"); } } if(floor($update['day']/86400) != floor(time()/86400)) { $dbres = mysql_query("SELECT GET_LOCK('day_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='day'"); include("_cron_day.php"); mysql_query("SELECT RELEASE_LOCK('day_update')"); } } if(floor($update['week']/604800) != floor(time()/604800)) { $dbres = mysql_query("SELECT GET_LOCK('week_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='week'"); include("_cron_week.php"); mysql_query("SELECT RELEASE_LOCK('week_update')"); } } if(date('n',$update['month']) != date('n',time())) { $dbres = mysql_query("SELECT GET_LOCK('month_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='month'"); include("_cron_month.php"); mysql_query("SELECT RELEASE_LOCK('month_update')"); } } if((date('G',time()) >= 16 && date('z',time()) != date('z',$update['horserace'])) || (date('G',time()) >= 21 && date('G',$update['horserace']) < 21)) { $dbres = mysql_query("SELECT GET_LOCK('horserace_update',0)"); if(mysql_result($dbres,0) == 1) { $cron_pass = "secretcronpassword"; mysql_query("UPDATE `[cron]` SET `time`=NOW() WHERE `name`='horserace'"); include("_cron_horserace.php"); mysql_query("SELECT RELEASE_LOCK('horserace_update')"); } } } mysql_query("UPDATE `[users]` SET `online2`='ja' WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300"); mysql_query("UPDATE `[users]` SET `online2`='nee' WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) >= 300"); $dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`signup`) AS `signup`,UNIX_TIMESTAMP(`online`) AS `online` FROM `[users]` WHERE `login`='{$_SESSION['login']}'"); $data = mysql_fetch_object($dbres); if($data->rankvord >= 100 && $data->rank <16) { $rank = array("Bacterië","Deliveryboy","Picciotto","Shoplifter","Pickpocket","Thief","Associate","Mobster","Soldier","Swindler","Assassin","Local Chief","Chief","Bruglione","Godfather","Legendary Godfather"); $rank = $rank[$data->rank]; mysql_query("UPDATE `[users]` SET `rank`=`rank`+'1',`rankvord`=`rankvord`-'100' WHERE `login`='".$data->login."'"); mysql_query("INSERT INTO `[messages]`(`time`,`from`,`to`,`subject`,`message`) VALUES(NOW(),'**Note**','".$data->login."','Gepromoveerd','Je bent gepromoveerd tot ".$rank.".')"); } if($data->rijbewijsmissie == 10 && $data->rijbewijsauto > 4){ mysql_query("UPDATE `tunegarage` SET `banden`=`banden`+'$rand1',`motor`=`motor`+'$rand8',`interieur`=`interieur`+'$rand2',`uitlaat`=`uitlaat`+'$rand3',`remmen`=`remmen`+'$rand4',`body`=`body`+'$rand5',`velgen`=`velgen`+'$rand6',`nitro`=`nitro`+'$rand7' WHERE `eigenaar`='{$data->login}' AND `rijbewijs`='1'"); mysql_query("UPDATE `[users]` SET `rijbewijsmissie`='11' WHERE `login`='{$data->login}'"); mysql_query("INSERT INTO `[messages]`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Streetgun staf','{$data->login}','Rijbewijs','
Gefeliciteert
U heeft het rijbewijs gehaalt
U getunde auto heeft
{$rand1} banden levels
{$rand8} Motor levels
{$rand2} Interieur levels
{$rand3} Uitlaat levels
{$rand4} Remmen levels
{$rand5} Body levels
{$rand6} Velgen levels
{$rand7} Nitro levels gekregen!

We feliciteren u namens de Staff
')"); } $gelderaf = $data->werknemers*50+$data->bewakers*50; if($data->fabrieksgeld < $gelderaf AND $data->staking == 0 AND $data->nietstaken == 0){ mysql_query("UPDATE `[users]` SET `staking`='3' WHERE `login`='{$data->login}'"); mysql_query("UPDATE `[users]` SET `fabrieksgeld`='0' WHERE `login`='{$data->login}'"); mysql_query("INSERT INTO `[messages]`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Je werknemers','{$data->login}','Staking','We zijn voor 3 dagen gaan steken, omdat u niet genoeg geld heeft om ons te betalen. ')"); } if($data->dagenwerken == 1){ mysql_query("UPDATE `[users]` SET `werklevel`=`werklevel`+1 WHERE `login`='{$data->login}'"); mysql_query("UPDATE `[users]` SET `baan`='0' WHERE `login`='{$data->login}'"); mysql_query("INSERT INTO `[messages]`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Je baas','{$data->login}','Je bent gepromoveerd','Gefeliciteerd, je hebt het 5 dagen volgehouden. Je werklevel is met 1 gestegen!')"); mysql_query("UPDATE `[users]` SET `dagenwerken`='0' WHERE `login`='{$data->login}'"); } $dbres = mysql_query("SELECT `id` FROM `rechtbankusers` WHERE `leven`<'1' AND `login`='{$data->login}'"); if(mysql_num_rows($dbres) == 1) { echo 'Je bent in de rechtbank gezet en vermoord, nu kan je niet meer spelen'; exit; } mysql_query("UPDATE `[users]` SET `cash`='0' WHERE `cash`<'0'"); mysql_query("UPDATE `[users]` SET `bank`='0' WHERE `bank`<'0'"); # $select = mysql_query("SELECT * FROM `instellingen`"); # $page = mysql_fetch_object($select); /* ------------------------- */ ?>