Users ordered list

Signed-off-by: Aleksandar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
Skylar "The Cobra" Widulski 2022-06-28 07:04:12 -04:00
parent 0ef9aae281
commit 52eb79f515
Signed by: cobra
GPG Key ID: 4FD8F812083FF6F9
1 changed files with 9 additions and 7 deletions

View File

@ -13,14 +13,16 @@
$handle = opendir('/sshfs/home');
while (($subdir = readdir($handle)) !== false) {
$online = '<b><span class=';
if ($subdir != '.' && $subdir != '..') {
$online='false';
foreach ($users as $val)
if (trim($val) == $subdir) {
$online='true';
$online .= 'green';
$on++;
}
$list .= ' <li online="' . $online . '">';
} else $online .= 'red';
$online .= '>•</span></b> ';
$list .= ' <li>' . $online;
if (is_readable('/sshfs/home/' . $subdir . '/public_html/index.html'))
$list .= "<a href='//$subdir.vern.cc'>$subdir</a>";
else $list .= $subdir;
@ -32,10 +34,10 @@
?>
<!--#include file="nav" -->
<div class=h><h1 id=users>Users</h1> <a aria-hidden=true href=#users>#users</a></div>
<p>This is a list of all ~vern users, and whether they are online (<b><span class=green></span></b>) or not (<b><span class=red></span></b>) in order of least to greatest UID. There are currently a total of <?php echo $total; ?> members, <?php echo $on; ?> of which <?php echo $on !== 1 ? are : is ?> online.</p>
<ul userlist>
<p>This is a list of all ~vern users, and whether they are online (<b><span class=green></span></b>) or not (<b><span class=red></span></b>) in order of joining. There are currently a total of <?php echo $total; ?> members, <?php echo $on; ?> of which <?php echo $on !== 1 ? are : is ?> online.</p>
<ol>
<?php echo $list; ?>
</ul>
</ol>
<!--#include file="footer" -->
</body>
</html>