\n";
if(isset($_POST['to'])) {
if (isset($_POST['amount1'])){
if($member = mysql_fetch_object(mysql_query("SELECT `login` FROM `[users]` WHERE `login`='{$_POST['to']}'"))) {
mysql_query("UPDATE `[users]` SET `turn`=`turn`+1000 WHERE `login`='{$member->login}'");
mysql_query("UPDATE `[users]` SET `turn`=`turn`+100");
print "
U hebt 1000 turns toegevoegd bij {$_POST['to']}
\n";
}
}
if(isset($_POST['amount2'])){
if($member = mysql_fetch_object(mysql_query("SELECT `login` FROM `[users]` WHERE `login`='{$_POST['to']}'"))) {
mysql_query("UPDATE `[users]` SET `turn`=`turn`+2000 WHERE `login`='{$member->login}'");
mysql_query("UPDATE `[users]` SET `turn`=`turn`+200");
print "
U hebt 2000 turns toegevoegd bij {$_POST['to']}
\n";
}
}
if(isset($_POST['amount3'])){
if($member = mysql_fetch_object(mysql_query("SELECT `login` FROM `[users]` WHERE `login`='{$_POST['to']}'"))) {
mysql_query("UPDATE `[users]` SET `turn`=`turn`+3000 WHERE `login`='{$member->login}'");
mysql_query("UPDATE `[users]` SET `turn`=`turn`+300");
print "
\n";
if(isset($_POST['to'])) {
if(preg_match('/^[0-9]+$/',$_POST['amount'])) {
if($member = mysql_fetch_object(mysql_query("SELECT `login` FROM `[users]` WHERE `login`='{$_POST['to']}'"))) {
mysql_query("UPDATE `[users]` SET `bank`=`bank`+{$_POST['amount']} WHERE `login`='{$member->login}'");
mysql_query("UPDATE `[users]` SET `clicks`=`clicks`+{$_POST['clicks']} WHERE `login`='{$member->login}'");
mysql_query("UPDATE `[users]` SET `attack`=`attack`+{$_POST['attack']} WHERE `login`='{$member->login}'");
mysql_query("UPDATE `[users]` SET `belcredits`=`belcredits`+{$_POST['belcredits']} WHERE `login`='{$member->login}'");
mysql_query("UPDATE `[users]` SET `paying`=`paying`+{$_POST['paying']} WHERE `login`='{$member->login}'");
mysql_query("INSERT INTO `[logs]`(`time`,`IP`,`login`,`person`,`code`,`area`) values(NOW(),'{$_SERVER['REMOTE_ADDR']}','** Criminals **','{$member->login}',{$_POST['amount']},'donate')");
print "
Er is \${$_POST['amount']},- aan {$member->login} gedoneerd en ook zijn er: {$_POST['belcredits']} belcredits gedoneerd
\n";
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `activated`=1");
$members = mysql_num_rows($dbres);
$dbres = mysql_query("SELECT * FROM `[data]` WHERE `id`=1");
$dat = mysql_fetch_object($dbres);
$totalmoney =$data->bought*0.52;
print "Totaal aantal keer geld opgewaardeerd: {$dat->bought} ";
print "Totaal geldbedrag in de pot: ${$totalmoney} ";
print "Totaal aantal members: $members ";
// Geld top 5
$begin = ($_GET['p'] >= 0) ? $_GET['p']*30 : 0;
print "Rijkste vijf spelers:";
$dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY cash+bank DESC,`login` ASC LIMIT $begin,5");
$user = $_SESSION['login'];
for($j=$begin+1; $info = mysql_fetch_object($dbres); $j++)
{
// ????
$login = ($info->showonline == 0 && $data->level == 0x80 && $_GET['s'] == "online") ? "{$info->login} *" : $info->login;
// onthoud admins dikgedrukt en met *, als betreffende user dat is
$login = ($info->level & 0x80) ? "$login *" : $login;
// maak een array met typen
$type = Array("","Drugsdealer","Wetenschapper","Politie");
// onthoud betreffende type
$type = $type[$info->type];
// rond berekening van power af op gehele waarde en onthoud deze van de betreffende user
$power = round(($info->attack+$info->defence)/2);
// money is bank+cash waarde van betreffende user
$money = $info->cash+$info->bank;
// toon een rij met de kolommen: nummer, loginnaam, type, money en power van de user met nummer $j
print <<
ENDHTML;
}
// Power top 5
$begin = ($_GET['p'] >= 0) ? $_GET['p']*30 : 0;
print "Sterkste vijf spelers:";
$dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`attack`,`defence`,`clicks`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY cash+bank DESC,`login` ASC LIMIT $begin,5");
$user = $_SESSION['login'];
for($j=$begin+1; $info = mysql_fetch_object($dbres); $j++)
{
// ????
$login = ($info->showonline == 0 && $data->level == 0x80 && $_GET['s'] == "online") ? "{$info->login} *" : $info->login;
// onthoud admins dikgedrukt en met *, als betreffende user dat is
$login = ($info->level & 0x80) ? "$login *" : $login;
// maak een array met typen
$type = Array("","Gangster","F.B.I","Pooier");
// onthoud betreffende type
$type = $type[$info->type];
// rond berekening van power af op gehele waarde en onthoud deze van de betreffende user
$power = round(($info->attack+$info->defence)/2);
// money is bank+cash waarde van betreffende user
$money = $info->cash+$info->bank;
// toon een rij met de kolommen: nummer, loginnaam, type, money en power van de user met nummer $j
print <<
ENDHTML;
}
// Cocaine top 5
$begin = ($_GET['p'] >= 0) ? $_GET['p']*30 : 0;
print "Meeste Cocaine top 5:";
$dbres = mysql_query("SELECT `login`,UNIX_TIMESTAMP(`signup`) AS `signup`,`cocaine`,`attack`,`defence`,`clicks`,`cash`,`bank`,`type`,`level` FROM `[users]` WHERE `activated`=1 ORDER BY cocaine DESC,`login` ASC LIMIT $begin,5");
$user = $_SESSION['login'];
for($j=$begin+1; $info = mysql_fetch_object($dbres); $j++)
{
// ????
$login = ($info->showonline == 0 && $data->level == 0x80 && $_GET['s'] == "online") ? "{$info->login} *" : $info->login;
// onthoud admins dikgedrukt en met *, als betreffende user dat is
$login = ($info->level & 0x80) ? "$login *" : $login;
// maak een array met typen
$type = Array("","Gangster","F.B.I","Pooier");
// onthoud betreffende type
$type = $type[$info->type];
// rond berekening van power af op gehele waarde en onthoud deze van de betreffende user
$power = round(($info->attack+$info->defence)/2);
// money is bank+cash waarde van betreffende user
$money = $info->cash+$info->bank;
$cocaine =$info->cocaine;
// toon een rij met de kolommen: nummer, loginnaam, type, money en power van de user met nummer $j
print <<
\n";
else if(isset($_POST['delete'])) {
mysql_query("DELETE FROM `[users]` WHERE `login`='{$x->login}'");
mysql_query("DELETE FROM `[temp]` WHERE `login`='{$x->login}'");
mysql_query("DELETE FROM `[logs]` WHERE `login`='{$x->login}' AND `area`='hqIP'");
if($clan = mysql_fetch_object(mysql_query("SELECT `name` FROM `[clans]` WHERE `owner`='{$x->login}'"))) {
mysql_query("DELETE FROM `[clans]` WHERE `name`='{$clan->name}'");
mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`=0 WHERE `clan`='{$clan->name}'");
}
print "
Delete user
\n
{$x->login} is verwijderd
\n";
}
else {
print <<
Delete user
ENDHTML;
}
}
}
else if($_GET['p'] == "reset") {
$dbres = mysql_query("SELECT `id`,`login`,`pass`,`level`,`IP`,`email`,`type`,`clan`,`clanlevel`,`activated`,`blocklist` FROM `[users]` WHERE `login`='{$_GET['x']}'");
if($x = mysql_fetch_object($dbres)) {
if(isset($_POST['reset'])) {
mysql_query("DELETE FROM `[users]` WHERE `login`='{$x->login}'");
mysql_query("DELETE FROM `[temp]` WHERE `login`='{$x->login}'");
mysql_query("DELETE FROM `[logs]` WHERE `login`='{$x->login}' AND `area`='hqIP'");
mysql_query("INSERT INTO `[users]`(`id`,`signup`,`login`,`pass`,`level`,`IP`,`email`,`type`,`clan`,`clanlevel`,`blocklist`,`activated`) values('{$x->id}',NOW(),'{$x->login}','{$x->pass}','{$x->level}','{$x->IP}','{$x->email}','{$x->type}','{$x->clan}','{$x->clanlevel}','{$x->blocklist}',1)");
print "
Reset user
\n
{$x->login} is gereset
\n";
}
else {
print <<
Reset user
ENDHTML;
}
}
}
else if($_GET['p'] == "resetall") {
$dbres = mysql_query("SELECT `id`,`login`,`pass`,`level`,`IP`,`email`,`type`,`clan`,`clanlevel`,`activated`,`blocklist` FROM `[users]` WHERE `login`='{$_GET['x']}'");
if($x = mysql_fetch_object($dbres)) {
if(isset($_POST['reset'])) {
mysql_query("DELETE FROM `[users]`");
mysql_query("DELETE FROM `[temp]`");
mysql_query("DELETE FROM `[logs]` AND `area`='hqIP'");
mysql_query("INSERT INTO `[users]`(`id`,`signup`,`login`,`pass`,`level`,`IP`,`email`,`type`,`clan`,`clanlevel`,`blocklist`,`activated`,`opw`,`dls`) values('{$x->id}',NOW(),'{$x->login}','{$x->pass}','{$x->level}','{$x->IP}','{$x->email}','{$x->type}','{$x->clan}','{$x->clanlevel}','{$x->blocklist}',1,'{$x->opw}','{$x->dls}'");
print "