www/includes/users.php

18 lines
571 B
PHP
Raw Normal View History

2019-07-07 01:39:54 +00:00
<?php
2021-11-18 12:36:15 +00:00
$html_skel='/etc/skel/public_html/index.html';
2019-07-07 01:39:54 +00:00
print "<!-- Begin autogen userdir list -->";
print "<ul style='list-style: none; margin-left: -40px;'>";
2021-11-18 12:36:15 +00:00
foreach (glob("/home/*") as $userpath):
if (is_dir("$userpath/public_html"))
2021-11-18 16:13:06 +00:00
{
$user = basename($userpath);
2021-12-14 09:01:53 +00:00
if(sha1_file($html_skel) == sha1_file("$userpath/public_html/index.html") || count(scandir("$userpath/public_html")) == 2)
2021-11-18 16:13:06 +00:00
print"<li>~$user</li>\n";
else
print"<li><a href='$site_root/~$user/'>~$user</a></li>\n";
}
2019-07-07 01:39:54 +00:00
endforeach;
2019-07-07 01:47:47 +00:00
print "</ul></div>
<!-- End Autgen userdir list -->";
2019-07-07 01:39:54 +00:00
?>