clan;
$OMNILOG = 1;
include("_config2006.php");
if(! check_login()) {
header("Location: login.php");
exit;
}
if($data->clanlevel == 9) {
if(isset($_POST['change_owner']) && $_POST['owner'] != $data->login) {
$dbres = mysql_query("SELECT `login`,`level`,`clan` FROM `[users]` WHERE `login`='{$_POST['owner']}'");
if(($owner = mysql_fetch_object($dbres)) && $owner->clan == $data->clan && $owner->level & 0x01) {
mysql_query("UPDATE `[users]` SET `clanlevel`=1 WHERE `login`='{$data->login}'");
mysql_query("UPDATE `[users]` SET `clanlevel`=9 WHERE `login`='{$owner->login}'");
mysql_query("UPDATE `[clans]` SET `owner`='{$owner->login}' WHERE `name`='{$data->clan}'");
header("Location: /criminals/clan.php?x={$data->clan}\n");
}
}
}
mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'");
include("_include-gevangenis.php");
/* ------------------------- */ ?>
sitetitle; ?>
clanlevel >= 8 || $data->clanlevel == 2)) {
print " {$data->clan}: Aanmeldingen |
\n";
$dbres = mysql_query("SELECT `homes` FROM `[clans]` WHERE `name`='{$data->clan}'");
$clan = mysql_fetch_object($dbres);
$dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `clan`='{$data->clan}'");
$members = mysql_num_rows($dbres);
$maxrecruits = $clan->homes*5 - $members;
if($maxrecruits > 30)
{
$maxrecruits = 30 - $members;
}
if(isset($_POST['recruit'])) {
$dbres = mysql_query("SELECT `login` FROM `[users]` WHERE `clan`='{$data->clan}-[recruit]'");
while($recruit = mysql_fetch_object($dbres)) {
if(isset($_POST[$recruit->login]) && $_POST[$recruit->login] == 1 && $maxrecruits-- > 0){
mysql_query("UPDATE `[users]` SET `clan`='{$data->clan}',`clanlevel`=1 WHERE `login`='{$recruit->login}'");
mysql_query("INSERT INTO `[clanlogs]` (`datum`,`wie`,`waar`,`wat`,`wat2`,`hoeveel`) values(NOW(),'$data->login','$data->clan','aang','$recruit->login','1')");
}
else if(isset($_POST[$recruit->login]) && $_POST[$recruit->login] == 0){
mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`=0 WHERE `login`='{$recruit->login}'");
mysql_query("INSERT INTO `[clanlogs]` (`datum`,`wie`,`waar`,`wat`,`wat2`,`hoeveel`) values(NOW(),'$data->login','$data->clan','aann','$recruit->login','1')");
}
}
}
print " Je kunt nog $maxrecruits mensen aannemen |
\n";
print " |