Add user counter

This commit is contained in:
g1n 2022-06-28 07:13:09 +00:00
parent 3ff1187fec
commit e2afdbfb90
1 changed files with 4 additions and 1 deletions

View File

@ -8,13 +8,16 @@
<hr>
<h3>Our users</h3>
<?php
$total_users = 0;
if ($opendirectory = opendir('/home')) {
while (($user = readdir($opendirectory)) !== false) {
if ($user[0] != '.' and file_exists("/home/$user/public_html")) {
if ($user[0] != '.' and $user != "tcoin" and file_exists("/home/$user/public_html")) {
echo "<p>~&gt; <a href=\"/~$user\">$user</a></p>";
$total_users+=1;
}
}
closedir($opendirectory);
echo "<p>Users in total: 0x" . dechex($total_users) . " (" . $total_users . ")</p>";
}
?>
<hr>