login}'"); include("_include-gevangenis.php"); /* ------------------------- */ ?> info ; $info = preg_replace("/\[b\]/", "", $info); $info = preg_replace("/\[\/b\]/", "", $info); $info = preg_replace("/\[u\]/", "", $info); $info = preg_replace("/\[\/u\]/", "", $info); $info = preg_replace("/\[i\]/", "", $info); $info = preg_replace("/\[\/i\]/", "", $info); $info = preg_replace('/(http:\/\/\S+)/','$1',$info); $info = preg_replace('/\n/',"
\n",$info); $info = eregi_replace("\\[color=([^\\[]*)\\]([^\\[]*)\\[/color\\]","\\2",$info); $info = str_replace(":D", "", $info); $info = str_replace(":frown", "", $info); $info = str_replace("(6)", "", $info); $info = str_replace(":junkie", "", $info); $info = str_replace(":mrgreen", "", $info); $info = str_replace(":appl", "", $info); $info = str_replace(":p", "", $info); $info = str_replace(";)", "", $info); $info = str_replace(":o", "", $info); $info = preg_replace('/\n/',"
\n",$info); print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print "
{$clan->name}
avatarc}\"> 
$info
\n"; print << ENDHTML; $dbres = mysql_query("SELECT `attack`,`defence`,`clicks`,`level`,`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*3000)/2; $power += ($clan->homes*1500)/2; $verdienstenuur = $clan->centrale*300; $verdienstendag = $verdienstenuur*24; print "
Owner - owner}\">{$clan->owner}
Members - ". (mysql_num_rows($dbres)) ."
Power - $power
Land - {$clan->land}m2
Contant - {$clan->cash}
Bank - {$clan->bank}
Opgericht - {$clan->started}
Kliks - {$clan->clicks}
Kliks vandaag - {$clan->clickstoday}
Kliksite - name\" class=\"menu\">{$clan->name}
Verdiensten per uur - €$verdienstenuur
Verdiensten per dag - €$verdienstendag
     
\n"; print " \n"; print " \n"; print " \n"; print " \n"; print "
Centrale Huis Muur
$clan->centrale $clan->homes $clan->def_lvl1
\n"; $totaala = $clan->attwins+$clan->attlosses; $totaald = $clan->defwins+$clan->deflosses; print " \n"; print " \n"; print " \n"; print " \n"; print "
  Gewonnen verloren Totaal
Aanvallen: {$clan->attwins} {$clan->attlosses} {$totaala}
Verdedigingen: {$clan->defwins} {$clan->deflosses} {$totaald}
\n"; $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; } print " "; print ""; if($data->clanlevel >= 7) print ""; print "
name}\">Joinname}\">donerenname}\">Attack
\n
\n\n"; print << ENDHTML; $begin = ($_GET['p'] >= 0) ? $_GET['p']*30 : 0; if($_GET['s'] == "login") $dbres = mysql_query("SELECT `login`,`level`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$clan->name}' AND `activated`=1 ORDER BY `login` LIMIT $begin,30"); else if($_GET['s'] == "money") $dbres = mysql_query("SELECT `login`,`level`,`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,30"); else if($_GET['s'] == "power") $dbres = mysql_query("SELECT `login`,`level`,`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,30"); else $dbres = mysql_query("SELECT `login`,`level`,`attack`,`defence`,`clicks`,`bank`,`cash`,`clanlevel`,`type` FROM `[users]` WHERE `clan`='{$clan->name}' AND `activated`=1 ORDER BY `clanlevel` DESC,`login` ASC LIMIT $begin,30"); 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; $loginnaam = $member->login; $loginnaam2 = $member->login; $loginnaam = ($member->level & 0x80) ? "$loginnaam" : $loginnaam; $loginnaam = ($member->level == 21) ? "$loginnaam " : $loginnaam; $loginnaam = ($member->level == 22) ? "$loginnaam " : $loginnaam; $loginnaam = ($member->level == 23) ? "$loginnaam " : $loginnaam; $loginnaam = ($member->level == 20) ? "$loginnaam" : $loginnaam; $loginnaam = ($member->level == 10) ? "$loginnaam \"Rood\"" : $loginnaam; $loginnaam = ($member->level == 50) ? "$loginnaam" : $loginnaam; print << ENDHTML; } $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `clan`='{$clan->name}' AND `activated`=1"); print "
# Nick Rank Geld Power
$j $loginnaam $rank \$$money $power
\n\n\n
"; if(mysql_num_rows($dbres) <= 30) print "< 1 >
\n"; else { if($begin/30 == 0) print "<< "; else print "name}&s={$_GET['s']}&p=". ($begin/30-1) ."\"><< "; for($i=0; $iname}&s={$_GET['s']}&p=$i\">". ($i+1) ." "; } if($begin+30 >= mysql_num_rows($dbres)) print ">> "; else print "name}&s={$_GET['s']}&p=". ($begin/30+1) ."\">>>"; print " \n"; } } } else if($_GET['p'] == "list") { print " \n"; print " \n"; $dbres = mysql_query("SELECT `name`,`owner`,`type`,`def_lvl1` FROM `[clans]` ORDER BY `type`"); while($clan = mysql_fetch_object($dbres)) { $power = 0; $dbres2 = mysql_query("SELECT `attack`,`defence`,`clicks`,`type` FROM `[users]` WHERE `clan`='{$clan->name}'"); while($member = mysql_fetch_object($dbres2)) $power += round(($member->attack+$member->defence)/2+$member->clicks*5); $power += ($clan->def_lvl1*1500)/2; $clanpower[$clan->type][$clan->name] = $power; } $lasttype = 1; foreach($clanpower as $type => $info) { if($type != $lasttype) print " \n"; arsort($info); foreach($info as $name => $power) { $dbres = mysql_query("SELECT `name`,`owner` FROM `[clans]` WHERE `name`='$name'"); $clan = mysql_fetch_object($dbres); $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `clan`='$name'"); $nummembers = mysql_num_rows($dbres); print " "; if($data->clanlevel >= 7) print " \n"; else print "\n"; $lasttype = $type; } } print "
Clan Owner Members Power

$name owner}\">{$clan->owner} $nummembers $power Attack
\n"; } else if($_GET['p'] == "join") { if($data->clanlevel == 0) { print " FOUT\n"; if(isset($_POST['clan'])) { $clan = substr($_POST['clan'],0,32); $dbres = mysql_query("SELECT `name`,`owner`,`type`,`blocklist` FROM `[clans]` WHERE `name`='{$_POST['clan']}'"); if($clan = mysql_fetch_object($dbres)) { if($clan->type == $data->type) { if(preg_match("/,{$data->login},/i",$clan->blocklist)){ print << Je mag niet meer in clan $clan->name ENDHTML; exit; } $data->clan = "{$clan->name}-[recruit]"; mysql_query("UPDATE `[users]` SET `clan`='{$clan->name}-[recruit]' WHERE `login`='{$data->login}'"); } else { $type = Array("","drugsdealers","wetenschappers","agenten","Terroristen","Gangsters"); $type = $type[$clan->type]; print " Alleen $type kunnen zich aanmelden bij {$clan->name}\n"; } } else print " Die clan bestaat niet\n"; } } else print " Je zit al in een clan\n"; } else if($_GET['p'] == "new" && $data->level == 255 && $data->clanlevel == 0) { print " Nieuwe clan\n"; if(isset($_POST['name'])) { $_POST['name'] = substr($_POST['name'],0,16); if(preg_match('/^[a-zA-Z0-9_\-]+$/',$_POST['name'])) { if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } if($_POST['name'] == ' ') { $_POST['name'] = str_replace(" ","*",$_POST['name']); } else { } $dbres = mysql_query("SELECT `name` FROM `[clans]` WHERE `name`='{$_POST['name']}'"); if(mysql_num_rows($dbres) == 0) { $dbres = mysql_query("SELECT `land` FROM `[clans]`"); $land = 0; while($clan = mysql_fetch_object($dbres)) $land += $clan->land; $data->clan = $_POST['name']; $data->clanlevel = 9; mysql_query("UPDATE `[users]` SET `clan`='{$_POST['name']}',`clanlevel`=9 WHERE `login`='{$data->login}'"); mysql_query("INSERT INTO `[clans]`(`name`,`owner`,`started`,`type`) values('{$_POST['name']}','{$data->login}',NOW(),$data->type)"); print " De clan is aangemaakt\n\n"; } else print " Er is al een clan met die naam\n"; } else print " Er mogen alleen letters, nummers, _ - en spaties in de clan-name zitten\n"; } print "
Naam:

\n"; } else if($_GET['p'] == "quit" && $data->clanlevel > 0 && $data->clanlevel < 9) { print " Stap uit de clan\n"; if(isset($_POST['quit'])) { $data->clan2 = $data->clan; $data->clanlevel = 0; $dbres = mysql_query("SELECT * FROM `[clans]` WHERE `name`='{$data->clan}'"); if($clan = mysql_fetch_object($dbres)) $type = Array("","$clan->centrale","$clan->centrale","$clan->centrale"); $type = $type[$clan->type]; $geld2 = Array("","300","300","300"); $geld2 = $geld2[$clan->type]; $geld = $type*$geld2; $geld5 = $geld*24; $geld6 = $geld5*2; if($geld6 >= $data->bank) { print << Je hebt geen €$geld6 op je bank. dus kun je niet uit de clan stappen. ENDHTML; exit; } $dbres = mysql_query("SELECT * FROM `[clans]` WHERE `name`='{$data->clan}'"); if($clan = mysql_fetch_object($dbres)) $type = Array("","$clan->centrale","$clan->centrale","$clan->centrale"); $type = $type[$clan->type]; $geld2 = Array("","300","300","300"); $geld2 = $geld2[$clan->type]; $geld = $type*$geld2; $geld5 = $geld*24; $geld6 = $geld5*2; $clan->cash += $geld6; $data->bank -= $geld6; mysql_query("INSERT INTO `[clanlogs]` (`datum`,`wie`,`waar`,`wat`,`hoeveel`) values(NOW(),'$data->login','$data->clan','uitgestapt','2')"); mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`=0,`bank`={$data->bank},`cdonatie`=0 WHERE `login`='{$data->login}'"); print <<Je bent uit de clan gestapt ENDHTML; } if(isset($_POST['tweedekeer'])) { $attack2 = $data->attack; $attack =(int)( $attack2*0.3); $data->attack -=$attack; mysql_query("INSERT INTO `[clanlogs]` (`datum`,`wie`,`waar`,`wat`,`hoeveel`) values(NOW(),'$data->login','$data->clan','uitgestapt','1')"); mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`=0,`attack`={$data->attack} ,`cdonatie`=0 WHERE `login`='{$data->login}'"); print <<Je bent uit de clan gestapt ENDHTML; } else if(isset($_POST['cancel'])) { print << document.location = "hq.php"; ENDHTML; } else { $dbres = mysql_query("SELECT * FROM `[clans]` WHERE `name`='$data->clan'"); if($clan = mysql_fetch_object($dbres)) $type = Array("","$clan->centrale","$clan->centrale","$data->clan"); $type = $type[$clan->type]; $geld2 = Array("","300","300","300"); $geld2 = $geld2[$clan->type]; $geld = $type*$geld2; $geld5 = $geld*24; $geld6 = $geld5*2; $attack2 = $data->attack; $attack = (int)($attack2*0.3); print <<
Weet je zeker dat je uit de clan wilt stappen?
Om uit de clan te stappen moet je €$geld6 betalen aan GTC.
Of je raakt je $attack attack kwijt.

     
ENDHTML; } } else if($_GET['p'] == "delete" && $data->clanlevel == 9) { print " Delete clan\n"; if(isset($_POST['delete'])) { $dbres = mysql_query("SELECT `login` FROM `[users]` WHERE `clan`='{$data->clan}' OR `clan`='{$data->clan}-[recruit]'"); while($member = mysql_fetch_object($dbres)) mysql_query("UPDATE `[users]` SET `clan`='',`clanlevel`=0 WHERE `clan`='{$data->clan}' OR `clan`='{$data->clan}-[recruit]'"); mysql_query("DELETE FROM `[clans]` WHERE `name`='{$data->clan}'"); mysql_query("DELETE FROM `[clanslogs]` WHERE `waar`='{$data->clan}'"); mysql_query("DELETE FROM `[clanban]` WHERE `clan`='{$data->clan}'"); mysql_query("DELETE FROM `[forum_topics]` WHERE `clan`='{$data->clan}'"); $data->clan = ""; $data->clanlevel = 0; print <<De clan is opgeheven ENDHTML; } else if(isset($_POST['cancel'])) { print << document.location = "hq.php"; ENDHTML; } else { print <<
Weet je zeker dat je de clan op wilt heffen?

     
ENDHTML; } } /* ------------------------- */ ?>