bigly-chat/docs/stats.php

43 lines
851 B
PHP
Raw Normal View History

2025-01-23 20:00:36 -05:00
<?php
require(__DIR__ . "/../libs/page.php");
require(__DIR__ . "/../libs/form.php");
require(__DIR__ . "/../libs/comment.php");
2025-01-29 00:18:30 -05:00
function cmp($a, $b) {
if ($a == $b) {
return 0;
}
return ($a > $b) ? -1 : 1;
}
2025-01-23 20:00:36 -05:00
page_header();
function get_handler() {
2025-02-03 08:04:51 -05:00
$api = file_get_contents("https://nbg.dervland.net/node/top?ref=" . $_GET['ref']);
2025-02-03 07:13:47 -05:00
$pr = json_decode($api);
2025-01-23 20:04:50 -05:00
foreach ($pr as $usern => $rr) { ?>
2025-01-23 20:00:36 -05:00
<div class='comment'>
2025-01-24 02:52:28 -05:00
<div class="avatar">
<img src="/pfp/<?php echo $usern ?>.png" class="avatar-img">
<div>
<div><b>
2025-01-24 02:53:22 -05:00
<a class="link" href="/user.php?id=<?php echo $usern ?>">
2025-01-24 02:52:28 -05:00
<?php echo $usern ?>
</a>
</b>
</div>
</div>
</div>
2025-02-03 07:13:47 -05:00
<div><b>Power</b>: <?php echo $rr ?></div>
2025-01-23 20:00:36 -05:00
</div>
<?php }
}
get_handler();
?>
<?php
page_footer();
?>