Add user counter
This commit is contained in:
parent
3ff1187fec
commit
e2afdbfb90
|
@ -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>~> <a href=\"/~$user\">$user</a></p>";
|
||||
$total_users+=1;
|
||||
}
|
||||
}
|
||||
closedir($opendirectory);
|
||||
echo "<p>Users in total: 0x" . dechex($total_users) . " (" . $total_users . ")</p>";
|
||||
}
|
||||
?>
|
||||
<hr>
|
||||
|
|
Loading…
Reference in New Issue