login}'"); /* ------------------------- */ ?> [( Criminals )] "> signup+12*60*60 > time()) { mysql_query("UPDATE `[users]` SET `signup`=FROM_UNIXTIME(UNIX_TIMESTAMP(`signup`)-12*60*60-1) WHERE `login`='{$data->login}'"); $dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`cash`,`bank`,`attack`,`defence`,`clicks`,`attlosses`,`attwins`,`deflosses`,`defwins`,`type`,`clan`,`clanlevel` FROM `[users]` WHERE `login`='{$_SESSION['login']}'"); $data = mysql_fetch_object($dbres); } if(isset($_POST['online']) && ($data->attack+$data->defence)/2+$data->clicks*5 < 10000) { $data->showonline = ($data->showonline == 1) ? 0 : 1; mysql_query("UPDATE `[users]` SET `showonline`={$data->showonline} WHERE `login`='{$data->login}'"); } $IP = $_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 `code` FROM `[logs]` WHERE `login`='{$data->login}' AND `IP`='$IP' AND `forwardedFor`='$forwardedFor' AND `area`='hqIP'"); if(mysql_num_rows($dbres) > 0) mysql_query("UPDATE `[logs]` SET `time`=NOW() WHERE `login`='{$data->login}' AND `IP`='$IP' AND `forwardedFor`='$forwardedFor' AND `area`='hqIP'"); else mysql_query("INSERT INTO `[logs]`(`time`,`IP`,`forwardedFor`,`login`,`code`,`area`) values(NOW(),'$IP','$forwardedFor','{$data->login}',0,'hqIP')"); $criminals = Array("","Junkies","Klonen","Agenten"); $criminals = $criminals[$data->type]; $power = round(($data->attack+$data->defence)/2+$data->clicks*5); $totalattacks = $data->attwins + $data->attlosses; $totaldefends = $data->defwins + $data->deflosses; $dbres = mysql_query("SELECT id FROM `[messages]` WHERE `read`=0 AND `inbox`=1 AND `to`='{$data->login}'"); $inboxnew = mysql_num_rows($dbres); $protection = round($data->signup/3600-time()/3600) + 12; print << ENDHTML; if($data->clanlevel > 0) { print << ENDHTML; } $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300"); $online = mysql_num_rows($dbres); $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 AND `showonline`=0"); $anonymous = mysql_num_rows($dbres); print << ENDHTML; /* ------------------------- */ ?>
Hoofdkwartier
http://localhost/click.php?x={$data->login}
http://localhost/click.php?clan={$data->clan}
$criminals: {$data->clicks}
Power: {$power}
Contant: \${$data->cash}
Op de bank: \${$data->bank}

U heeft $inboxnew nieuwe berichten
ENDHTML; if($protection > 0) print "
Je staat nog $protection uur onder bescherming

\n"; else print "
\n"; print <<
Gewonnen Verloren Totaal
Aanvallen {$data->attwins} {$data->attlosses} {$totalattacks}
Verdedigingen {$data->defwins} {$data->deflosses} {$totaldefends}

$online leden online (waarvan $anonymous anoniem)

ENDHTML; $showonline = ($data->showonline == 1) ? "Ik wil niet in de online-lijst" : "Zet mij weer in de online-lijst"; if(($data->defence+$data->attack)/2+$data->clicks*5 < 10000) print " \n"; $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `level` & 0x80 AND UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(`online`) < 300 ORDER BY `login`"); $adminsonline = mysql_num_rows($dbres); $sentence = ($adminsonline == 1) ? Array("is","admin") : Array("zijn","admins"); print <<
Er $sentence[0] $adminsonline $sentence[1] online