Files
iopietro 77136a9784 Artifacts update and optimizations
+Added the "Artifacts" section in the Admin Panel, which contains two
options: return a deleted artifact to the Natars and create new
Artifacts, assigned to a specified player
+Return to Natars coded, in the village section of the Admin Panel
+Moved a lot of functions and costants from Automation.php to the "new"
class Artifacts.php
+Optimized a lot the whole Natars creation process, decreased the number
of query of about 600
+Optimized a lot the function which deletes a player's account, it's now
executed almost instantly, even with players with a lot of villages
+Redesigned the map spawn system, using a more Travian-like village
distribution
+Fixed a bug that did show a broken village in the artifact chronology,
if that village was destroyed
+Reduced the amount of redundant code (about 230 lines) for
27_1.tpl/27_2.tpl and 27_3.tpl
+Fixed a bug that permitted to build the Great Granary and the Great
Warehouse in the whole account, with only a village effect artifact
+Fixed a bug in the Admin Panel map that didn't permit to show village
informations, if that village contained single quotes in its name
2018-07-24 03:04:25 +02:00

64 lines
2.4 KiB
Smarty

<body>
<div id="build" class="gid27">
<a href="#" onclick="return Popup(27,4);" class="build_logo"><img class="building g27" src="img/x.gif" alt="Treasury" title="<?php echo TREASURY; ?>"></a>
<h1><?php echo TREASURY; ?> <span class="level"><?php echo LEVEL; ?> <?php
echo $Account->resarray['f' . $id];
?></span></h1>
<p class="build_desc"><?php echo TREASURY_DESC; ?></p>
<?php
include ("27_menu.tpl");
?>
<table id="show_artefacts" cellpadding="1" cellspacing="1">
<thead>
<tr>
<th colspan="4"><?php echo LARGE_ARTIFACTS; ?></th>
</tr>
<tr>
<td></td>
<td><?php echo NAME; ?></td>
<td><?php echo PLAYER; ?></td>
<td><?php echo ALLIANCE; ?></td>
</tr>
</thead>
<tbody>
<?php
$artifactsArray = $database->getArtifactsBysize([2, 3]);
if(count($artifactsArray) == 0) {
echo '<td colspan="4" class="none">'.NO_ARTIFACTS.'</td>';
} else {
$previous = "";
foreach($artifactsArray as $artifact){
if($previous != "" && $previous != $artifact['type']) echo '<tr><td colspan="4"></td></tr>';
$previous = $artifact['type'];
echo '<tr>
<td class="icon"><img class="artefact_icon_'.$artifact['type'].'" src="img/x.gif" alt="" title=""></td>
<td class="nam">
<a href="build.php?id='.$id.'&show='.$artifact['id'].'">'.$artifact['name'] . '</a> <span class="bon">'.$artifact['effect'].'</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>
</td>
<td class="pla"><a href="karte.php?d='.$artifact['vref'].'&c='.$generator->getMapCheck($artifact['vref']).'">'.$database->getUserField($artifact['owner'], "username", 0).'</a></td>
<td class="al"><a href="allianz.php?aid='.$database->getUserField($artifact['owner'], "alliance", 0).'">'.$database->getAllianceName($database->getUserField($artifact['owner'], "alliance", 0)).'</a></td>
</tr>';
}
}
?>
</tbody></table>
<?php
include ("upgrade.tpl");
?>
</div>