Files
TravianZ/Templates/Build/25_2.tpl
T
novgorodschi catalin 55e6dd60b5 Refactor + BugFix
1. Fix a bug in Admin Panel that you can edit by yourself your rank, now you cannot edit your rank anymore.

2. Now Alliance Leader can edit his own Position

3. Fix negative value on Demolition Building, now in database at lvl is appear new level not -1

4. Refactor Ajax map, now all is alligned (Ajax folder and Map folder)

5. Fix bug from Palace (when change capital now Automation recount population automaticaly on old capital and new capital)
2026-05-18 09:18:35 +03:00

38 lines
1.5 KiB
Smarty

<?php
// 25_2.tpl - RESIDENCE CULTURE POINTS
global $village, $database, $session, $id;
$level = (int)$village->resarray['f'.$id];
$isNatar = (int)$database->getVillageField($village->wid, 'natar') == 1;
$villageCp = $isNatar ? 0 : (int)$database->getVillageField($village->wid, 'cp');
$accountCp = (int)$database->getVSumField($session->uid, 'cp');
$totalVillages = count($database->getProfileVillages($session->uid));
$mode = CP;
$nextCpNeeded = ${'cp'.$mode}[$totalVillages + 1];
?>
<div id="build" class="gid25">
<h1><?php echo RESIDENCE;?> <span class="level"><?php echo LEVEL;?> <?php echo $level;?></span></h1>
<p class="build_desc">
<a href="#" onClick="return Popup(25,4, 'gid');" class="build_logo">
<img class="building g25" src="img/x.gif" alt="Residence" title="<?php echo RESIDENCE;?>" />
</a>
<?php echo RESIDENCE_DESC;?>
</p>
<?php include("25_menu.tpl"); ?>
<p><?php echo RESIDENCE_CULTURE_DESC;?></p>
<table cellpadding="1" cellspacing="1" id="build_value">
<tr>
<th><?php echo PRODUCTION_POINTS;?></th>
<td><b><?php echo $villageCp;?></b> <?php echo POINTS_DAY;?></td>
</tr>
<tr>
<th><?php echo PRODUCTION_ALL_POINTS;?></th>
<td><b><?php echo $accountCp;?></b> <?php echo POINTS_DAY;?></td>
</tr>
</table>
<p><?php echo VILLAGES_PRODUCED;?> <b><?php echo $session->cp;?></b> <?php echo POINTS_NEED;?> <b><?php echo $nextCpNeeded;?></b> <?php echo POINTS;?>.</p>
</div>