Merge pull request #163 from Impulss/patch-2

Update killers.php
This commit is contained in:
Stefan A. Brannfjell 2014-09-12 11:41:40 +02:00
commit 513cb4ded0

View File

@ -85,7 +85,6 @@ if ($latests) {
} else echo 'No player kills exist.'; } else echo 'No player kills exist.';
} else if ($config['TFSVersion'] == 'TFS_03') { } else if ($config['TFSVersion'] == 'TFS_03') {
/////////
$cache = new Cache('engine/cache/killers'); $cache = new Cache('engine/cache/killers');
if ($cache->hasExpired()) { if ($cache->hasExpired()) {
$deaths = fetchLatestDeaths_03(30, true); $deaths = fetchLatestDeaths_03(30, true);
@ -94,25 +93,25 @@ if ($latests) {
} else { } else {
$deaths = $cache->load(); $deaths = $cache->load();
} }
if ($deaths && !empty($deaths)) {
?> ?>
<h1>Latest Killers</h1>
<h1>Latest Killers</h1> <table id="deathsTable" class="table table-striped">
<table id="deathsTable" class="table table-striped"> <tr class="yellow">
<tr class="yellow"> <th>Killer</th>
<th>Killer</th> <th>Time</th>
<th>Time</th> <th>Victim</th>
<th>Victim</th> </tr>
</tr> <?php foreach ($deaths as $death) {
<?php foreach ($deaths as $death) { echo '<tr>';
echo '<tr>'; echo "<td><a href='characterprofile.php?name=". $death['killed_by'] ."'>". $death['killed_by'] ."</a></td>";
echo "<td><a href='characterprofile.php?name=". $death['killed_by'] ."'>". $death['killed_by'] ."</a></td>"; echo "<td>". getClock($death['time'], true) ."</td>";
echo "<td>". getClock($death['time'], true) ."</td>"; echo "<td>At level ". $death['level'] .": <a href='characterprofile.php?name=". $death['victim'] ."'>". $death['victim'] ."</a></td>";
echo "<td>At level ". $death['level'] .": <a href='characterprofile.php?name=". $death['victim'] ."'>". $death['victim'] ."</a></td>"; echo '</tr>';
echo '</tr>'; } ?>
} ?> </table>
</table> <?php
} else echo 'No player deaths exist.';
<?php
/////////
} }
include 'layout/overall/footer.php'; ?> include 'layout/overall/footer.php'; ?>