delDemolition($village->wid); header("Location: build.php?gid=15&ty=$ty&cancel=0&demolish=0"); exit; } if($session->alliance) $memberCount = $database->countAllianceMembers($session->alliance); else $memberCount = 0; if(!empty($_REQUEST["demolish"]) && $_REQUEST["c"] == $session->mchecker) { if($_REQUEST["type"] != null && ($_REQUEST["type"] >= 19 && $_REQUEST["type"] <= 40 || $_REQUEST["type"] == 99)) { $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; } } 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) {
?>
";
} 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 " "; } } ?>