forked from wille/relayawards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
top.php
38 lines (34 loc) · 1.18 KB
/
top.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
const AMOUNT = 100;
const CACHE_FILE = "cache/cache.txt";
$title = "Top " . AMOUNT . " - RelayAwards";
require_once "awards/award.php";
require_once "inc/utils.php";
require_once "header.php";
?>
<div class="row">
<div class="container">
<table class="table">
<thead>
<tr>
<th>Rank</th>
<th>Nickname</th>
<th>Uptime</th>
<th>Bandwidth</th>
<th>Country</th>
<th>Awards</th>
</tr>
</thead>
<tbody>
<?php
$relays = json_decode(file_get_contents(CACHE_FILE), true);
table_relays($relays, 0, AMOUNT, false, true);
?>
</tbody>
</table>
<?php echo "Last updated " . getTimeSince(file_get_contents("cache/time.txt")) . " ago"; ?>
</div>
</div>
</div>
</body>
</html>