clan; $OMNILOG = 1; include("_include-config.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}'"); /* ------------------------- */ ?> [( Criminals )] "> 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(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}'"); else if(isset($_POST[$recruit->login]) && $_POST[$recruit->login] == 0) mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`=0 WHERE `login`='{$recruit->login}'"); } } print " \n"; print " \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) 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 " \n"; if($data->clanlevel == 9) { print " \n\n"; } print << ENDHTML; } else if($_GET['p'] == "info" && $data->clanlevel >= 8) { $dbres = mysql_query("SELECT `name`,`info` FROM `[clans]` WHERE `name`='{$data->clan}'"); $clan = mysql_fetch_object($dbres); print " \n"; print " \n"; if(isset($_POST['info'])) { $clan->info = preg_replace('/info}' WHERE `name`='{$data->clan}'"); print " \n"; } print << ENDHTML; } /* ------------------------- */ ?>
{$data->clan}: Aanmeldingen
Je kunt nog $maxrecruits mensen aannemen
\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 "
Nickname Power
login}\">{$recruit->login} $power login}\" value=\"0\"> Weigeren login}\" value=\"1\"> Aannemen
{$data->clan}: Members
Owner:
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 <<
{$data->clan}: Clan info
clan}\">Bekijk je profiel
Clan info is veranderd
Info: