mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-01 01:54:22 +00:00
77136a9784
+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
53 lines
2.0 KiB
Smarty
53 lines
2.0 KiB
Smarty
<?php
|
|
include_once("../GameEngine/Artifacts.php");
|
|
|
|
$artifact = reset($database->getOwnArtefactInfo($_GET['did']));
|
|
$artifactOfTheFool = !empty($artifact) && $artifact['type'] == 8;
|
|
$artifactInfo = Artifacts::getArtifactInfo($artifact);
|
|
?>
|
|
<table id="member">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="8">Artifact</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="ra"></td>
|
|
<td class="ra"></td>
|
|
<td colspan="1">Name</td>
|
|
<td colspan="1">Bonus</td>
|
|
<td colspan="1">Area of effect</td>
|
|
<td colspan="1">Time of conquer</td>
|
|
<td colspan="1">Time of activation</td>
|
|
<?php if($artifactOfTheFool){?>
|
|
<td colspan="1">Next activation</td>
|
|
<?php } ?>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
if(empty($artifact)){
|
|
?>
|
|
<tr>
|
|
<td colspan="8"><div style="text-align: center"><?php echo NO_ARTIFACTS; ?></div></td>
|
|
</tr>
|
|
<?php }else{ ?>
|
|
<tr>
|
|
<td><a href="?action=delArtifact&artid=<?php echo $artifact['id']; ?>&del=0" onClick="return del('arti', <?php echo $artifact['id']; ?>)"><img src="../img/admin/del.gif"></a></td>
|
|
<td class="icon"><img class="artefact_icon_<?php echo $artifact['type']; ?>" src="../img/x.gif"></td>
|
|
<td colspan="1"><div style="text-align: center"><?php echo $artifact['name']; ?></div></td>
|
|
<td colspan="1"><div style="text-align: center"><?php echo $artifactInfo['bonus']; ?></div></td>
|
|
<td colspan="1"><div style="text-align: center"><?php echo $artifactInfo['effectInfluence']; ?></div></td>
|
|
<td colspan="1"><div style="text-align: center"><?php echo date("d.m.Y H:i:s", $artifact['conquered']); ?></div></td>
|
|
<td colspan="1"><div style="text-align: center"><?php echo $artifactInfo['active']; ?></div></td>
|
|
<?php if($artifactOfTheFool){?>
|
|
<td colspan="1"><div style="text-align: center"><?php echo $artifactInfo['nextEffect']; ?></div></td>
|
|
<?php } ?>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
<?php
|
|
|
|
if($village['owner'] != 3 && !empty($artifact)) echo '<a href="admin.php?action=returnArtifact&artid='.$artifact['id'].'">Return to Natars</a>';
|
|
?>
|
|
|