mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-26 06:26:08 +00:00
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
This commit is contained in:
+42
-55
@@ -1,7 +1,10 @@
|
||||
<?php
|
||||
$artefact1 = $database->getOwnArtefactInfo3($session->uid);
|
||||
include_once("GameEngine/Artifacts.php");
|
||||
|
||||
$ownArtifacts = $database->getOwnArtefactsInfo($session->uid);
|
||||
$wref = $village->wid;
|
||||
$coor = $database->getCoor($wref);
|
||||
|
||||
?>
|
||||
<body>
|
||||
<div class="gid27">
|
||||
@@ -21,31 +24,21 @@ $coor = $database->getCoor($wref);
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if (empty($artefact1)) echo '<tr><td colspan="4" class="none">'.ANY_ARTIFACTS.'</td></tr>';
|
||||
if (empty($ownArtifacts)) echo '<tr><td colspan="4" class="none">'.ANY_ARTIFACTS.'</td></tr>';
|
||||
else
|
||||
{
|
||||
foreach($artefact1 as $artefact){
|
||||
$coor2 = $database->getCoor($artefact['vref']);
|
||||
if($artefact['size'] == 1 && $artefact['type'] != 11){
|
||||
$reqlvl = 10;
|
||||
$effect = "village";
|
||||
}else{
|
||||
if($artefact['type'] != 11){
|
||||
$reqlvl = 20;
|
||||
}else{
|
||||
$reqlvl = 10;
|
||||
}
|
||||
$effect = "account";
|
||||
}
|
||||
echo '<tr><td class="icon"><img class="artefact_icon_' . $artefact['type'] . '" src="img/x.gif"></td>';
|
||||
foreach($ownArtifacts as $ownArtifact){
|
||||
$coor2 = $database->getCoor($ownArtifact['vref']);
|
||||
$ownArtifactInfo = Artifacts::getArtifactInfo($ownArtifact);
|
||||
echo '<tr><td class="icon"><img class="artefact_icon_' . $ownArtifact['type'] . '" src="img/x.gif"></td>';
|
||||
echo '<td class="nam">
|
||||
<a href="build.php?id=' . $id . '&show='.$artefact['id'].'">' . $artefact['name'] . '</a> <span class="bon">' . $artefact['effect'] . '</span>
|
||||
<div class="info">
|
||||
Treasury <b>' . $reqlvl . '</b>, Effect <b>' . $effect . '</b>
|
||||
</div>
|
||||
</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $artefact['vref'] . '&c=' . $generator->getMapCheck($artefact['vref']) . '">' . $database->getVillageField($artefact['vref'], "name") . '</a></td>';
|
||||
echo '<td class="dist">' . date("d.m.Y H:i", $artefact['conquered']) . '</td></tr>';
|
||||
<a href="build.php?id='.$id . '&show='.$ownArtifact['id'].'">' . $ownArtifact['name'] . '</a> <span class="bon">' . $ownArtifact['effect'] . '</span>
|
||||
<div class="info">
|
||||
Treasury <b>'.$ownArtifactInfo['requiredLevel'].'</b>, Effect <b>'.$ownArtifactInfo['effectInfluence'].'</b>
|
||||
</div>
|
||||
</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $ownArtifact['vref'] . '&c=' . $generator->getMapCheck($ownArtifact['vref']) . '">' . $database->getVillageField($ownArtifact['vref'], "name") . '</a></td>';
|
||||
echo '<td class="dist">'.date("d.m.Y H:i", $ownArtifact['conquered']) . '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,41 +65,35 @@ Treasury <b>' . $reqlvl . '</b>, Effect <b>' . $effect . '</b>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$count = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "artefacts WHERE del = 0"), MYSQLI_ASSOC);
|
||||
$count = $count['Total'];
|
||||
if($count == 0) echo '<td colspan="4" class="none">'.NO_ARTIFACTS_AREA.'</td>';
|
||||
else
|
||||
{
|
||||
$arts = mysqli_query($database->dblink,"SELECT type, vref, id, name, size, owner, effect FROM " . TB_PREFIX . "artefacts WHERE del = 0");
|
||||
$artifacts = $database->getArtifactsBysize([1, 2, 3]);
|
||||
if(count($artifacts) == 0) echo '<td colspan="4" class="none">'.NO_ARTIFACTS_AREA.'</td>';
|
||||
else
|
||||
{
|
||||
$rows = [];
|
||||
while($row = mysqli_fetch_array($arts)) {
|
||||
$query = mysqli_query($database->dblink,'SELECT x, y FROM `' . TB_PREFIX . 'wdata` WHERE `id` = ' . (int) $row['vref']);
|
||||
$coor2 = mysqli_fetch_assoc($query);
|
||||
$dist = $database->getDistance($coor['x'], $coor['y'], $coor2['x'], $coor2['y']);
|
||||
$rows[$dist] = $row;
|
||||
foreach($artifacts as $artifact){
|
||||
$coordinates = $database->getCoor($artifact['vref']);
|
||||
|
||||
$distance = $database->getDistance($village->coor['x'], $village->coor['y'], $coordinates['x'], $coordinates['y']);
|
||||
$rows[(string)$distance] = $artifact;
|
||||
}
|
||||
|
||||
ksort($rows);
|
||||
foreach($rows as $row) {
|
||||
$wref = $village->wid;
|
||||
$coor = $database->getCoor($wref);
|
||||
$wref2 = $row['vref'];
|
||||
$coor2 = $database->getCoor($wref2);
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span>';
|
||||
echo '<div class="info">';
|
||||
if($row['size'] == 1 && $row['type'] != 11){
|
||||
$reqlvl = 10;
|
||||
$effect = VILLAGE;
|
||||
}else{
|
||||
$reqlvl = $row['type'] != 11 ? 20 : 10;
|
||||
$effect = ACCOUNT;
|
||||
}
|
||||
echo '<div class="info">'.TREASURY.' <b>' . $reqlvl . '</b>, '.EFFECT.' <b>' . $effect . '</b>';
|
||||
echo '</div></td><td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="dist">'.$database->getDistance($coor['x'], $coor['y'], $coor2['x'], $coor2['y']).'</td>';
|
||||
echo '</tr>';
|
||||
|
||||
foreach($rows as $distance => $row) {
|
||||
echo '<tr>
|
||||
<td class="icon"><img class="artefact_icon_'.$row['type'].'" src="img/x.gif" alt="" title=""></td>
|
||||
<td class="nam">
|
||||
<a href="build.php?id='.$id.'&show='.$row['id'].'">'.$row['name'].'</a> <span class="bon">'.$row['effect'].'</span>
|
||||
<div class="info">';
|
||||
|
||||
$artifactInfo = Artifacts::getArtifactInfo($row);
|
||||
|
||||
echo '<div class="info">'.TREASURY.' <b>'.$artifactInfo['requiredLevel'] . '</b>, '.EFFECT.' <b>'.$artifactInfo['effectInfluence'].'</b>
|
||||
</div></td><td class="pla">
|
||||
<a href="karte.php?d='.$row['vref'].'&c='.$generator->getMapCheck($row['vref']).'">'.$database->getUserField($row['owner'], "username", 0).'</a>
|
||||
</td>
|
||||
<td class="dist">'.$distance.'</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-154
@@ -30,161 +30,27 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
//TODO: Merge this in a unique foreach
|
||||
$count = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "artefacts WHERE del = 0"), MYSQLI_ASSOC);
|
||||
$count = $count['Total'];
|
||||
if($count == 0) echo '<td colspan="4" class="none">'.NO_ARTIFACTS.'</td>';
|
||||
else
|
||||
{
|
||||
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 1 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 2 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 3 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 4 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
<?php
|
||||
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 5 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
<?php
|
||||
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 6 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
<?php
|
||||
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 7 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
<?php
|
||||
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 1 AND type = 8 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
<?php
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE type = 11 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>10</b>, '.EFFECT.' <b>'.VILLAGE.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
$artifactsArray = $database->getArtifactsBysize(1);
|
||||
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>10</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>
|
||||
|
||||
+20
-253
@@ -31,260 +31,27 @@
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
$count = mysqli_fetch_array(mysqli_query($database->dblink,"SELECT Count(*) as Total FROM " . TB_PREFIX . "artefacts WHERE del = 0"), MYSQLI_ASSOC);
|
||||
$count = $count['Total'];
|
||||
if($count == 0) {
|
||||
echo '<td colspan="4" class="none">'.NO_ARTIFACTS.'</td>';
|
||||
} else {
|
||||
//TODO: Merge this in a unique foreach
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 1 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 1 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
$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>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 2 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 2 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 3 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 3 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 4 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 4 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
<?php
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 5 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 5 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
<?php
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 6 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 6 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
<?php
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 2 AND type = 7 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 7 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr><td colspan="4"></td></tr>
|
||||
|
||||
<?php
|
||||
|
||||
unset($artefact);
|
||||
unset($row);
|
||||
$artefact = mysqli_query($database->dblink,"SELECT type, id, name, effect, vref, owner FROM `" . TB_PREFIX . "artefacts` WHERE size = 3 AND type = 8 AND del = 0");
|
||||
while($row = mysqli_fetch_array($artefact)) {
|
||||
echo '<tr>';
|
||||
echo '<td class="icon"><img class="artefact_icon_' . $row['type'] . '" src="img/x.gif" alt="" title=""></td>';
|
||||
echo '<td class="nam">';
|
||||
echo '<a href="build.php?id=' . $id . '&show='.$row['id'].'">' . $row['name'] . '</a> <span class="bon">' . $row['effect'] . '</span><div class="info">'.TREASURY.' <b>20</b>, '.EFFECT.' <b>'.ACCOUNT.'</b></div>';
|
||||
echo '</td>';
|
||||
echo '<td class="pla"><a href="karte.php?d=' . $row['vref'] . '&c=' . $generator->getMapCheck($row['vref']) . '">' . $database->getUserField($row['owner'], "username", 0) . '</a></td>';
|
||||
echo '<td class="al"><a href="allianz.php?aid=' . $database->getUserField($row['owner'], "alliance", 0) . '">' . $database->getAllianceName($database->getUserField($row['owner'], "alliance", 0)) . '</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
</tbody></table>
|
||||
|
||||
<?php
|
||||
|
||||
@@ -29,7 +29,11 @@ $artifactInfo = Artifacts::getArtifactInfo($artifact);
|
||||
<tr>
|
||||
<th><?php echo OWNER; ?></th>
|
||||
<td>
|
||||
<a href="spieler.php?uid=<?php echo $artifact['owner'];?>"><?php echo $database->getUserField($artifact['owner'], "username", 0);?></a>
|
||||
<?php if(($artifactOwnerUsername = $database->getUserField($artifact['owner'], "username", 0)) != "[?]"){?>
|
||||
<a href="spieler.php?uid=<?php echo $artifact['owner'];?>"><?php echo $artifactOwnerUsername; ?></a>
|
||||
<?php }else{?>
|
||||
<font color="grey"><span>[?]</span></font>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -38,7 +42,7 @@ $artifactInfo = Artifacts::getArtifactInfo($artifact);
|
||||
<?php if($database->checkVilExist($artifact['vref'])){?>
|
||||
<a href="karte.php?d=<?php echo $artifact['vref'];?>&c=<?php echo $generator->getMapCheck($artifact['vref']);?>"><?php echo $database->getVillageField($artifact['vref'], "name");?> </a>
|
||||
<?php }else{?>
|
||||
<span>[?]</span>
|
||||
<font color="grey"><span>[?]</span></font>
|
||||
<?php }?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -103,7 +107,13 @@ if(!empty($owners)){
|
||||
foreach($owners as $owner){
|
||||
?>
|
||||
<tr>
|
||||
<td><span class="none"><a href="spieler.php?uid=<?php echo $owner['uid'];?>"><?php echo $database->getUserField($owner['uid'], "username", 0);?></a></span></td>
|
||||
<td>
|
||||
<?php if(($artifactChronoOwnerUsername = $database->getUserField($owner['uid'], "username", 0)) != "[?]"){?>
|
||||
<span class="none"><a href="spieler.php?uid=<?php echo $owner['uid'];?>"><?php echo $artifactChronoOwnerUsername;?></a></span>
|
||||
<?php }else{?>
|
||||
<span class="none">[?]</span>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($database->checkVilExist($owner['vref'])){?>
|
||||
<span class="none"><a href="karte.php?d=<?php echo $owner['vref'];?>&c=<?php echo $generator->getMapCheck($owner['vref']);?>"><?php echo $database->getVillageField($owner['vref'], "name");?></a></span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$normalA = $database->getOwnArtefactInfoByType($village->wid,6);
|
||||
$largeA = $database->getOwnUniqueArtefactInfo($session->uid,6,2);
|
||||
$artifactsSum = $database->getArtifactsSumByKind($session->uid, $village->wid, 6);
|
||||
$GreatGranaryWarehouseBuildable = $artifactsSum['small'] > 0 || $artifactsSum['large'] > 0;
|
||||
|
||||
$mainbuilding = $building->getTypeLevel(15);
|
||||
$cranny = $building->getTypeLevel(23);
|
||||
@@ -130,10 +130,10 @@ if($wall == 0 && $wall1 == 0) {
|
||||
if((($warehouse == 0 && $warehouse1 == 0) || $warehouse == 20) && $mainbuilding >= 1 && $id != 39 && $id != 40) {
|
||||
include("avaliable/warehouse.tpl");
|
||||
}
|
||||
if((($greatwarehouse == 0 && $greatwarehouse1 == 0) || $greatwarehouse == 20) && $mainbuilding >= 10 && ($largeA['owner'] == $session->uid || $normalA['vref'] == $village->wid || $village->natar==1) && ($id != 39 && $id != 40)) {
|
||||
if((($greatwarehouse == 0 && $greatwarehouse1 == 0) || $greatwarehouse == 20) && $mainbuilding >= 10 && ($GreatGranaryWarehouseBuildable || $village->natar == 1) && ($id != 39 && $id != 40)) {
|
||||
include("avaliable/greatwarehouse.tpl");
|
||||
}
|
||||
if((($greatgranary == 0 && $greatgranary1 == 0) || $greatgranary == 20) && $mainbuilding >= 10 && ($largeA['owner'] == $session->uid || $normalA['vref'] == $village->wid || $village->natar==1) && ($id != 39 && $id != 40)) {
|
||||
if((($greatgranary == 0 && $greatgranary1 == 0) || $greatgranary == 20) && $mainbuilding >= 10 && ($GreatGranaryWarehouseBuildable || $village->natar == 1) && ($id != 39 && $id != 40)) {
|
||||
include("avaliable/greatgranary.tpl");
|
||||
}
|
||||
if((($trapper == 0 && $trapper1 == 0) || $trapper == 20) && $rallypoint >= 1 && $session->tribe == 3 && $id != 39 && $id != 40) {
|
||||
@@ -232,10 +232,10 @@ if($id != 39 && $id != 40) {
|
||||
if($rallypoint == 0 && $session->tribe == 3 && $trapper == 0 ) {
|
||||
include("soon/trapper.tpl");
|
||||
}
|
||||
if($mainbuilding < 10 && $warehouse < 10 && $village->capital == 0 && $largeA['owner'] == $session->uid || $normalA['vref'] == $village->wid ) {
|
||||
if($mainbuilding < 10 && $warehouse < 10 && $village->capital == 0 && $GreatGranaryWarehouseBuildable) {
|
||||
include("soon/greatwarehouse.tpl");
|
||||
}
|
||||
if($mainbuilding < 10 && $granary < 10 && $village->capital == 0 && $largeA['owner'] == $session->uid || $normalA['vref'] == $village->wid ) {
|
||||
if($mainbuilding < 10 && $granary < 10 && $village->capital == 0 && $GreatGranaryWarehouseBuildable) {
|
||||
include("soon/greatgranary.tpl");
|
||||
}
|
||||
if($hero == 0 && ($mainbuilding <= 2 || $rallypoint == 0)){
|
||||
|
||||
Reference in New Issue
Block a user