add userpage list
This commit is contained in:
parent
68326f00c9
commit
f2e198afa5
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
||||
<title>South London</title>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='/main.css'>
|
||||
<link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'>
|
||||
</head>
|
||||
<body>
|
||||
<img src="/logo.svg" class="title">
|
||||
<div class="links">
|
||||
<span class="span1">
|
||||
<a href="/">Home</a>
|
||||
</span>
|
||||
<span class="span2">
|
||||
<a href="/pages/signup/">Sign Up</a></span>
|
||||
<span class="span3">
|
||||
<a href="/pages/conduct/">Code Of Conduct</a></span>
|
||||
<span class="span4">
|
||||
<a href="https://tildegit.org/southlondon">Git</a></span>
|
||||
<span class="span5">
|
||||
<a href="/pages/extras">More</a></span>
|
||||
</div>
|
||||
<main>
|
||||
<div id="userpages" class="userpages-list">
|
||||
<?php
|
||||
$usercount = 0;
|
||||
foreach (glob("/home/*/public_html", GLOB_ONLYDIR) as $user):
|
||||
if (
|
||||
(
|
||||
// make sure we have an index page
|
||||
!is_file("$user/index.html")
|
||||
&& !is_file("$user/index.htm")
|
||||
&& !is_file("$user/index.cgi")
|
||||
&& !is_file("$user/index.php")
|
||||
)
|
||||
|| (
|
||||
in_array(
|
||||
sha1_file("$user/index.html"),
|
||||
[
|
||||
"9ea0df3015d624f8289b1d6b8606f4257aac8ab5"
|
||||
]
|
||||
)
|
||||
)
|
||||
) continue;
|
||||
$user = basename(dirname($user));
|
||||
$usercount++; ?>
|
||||
<li><a href="/~<?=$user?>/" class="userpage-item">~<?=$user?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue