This commit is contained in:
iopietro
2018-06-09 13:15:07 +02:00
2 changed files with 55 additions and 10 deletions
+3 -4
View File
@@ -1,6 +1,5 @@
<?php
$textArray = ["Natars Spawn", "WW Spawn", "WW Plan Spawn"];
$newTextArray = ["Natars Tribe", "WW Village", "Construction Plan"];
$textArray = [["Natars Spawn", "WW Spawn", "WW Plan Spawn"], ["Natars Tribe", "WW Village", "Construction Plan"]];
$spawnTimeArray = [NATARS_SPAWN_TIME, NATARS_WW_SPAWN_TIME, NATARS_WW_BUILDING_PLAN_SPAWN_TIME];
$areSpawned = [$database->areArtifactsSpawned(), $database->areWWVillagesSpawned(), $database->areArtifactsSpawned(true)];
@@ -12,8 +11,8 @@ $areSpawned = [$database->areArtifactsSpawned(), $database->areWWVillagesSpawned
<tr>
<td><b>
<?php
if($areSpawned[$i]) echo $newTextArray[$i];
else echo $textArray[$i];
if($areSpawned[$i]) echo $textArray[1][$i];
else echo $textArray[0][$i];
?></b></td>
<td><b>: <font color="Red"><?php
if($areSpawned[$i]) echo "Released";
+52 -6
View File
@@ -1,11 +1,17 @@
<?php
#################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Filename overview.tpl ##
## Project: TravianZ ##
## Version: 01.09.2013 ##
## Filename overview.php ##
## Developed by: Dzoki ##
## License: TravianX Project ##
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
## Fixed by: Shadow / Skype : cata7007 ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2013. All rights reserved. ##
## URLs: http://travian.shadowss.ro ##
## Source code: http://github.com/Shadowss/TravianZ/ ##
## ##
#################################################################################
@@ -162,11 +168,11 @@ include("menu2.tpl");
</table><table cellpadding="1" cellspacing="1" id="villages">
<thead>
<tr>
<th colspan="3">Villages</th>
<th colspan="4">Villages</th>
</tr>
<tr>
<td>Name</td>
<td>Oasis</td>
<td>Inhabitants</td>
<td>Coordinates</td>
</tr>
@@ -178,7 +184,47 @@ include("menu2.tpl");
if($vil['capital'] == 1) {
echo "<span class=\"none3\"> (capital)</span>";
}
echo "</td>";
echo "<td class=\"oases\"></td>";
// OASIS PART - must to be activated from install part
$prefix = "".TB_PREFIX."odata";
$uid = $_GET['uid']; $wref = $vil['wref'];
$sql = mysqli_query("SELECT * FROM $prefix WHERE owner = $uid AND conqured = $wref");
while($row = mysqli_fetch_array($sql)){
$type = $row["type"];
switch($type) {
case 1:
case 2:
echo "<img class='r1' src='img/x.gif' title='Lumber'>";
break;
case 3:
echo "<img class='r1' src='img/x.gif' title='Lumber'> <img class='r4' src='img/x.gif' title='Crop'>";
break;
case 4:
case 5:
echo "<img class='r2' src='img/x.gif' title='Clay'>";
break;
case 6:
echo "<img class='r2' src='img/x.gif' title='Clay'> <img class='r4' src='img/x.gif' title='Crop'>";
case 7:
case 8:
echo "<img class='r3' src='img/x.gif' title='Iron'>";
break;
case 9:
echo "<img class='r3' src='img/x.gif' title='Iron'> <img class='r4' src='img/x.gif' title='Crop'>";
break;
case 10:
case 11:
case 12:
echo "<img class='r4' src='img/x.gif' title='Crop'>";
break;
}
}
// OASIS PART - must to be activated from install part
echo "</td>";
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
echo "<div class=\"cox\">(".$coor['x']."</div><div class=\"pi\">|</div><div class=\"coy\">".$coor['y'].")</div></td></tr>";
}