This commit is contained in:
unknown
2012-10-25 22:12:44 +02:00
parent 2c9d42081e
commit 7fe34e2d8a
3 changed files with 20 additions and 10 deletions
+4 -1
View File
@@ -677,7 +677,6 @@ class Building {
if($jobs['wid']==$village->wid){
$wwvillage = $database->getResourceLevel($jobs['wid']);
if($wwvillage['f99t']!=40){
$ww = 0;
$level = $jobs['level'];
if($jobs['type'] != 25 AND $jobs['type'] != 26 AND $jobs['type'] != 40) {
$finish = 1;
@@ -717,6 +716,10 @@ class Building {
}
}
}
$wwvillage1 = $database->getResourceLevel($village->wid);
if($wwvillage1['f99t']!=40){
$ww = 0;
}
if($ww == 0){
$database->finishDemolition($village->wid);
$technology->finishTech();
+8 -2
View File
@@ -31,9 +31,15 @@ if($village->resarray['f'.$id] >= DEMOLISH_LEVEL_REQ) {
echo "<b>";
echo "<a href='build.php?id=26&cancel=1'><img src='img/x.gif' class='del' title='cancel' alt='cancel'></a> ";
echo "Demolition of ".$building->procResType($VillageResourceLevels['f'.$Demolition['buildnumber'].'t']).": <span id=timer1>".$generator->getTimeFormat($Demolition['timetofinish']-time())."</span>";
?>
<a href="?buildingFinish=1" onclick="return confirm('Finish all construction and research orders in this village immediately for 2 Gold?');" title="Finish all construction and research orders in this village immediately for 2 Gold?"><img class="clock" alt="Finish all construction and research orders in this village immediately for 2 Gold?" src="img/x.gif"/></a>
if($session->gold >= 2) {
if($session->access!=BANNED){
?> <a href="?buildingFinish=1" onclick="return confirm('Finish all construction and research orders in this village immediately for 2 Gold?');" title="Finish all construction and research orders in this village immediately for 2 Gold?"><img class="clock" alt="Finish all construction and research orders in this village immediately for 2 Gold?" src="img/x.gif"/></a>
<?php
}else{
?> <a href="banned.php" onclick="return confirm('Finish all construction and research orders in this village immediately for 2 Gold?');" title="Finish all construction and research orders in this village immediately for 2 Gold?"><img class="clock" alt="Finish all construction and research orders in this village immediately for 2 Gold?" src="img/x.gif"/></a>
<?php
}
}
echo "</b>";
} else {
echo "
+8 -7
View File
@@ -20,12 +20,7 @@ if(isset($_GET['newdid'])) {
if($_GET['id'] == 99 && $village->natar == 0){
header("Location: dorf2.php");
}
if(isset($_GET['buildingFinish'])) {
if($session->gold >= 2) {
$building->finishAll();
header("Location: build.php?gid=15");
}
}
$start = $generator->pageLoadTimeStart();
$alliance->procAlliForm($_POST);
$technology->procTech($_POST);
@@ -311,7 +306,7 @@ $automation->isWinner();
<?php include("Templates/menu.tpl"); ?>
<div id="content" class="build">
<?php
if(isset($_GET['id']) or isset($_GET['gid']) or $route == 1 or isset($_GET['routeid'])) {
if(isset($_GET['id']) or isset($_GET['gid']) or $route == 1 or isset($_GET['routeid']) or isset($_GET['buildingFinish'])) {
if(isset($_GET['s']))
{
if (!ctype_digit($_GET['s'])) {
@@ -347,6 +342,12 @@ if(isset($_GET['id']) or isset($_GET['gid']) or $route == 1 or isset($_GET['rout
else {
include("Templates/Build/".$village->resarray['f'.$_GET['id'].'t'].".tpl");
}
if($_GET['buildingFinish'] == 1) {
if($session->gold >= 2) {
$building->finishAll();
header("Location: build.php?gid=15");
}
}
}
}else{
header("Location: dorf1.php");