bigly-chat/docs/stats.php

53 lines
1,001 B
PHP
Raw Permalink Normal View History

2025-01-23 20:00:36 -05:00
<?php
2025-02-05 01:27:45 -05:00
require(__DIR__ . "/../libs/page.php");
require(__DIR__ . "/../libs/form.php");
require(__DIR__ . "/../libs/comment.php");
function cmp($a, $b)
{
if ($a == $b) {
return 0;
}
return ($a > $b) ? -1 : 1;
}
page_header();
?>
<div>
<a class="form-button" href="?username=<?php echo $username ?>">Local</a>
<a class="form-button" href="?">Global</a>
</div>
<?php
function get_handler()
{
2025-02-05 01:30:47 -05:00
$api = file_get_contents("https://nbg.dervland.net/node/top?ref=" . $_GET['username']);
2025-02-05 01:27:45 -05:00
$pr = json_decode($api);
foreach ($pr as $usern => $rr) { ?>
<div class='comment'>
<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-02-05 01:27:45 -05:00
<?php echo $usern ?>
2025-01-24 02:52:28 -05:00
</a>
2025-02-05 01:27:45 -05:00
</b>
</div>
</div>
</div>
<div><b>Power</b>: <?php echo $rr ?></div>
</div>
<?php }
}
get_handler();
2025-01-23 20:00:36 -05:00
?>
2025-02-05 01:27:45 -05:00
2025-01-23 20:00:36 -05:00
<?php
2025-02-05 01:27:45 -05:00
page_footer();
2025-01-23 20:00:36 -05:00
?>