Update newdorf.tpl

This commit is contained in:
Shadow
2014-02-19 12:42:51 +02:00
parent 04f317d658
commit c408f02aa7
+6 -8
View File
@@ -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>