feat: add active users and update user list style

This commit is contained in:
iodomi
2026-06-22 16:01:47 +02:00
parent 49beaa601a
commit a9dd0ab799
3 changed files with 96 additions and 10 deletions

View File

@@ -20,8 +20,26 @@ include 'header.php';
$slogans = file("slogans.txt");
$slogan = $slogans[rand(0, count($slogans) - 1)];
$activeUsers = json_decode(file_get_contents('/opt/html/online.json'), true);
?>
<pre class="scroll">
<h3>Użytkownicy online: <?php
if (!empty($activeUsers)) {
echo '<marquee scrollamount="3" behavior="alternate">';
foreach ($activeUsers as $user) {
$username = htmlspecialchars($user);
echo "<a href='/~$username'>$username</a> &nbsp;";
}
echo '</marquee>';
} else {
echo "/dev/null";
}
?></h3>
</pre>
<pre class="ascii">
/$$ /$$ /$$
| $$ | $$ | $$