mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-23 10:26:42 +08:00
Update newdorf.tpl
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$wood = round($village->awood);
|
||||||
|
$clay = round($village->aclay);
|
||||||
|
$iron = round($village->airon);
|
||||||
|
$crop = round($village->acrop);
|
||||||
$founder = $database->getVillage($village->wid);
|
$founder = $database->getVillage($village->wid);
|
||||||
$newvillage = $database->getMInfo($_GET['id']);
|
$newvillage = $database->getMInfo($_GET['id']);
|
||||||
$eigen = $database->getCoor($village->wid);
|
$eigen = $database->getCoor($village->wid);
|
||||||
@@ -79,17 +82,12 @@ echo '</pre>';
|
|||||||
</table>
|
</table>
|
||||||
<p class="btn">
|
<p class="btn">
|
||||||
<?php
|
<?php
|
||||||
$mode = CP;
|
if ($wood>749 && $clay>749 && $iron>749 && $crop>749) {
|
||||||
$total = count($database->getProfileVillages($session->uid));
|
|
||||||
$need_cps = ${'cp'.$mode}[$total+1];
|
|
||||||
$cps = $session->cp;
|
|
||||||
|
|
||||||
if($cps >= $need_cps) {
|
|
||||||
?>
|
?>
|
||||||
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" alt="OK" src="img/x.gif" onclick="this.disabled=true;this.form.submit();"/>
|
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" alt="OK" src="img/x.gif" onclick="this.disabled=true;this.form.submit();"/>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
print "$cps/$need_cps culture points";
|
echo "<span class=\"c2\"><b>Not enough resource</b></span>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user