mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Importing Znote AAC 1.5_SVN rev 168 to github.
This commit is contained in:
39
deaths.php
Normal file
39
deaths.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
|
||||
$cache = new Cache('engine/cache/deaths');
|
||||
if ($cache->hasExpired()) {
|
||||
|
||||
if ($config['TFSVersion'] == 'TFS_02' || $config['TFSVersion'] == 'TFS_10') {
|
||||
$deaths = fetchLatestDeaths();
|
||||
} else if ($config['TFSVersion'] == 'TFS_03') {
|
||||
$deaths = fetchLatestDeaths_03(30);
|
||||
}
|
||||
$cache->setContent($deaths);
|
||||
$cache->save();
|
||||
} else {
|
||||
$deaths = $cache->load();
|
||||
}
|
||||
if ($deaths) {
|
||||
?>
|
||||
<h1>Latest Deaths</h1>
|
||||
<table id="deathsTable" class="table table-striped">
|
||||
<tr class="yellow">
|
||||
<th>Victim</th>
|
||||
<th>Time</th>
|
||||
<th>Killer</th>
|
||||
</tr>
|
||||
<?php foreach ($deaths as $death) {
|
||||
echo '<tr>';
|
||||
echo "<td>At level ". $death['level'] .": <a href='characterprofile.php?name=". $death['victim'] ."'>". $death['victim'] ."</a></td>";
|
||||
echo "<td>". getClock($death['time'], true) ."</td>";
|
||||
if ($death['is_player'] == 1) echo "<td>Player: <a href='characterprofile.php?name=". $death['killed_by'] ."'>". $death['killed_by'] ."</a></td>";
|
||||
else if ($death['is_player'] == 0) {
|
||||
if ($config['TFSVersion'] == 'TFS_03') echo "<td>Monster: ". ucfirst(str_replace("a ", "", $death['killed_by'])) ."</td>";
|
||||
else echo "<td>Monster: ". ucfirst($death['killed_by']) ."</td>";
|
||||
}
|
||||
else echo "<td>". $death['killed_by'] ."</td>";
|
||||
echo '</tr>';
|
||||
} ?>
|
||||
</table>
|
||||
<?php
|
||||
} else echo 'No deaths exist.';
|
||||
include 'layout/overall/footer.php'; ?>
|
Reference in New Issue
Block a user