2022-06-22 01:29:21 +00:00
<! DOCTYPE html >
< html lang = " en " >
< head >
< meta charset = " UTF-8 " >
< link rel = " stylesheet " href = " /style.css " >
2022-06-23 18:02:32 +00:00
< title > Users | ~ vern </ title >
2022-06-22 01:29:21 +00:00
</ head >
< body >
2022-06-27 07:54:36 +00:00
< ? php
$total = $on = 0 ;
$list = '' ;
$users = explode ( ' ' , shell_exec ( 'users /sshfs/var/run/utmp' ));
$handle = opendir ( '/sshfs/home' );
while (( $subdir = readdir ( $handle )) !== false ) {
if ( $subdir != '.' && $subdir != '..' ) {
$online = 'false' ;
foreach ( $users as $val )
if ( trim ( $val ) == $subdir ) {
$online = 'true' ;
$on ++ ;
}
2022-06-27 10:26:39 +00:00
$list .= ' <li online="' . $online . '">' ;
if ( is_readable ( '/sshfs/home/' . $subdir . '/public_html/index.html' ))
$list .= " <a href='// { $subdir } .vern.cc'> { $subdir } </a> " ;
else $list .= $subdir ;
$list .= " </li> \n " ;
2022-06-27 07:54:36 +00:00
$total ++ ;
}
}
closedir ( $handle );
?>
2022-06-22 01:29:21 +00:00
<!-- #include file="nav" -->
2022-06-22 18:01:36 +00:00
< div class = h >< h1 id = users > Users </ h1 > < a aria - hidden = true href = #users>#users</a></div>
2022-06-27 07:56:39 +00:00
< 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>
2022-06-22 01:29:21 +00:00
< ul userlist >
2022-06-27 07:54:36 +00:00
< ? php echo $list ; ?>
2022-06-22 01:29:21 +00:00
</ ul >
<!-- #include file="footer" -->
</ body >
</ html >