tilde/avatars/index.php

37 lines
1.2 KiB
PHP

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://tilde.team/css/hacker.css">
<title>tilde.team avatars</title>
</head>
<body>
<div class="container">
<h1>avatars</h1>
<p>change your ~/public_html/avatar.png from the default to appear here</p>
<p>should be a png, square, and at least 128x128px</p>
<hr>
<?php foreach (glob("/home/*") as $user) {
$user = basename($user);
$avatar = "/home/$user/public_html/avatar.png";
// sha1_file("/etc/skel/public_html/avatar.png")
if (!is_file($avatar) || sha1_file($avatar) == "55d1794a79b7665c16add961817f4ab3abed4734") continue;
?>
<p>
<a href="/~<?=$user?>/">
<strong>~<?=$user?></strong><br>
<img height="128" width="128" src="/~<?=$user?>/avatar.png">
</a>
</p>
<?php } ?>
</div>
</body>
</html>