List non-empty user web directories

This commit is contained in:
Blade of Darkness 2021-06-17 16:49:58 +02:00
parent 99b9d67af0
commit 55f641afc4
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,9 @@
print "<!-- Begin autogen userdir list -->";
print "<ul style='list-style: none; margin-left: -40px;'>";
foreach (glob("/home/*") as $user):
if (is_dir($user . "/public_html") && (file_exists($user . "/public_html/index.html") || file_exists($user . "/public_html/index.php")))
if (is_dir($user . "/public_html"))
if (file_exists($user . "/public_html/index.html") || file_exists($user . "/public_html/index.php"))
if (!file_exists($user . "/public_html/coming_soon"))
{
$user = basename($user);
print"<li><a href='$site_root/~$user/'>~$user</a></li>";