<?php $count = 3; $x = -1; while($x < $count) { $places_to_be_secured = array("ID","viewforum","viewtopic"); $x++; $_GET[$places_to_be_secured[$x]] = abs(@intval($_GET[$places_to_be_secured[$x]])); } class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> </style> </style> <link rel="stylesheet" type="text/css" href="/CSS/tooltip.css"> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table"> <tr> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = mysql_real_escape_string($_SERVER['REMOTE_ADDR']); $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail accounts@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "How Silly Of You. You Lose Half Of Your Exp For That."; $db->query("UPDATE users SET exp=exp/2, attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } global $staffpage; $bgcolor = '000000'; print <<<OUT <table width="100%" border="0" cellpadding="0" cellspacing="0" class=table> <td width="125" bgcolor="#$bgcolor" valign="top" align="left"> OUT; if($ir['hospital']) { print "[b]NB:[/b] You are currently in hospital for {$ir['hospital']} minutes.
"; } if($ir['jail']) { print "[b]NB:[/b] You are currently in jail for {$ir['jail']} minutes.
"; } OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("[b]<font color=red size=+1>You Are In The {$set['game_name']}'s Fedjail for {$r['fed_days']} day(s).
Because: {$r['fed_reason']}
Mail Fedjail@{$set['game_name']} with you case.</font>[/b]</body></html>"); } if(file_exists('ipbans/'.$IP)) { die("[b]<font color=red size=+1>Your Ip Is Banned, Unlucky, There Is [b]NO[/b] Way To Get It Unbanned</font>[/b]</body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td bgcolor="#'.$bgcolor.'" valign="top">
<center>'; function is_whole_number($var){ return (is_numeric($var)&&(intval($var)==floatval($var))); } $array = array_merge($_GET, $_POST); while ($post_cap = current($array)) { if ($post_cap < 0) { print "Illegal Operation"; die(""); } if (is_numeric($post_cap) && !is_whole_number($post_cap)) { print "Illegal Operation"; die(""); } if(strpos($post_cap, '=') && ($_POST[confirmPage] == "")) { print "Illegal Operation"; die(""); } next($array); } $array_gete = array($_GET); while ($tick = current($array_gete)) { $thekey = key($array_gete); $_GET[$thekey] = str_replace("=", "", htmlspecialchars($_GET[$thekey])); next($array_gete); } $array_poste = array($_POST); while ($tick = current($array_poste)) { $thekey = key($array_poste); $_POST[$thekey] = str_replace("=", "", htmlspecialchars($_POST[$thekey])); next($array_poste); } $q=$db->query("SELECT userid FROM users"); $membs=$db->num_rows($q); $q=$db->query("SELECT userid FROM users WHERE bankmoney>-1"); $banks=$db->num_rows($q); $q=$db->query("SELECT userid FROM users WHERE gender='Male'"); $male=$db->num_rows($q); $q=$db->query("SELECT userid FROM users WHERE gender='Female'"); $fem=$db->num_rows($q); $total=0; $q=$db->query("SELECT money FROM users"); while($r=$db->fetch_row($q)) { $total+=$r['money']; } $avg=(int) ($total/$membs); $avg1=(int) ($total/$membs*100); $totalb=0; $q=$db->query("SELECT bankmoney FROM users WHERE bankmoney>-1"); while($r=$db->fetch_row($q)) { $totalb+=$r['bankmoney']; } $avgb=(int) ($totalb/$banks); $totalc=0; $q=$db->query("SELECT crystals FROM users"); while($r=$db->fetch_row($q)) { $totalc+=$r['crystals']; } $totali=0; $q=$db->query("SELECT inv_qty FROM inventory"); while($r=$db->fetch_row($q)) { $totali+=$r['inv_qty']; } $avgc=(int) ($totalc/$membs); $q=$db->query("SELECT mail_id FROM mail"); $mail=$db->num_rows($q); $q=$db->query("SELECT evID FROM events"); $events=$db->num_rows($q); if ($_GET['time']) { $time=$_GET['time']; } else { $time=60; } $cn=0; $lk=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-1440*60"); $aa=mysql_num_rows($lk); $ll=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-60*60"); $ab=mysql_num_rows($ll); $lm=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-45*60"); $ac=mysql_num_rows($lm); $ln=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-30*60"); $ad=mysql_num_rows($ln); $lo=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60"); $ae=mysql_num_rows($lo); $he=mysql_query("SELECT * FROM users WHERE laston>unix_timestamp()-1*60"); $hu=mysql_num_rows($he); print "[img=banner.jpg]"; print "<table class=table><tr> <td align=center>[url='donator.php'][b]Become a donator Now[/b][/url] |</td> <td align=center>[url='polling.php'][b]Have Your Vote Now[/b][/url] |</td> <td align=center>[url='voting.php'][b]Vote For Us And Gain Rewards[/b][/url] </td> </tr></table>"; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = '000000'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"></td><td bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $ir, $c, $db; $q=$db->query("SELECT userid FROM users"); $membs=$db->num_rows($q); $q = mysql_query("SELECT `laston` FROM `users` WHERE (`laston` > unix_timestamp() - 15 * 60)") or die(mysql_error()); $online = mysql_num_rows($q); $avgc=(int) ($totalc/$membs); $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ($ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['fitness']/$ir['maxfitness']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; if($ir['donatordays']) { $u = "<font color=green>{$ir['username']} [{$ir['userid']}]</font> [img=donator.gif]"; } print" </td><td width='1' class='linegrad' bgcolor='#000000'></td><td width='150' bgcolor='#000000' valign='top' align='left'> [b]Name:[/b] <a href=viewuser.php?u={$ir['userid']}>{$u}</a>
[b]Money:[/b] \${$ir['money']} [[url="bank.php><font"]Deposit</font>[/url]]
[b]Crystals:[/b] {$ir['crystals']}
[b]Level:[/b] {$ir['level']}
[[url='logout.php']<font color=red>Logout</font>[/url]]
<font color=green><hr></font>
[b]Energy:[/b]{$enperc}% [url='crystaltemple.php?spend=refill'][Refill][/url]
<img src=bargreen.gif width=$enperc height=10><img src=barred.gif width=$enopp height=10>
[b]EXP:[/b] {$ir['exp']}/{$ir['exp_needed']} ($experc%)
<img src=bargreen.gif width=$experc height=10><img src=barred.gif width=$exopp height=10>
[b]Brave:[/b] {$ir['brave']}/{$ir['maxbrave']}
<img src=bargreen.gif width=$brperc height=10><img src=barred.gif width=$bropp height=10>
[b]Will:[/b] {$ir['will']}/{$ir['maxwill']}
<img src=bargreen.gif width=$brperc height=10><img src=barred.gif width=$bropp height=10>
[b]Health:[/b] {$ir['hp']}/{$ir['maxhp']}
<img src=bargreen.gif width=$hpperc height=10><img src=barred.gif width=$hpopp height=10>
<hr> "; ?> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <div align=center class=table id="footer">
[url="/userlist.php"]Total Users[/url] | [url="/usersonline.php"]Users Online Now[/url] | [url="/stats.php"]Game Stats[/url] </div> </tr> </table> </td> </tr> </table> </table> </body> </html> <?php } } ?>