\n";
$dbres = mysql_query("SELECT `attack`,`defence`,`clicks`,`type` FROM `[users]` WHERE `clan`='{$clan->name}'");
while($member = mysql_fetch_object($dbres))
$power += round(($member->attack+$member->defence)/2+$member->clicks*5);
$power += ($clan->def_lvl1*1500)/2;
$power += ($clan->def_lvl4*20000)/2;
$dbres = mysql_query("SELECT `name`,`url` FROM `[weapons]` WHERE `area`=8 OR `area`=8+{$clan->type} ORDER BY `area`,`costs`");
while($weapon = mysql_fetch_object($dbres)) {
$name = $weapon->name;
$type = Array("Huis" => "homes",
"Muur" => "def_lvl1",
"bunker" => "def_lvl4",
"Coffeeshop" => "money_lvl1",
"Chemie Lab" => "money_lvl1",
"booreiland" => "money_lvl4",
"Aandeel" => "money_lvl1");
$type = $type[$weapon->name];
$lastarea = $weapon->area;
}
ENDHTML;
$begin = ($_GET['p'] >= 0) ? $_GET['p']*30 : 0;
if($_GET['s'] == "login")
$dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$clan->name}' AND `activated`=1 ORDER BY `login` LIMIT $begin,105");
else if($_GET['s'] == "money")
$dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$clan->name}' AND `activated`=1 ORDER BY `cash`+`bank` DESC,`login` ASC LIMIT $begin,105");
else if($_GET['s'] == "power")
$dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$clan->name}' AND `activated`=1 ORDER BY (`attack`+`defence`)/2+`clicks`*5 DESC,`login` ASC LIMIT $begin,105");
else
$dbres = mysql_query("SELECT `login`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$clan->name}' AND `activated`=1 ORDER BY `clanlevel` DESC,`login` ASC LIMIT $begin,150");
for($j=$begin+1; $member = mysql_fetch_object($dbres); $j++) {
$rank = Array("","Member","Recruiter","","","","Manager","Generaal","Leader","Owner");
$rank = $rank[$member->clanlevel];
$power = round(($member->attack+$member->defence)/2+$member->clicks*5);
$money = $member->cash+$member->bank;
print <<
|
|