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"); /* ------------------------- */ ?> <?php echo $page->sitetitle; ?> clanlevel >= 8 || $data->clanlevel == 2)) { print " \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 " \n"; print " ENDHTML; if($_GET['s'] == "power") $dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`type` FROM `[users]` WHERE `clan`='{$data->clan}-[recruit]' ORDER BY (`attack`+`defence`)/2+`clicks`*5"); else $dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`type` FROM `[users]` WHERE `clan`='{$data->clan}-[recruit]' ORDER BY `login`"); while($recruit = mysql_fetch_object($dbres)) { $power = round(($recruit->attack+$recruit->defence)/2+$recruit->clicks*5); print " \n"; } print " \n"; print "
{$data->clan}: Aanmeldingen
Je kunt nog $maxrecruits mensen aannemen
\n"; if($members >= 30){ print << <?php echo $page->sitetitle; ?>
Je mag niet meer dan 30 leden in een clan hebben.
ENDHTML; exit; } print <<
Nickname Power
login}\">{$recruit->login} $power login}\" value=\"0\"> Weigeren login}\" value=\"1\"> Aannemen
\n"; } else if($_GET['p'] == "members" && $data->clanlevel >= 8) { if(isset($_POST['members'])) { $dbres = mysql_query("SELECT `login` FROM `[users]` WHERE `clan`='{$data->clan}'"); while($member = mysql_fetch_object($dbres)) { if(isset($_POST[$member->login])) { if($_POST[$member->login] == 0){ $dbres = mysql_query("SELECT * FROM `[clanlogs]` WHERE `wie`='{$member->login}' AND `waar`='{$data->clan}' AND `wat`='KICK'"); if ( $member->login == $data->login){ print " {$data->clan}: Members\n"; print " Je mag je zelf niet kicken.\n"; exit; } else if(($numattacks = mysql_num_rows($dbres)+1) >= 3) { print " {$data->clan}: Members\n"; print " $member->login is al 2 keer gekickt uit de clan.\n"; exit; } mysql_query("INSERT INTO `[clanlogs]` (`datum`,`wie`,`waar`,`wat`,`wat2`,`hoeveel`) values(NOW(),'$member->login','$data->clan','KICK','$data->login','0')"); mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`=0 WHERE `login`='{$member->login}'"); } else if($_POST[$member->login] >= 1 && $_POST[$member->login] <= 8) mysql_query("UPDATE `[users]` SET `clanlevel`='{$_POST[$member->login]}' WHERE `login`='{$member->login}'"); } } } print " {$data->clan}: Members\n"; print " Je kan iemand 2 keer uit de clan kicken.\n"; if($data->clanlevel == 9) { print "
Owner:
\n\n"; } print <<
ENDHTML; if($_GET['s'] == "login") $dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$data->clan}' AND `activated`=1 ORDER BY `login`"); else if($_GET['s'] == "power") $dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$data->clan}' AND `activated`=1 ORDER BY (`attack`+`defence`)/2+`clicks`*5 DESC,`login` ASC"); else $dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$data->clan}' AND `activated`=1 ORDER BY `clanlevel` DESC,`login` ASC"); for($j=1; $member = mysql_fetch_object($dbres); $j++) { $rank = Array("","Member","Recruiter","","","","Manager","Generaal","Leader","Owner"); ${"select{$member->clanlevel}"} = " selected"; $power = round(($member->attack+$member->defence)/2+$member->clicks*5); print << ENDHTML; } else print "Owner\n"; ${"select{$member->clanlevel}"} = ""; } print <<
# Nickname Power Rank
$j {$member->login} $power ENDHTML; if($member->clanlevel < 9) { print <<
ENDHTML; } else if($_GET['p'] == "info" && $data->clanlevel >= 8) { include("_include-leaderopties.php"); $dbres = mysql_query("SELECT `name`,`info`,`avatarc`,UNIX_TIMESTAMP(`started`) AS `started` FROM `[clans]` WHERE `name`='{$data->clan}'"); $clan = mysql_fetch_object($dbres); print " {$data->clan}: Clan profiel wijzigen\n"; print " clan}\">Bekijk je profiel\n"; if(isset($_POST['protection']) && $clan->started+24*60*60 > time()) { mysql_query("UPDATE `[clans]` SET `started`=FROM_UNIXTIME(UNIX_TIMESTAMP(`started`)-24*60*60-1) WHERE `name`='{$data->clan}'"); print " Je clan staat niet meer onder bescherming.\n"; exit; } if(isset($_POST['info'])) { $clan->info = preg_replace('/avatarc = preg_replace('/info}',`avatarc`='{$clan->avatarc}' WHERE `name`='{$data->clan}'"); mysql_query("INSERT INTO `[clanlogs]` (`datum`,`wie`,`waar`,`wat`,`hoeveel`) values(NOW(),$data->login','{$data->clan}','info','0')"); print " Clan info is veranderd\n"; } $protection = round($clan->started/3600-time()/3600) + 24; print <<

Clan Afbeelding:
breedte: 600 pixels - hoogte: 120 pixels
ENDHTML; if($protection > 0) print "
De clan staat nog $protection uur onder bescherming

\n"; } /* ------------------------- */ ?>