\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 "