示例#1
0
文件: deaths.php 项目: l04d/ZnoteAAC
<?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>";
示例#2
0
文件: killers.php 项目: l04d/ZnoteAAC
            echo "<td width='35%'><a href='characterprofile.php?name=" . $last['killed_by'] . "'>" . $last['killed_by'] . "</a></td>";
            echo "<td width='30%'>" . getClock($last['time'], true) . "</td>";
            echo "<td width='35%'><a href='characterprofile.php?name=" . $last['victim'] . "'>" . $last['victim'] . "</a></td>";
            echo '</tr>';
        }
        ?>
</table>
<?php 
    } else {
        echo 'No player kills exist.';
    }
} else {
    if ($config['TFSVersion'] == 'TFS_03') {
        $cache = new Cache('engine/cache/killers');
        if ($cache->hasExpired()) {
            $deaths = fetchLatestDeaths_03(30, true);
            $cache->setContent($deaths);
            $cache->save();
        } else {
            $deaths = $cache->load();
        }
        if ($deaths && !empty($deaths)) {
            ?>
	
		<h1>Latest Killers</h1>
		<table id="deathsTable" class="table table-striped">
			<tr class="yellow">
				<th>Killer</th>
				<th>Time</th>
				<th>Victim</th>
			</tr>