This commit is contained in:
iopietro
2018-05-19 00:02:39 +02:00
+23 -22
View File
@@ -1,29 +1,30 @@
<?php
$textArray = ["Natars Spawn", "WW Spawn", "WW Plan Spawn"];
$newTextArray = ["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)];
?>
<h5><img src="img/en/t2/newsbox2.gif" alt="newsbox 2"></h5>
<div class="news">
<table width="100%">
<?php for($i = 0; $i < count($spawnTimeArray); $i++){ ?>
<tr>
<td><b>Natars spawn</b></td>
<td><b>
<?php
if($areSpawned[$i]) echo $newTextArray[$i];
else echo $textArray[$i];
?></b></td>
<td><b>: <font color="Red"><?php
$time = strtotime(START_DATE); // Date of server installation (the countdown for the appearance of Natars begins)
$interval = NATARS_SPAWN_TIME * 24 * 3600; // The number of seconds in the number of days that is set for the appearance of Natars
$time += $interval;
echo date('m/d/Y', $time); ?></font></b></td>
</tr>
<tr>
<td><b>WW spawn</b></td>
<td><b>: <font color="Red"><?php
$time = strtotime(START_DATE); // Date of server installation (the countdown for the appearance of Natars begins)
$interval = NATARS_WW_SPAWN_TIME * 24 * 3600; // The number of seconds in the number of days that is set for the appearance of WW village
$time += $interval;
echo date('m/d/Y', $time); ?></font></b></td>
</tr>
<tr>
<td><b>WW Plan spawn</b></td>
<td><b>: <font color="Red"><?php
$time = strtotime(START_DATE); // Date of server installation (the countdown for the appearance of Natars begins)
$interval = NATARS_WW_BUILDING_PLAN_SPAWN_TIME * 24 * 3600; // The number of seconds in the number of days that is set for the appearance of Ancient Construction Plan
$time += $interval;
echo date('m/d/Y', $time); ?></font></b></td>
if($areSpawned[$i]) echo "Released";
else
{
$time = strtotime(START_DATE); // Date of server started (the countdown for the appearance of Natars begins)
$interval = $spawnTimeArray[$i] * 86400; // The number of seconds in the number of days that is set for the appearance of Natars
echo date('d.m.Y', $time + $interval);
}
?></font></b></td>
</tr>
<?php } ?>
</table>
</div>
</div>