Browse Source

user listing

master
Linux User 1 year ago
parent
commit
759c1164ee
  1. 1
      header.html
  2. 19
      src/users.php

1
header.html

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
<a href="https://wiki.cutebunni.es/ul/">Wiki</a>
<a href="/coc.php">Code of Conduct</a>
<a href="https://git.unix.lgbt">Git</a>
<a href="/users.php">User sites</a>
</nav>
</header>
<main>

19
src/users.php

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
<p>
This page lists the users that has a public HTML folder.
</p>
<h3>Users</h3>
<ul>
<?php
chdir("/pub/");
$htmldirs = glob("*/http", GLOB_ONLYDIR);
foreach($htmldirs as $userdir)
{
$username = explode("/", $userdir, 2)[0];
echo "<li><a href=\"/~" . $username . "\">~" . $username . "</a></li>";
}
?>
</ul>
Loading…
Cancel
Save