access != BANNED){ $database->delDemolition($village->wid); header("Location: build.php?gid=15&ty=$ty&cancel=0&demolish=0"); exit; }else{ header("Location: banned.php"); exit; } } if ($session->alliance) { $memberCount = $database->countAllianceMembers($session->alliance); } else { $memberCount = 0; } if(!empty($_REQUEST["demolish"]) && $_REQUEST["c"] == $session->mchecker) { if($session->access != BANNED){ if($_REQUEST["type"] != null) { $type = $_REQUEST['type']; $demolish_permitted = $database->addDemolition($village->wid,$type); if ($demolish_permitted === true) { $session->changeChecker(); header("Location: build.php?gid=15&ty=$type&cancel=0&demolish=0"); } else { header("Location: build.php?gid=15&ty=$type&nodemolish=".$demolish_permitted); } exit; } }else{ header("Location: banned.php"); exit; } } if($village->resarray['f'.$id] >= DEMOLISH_LEVEL_REQ) { echo "
";
echo "".DEMOLITION_OF." ".$building->procResType($VillageResourceLevels['f'.$Demolition['buildnumber'].'t']).": ".$generator->getTimeFormat($Demolition['timetofinish']-time())."";
if($session->gold >= 2) {
if($session->access!=BANNED){
?>
";
} else {
if (isset($_GET['nodemolish'])) {
switch ($_GET['nodemolish']) {
case 18:
echo 'Because you are the leader of your alliance, demolition of your current Embassy cannot be started, since it still holds all of your '.$memberCount.' alliance members. You can, however quit the alliance, while selecting a new leader in the "quit alliance" form, then continue the demolition.
'; break; } } echo " "; } } ?>