178 lines
5.8 KiB
PHP
178 lines
5.8 KiB
PHP
<?php
|
|
|
|
$BOT_USERS = [
|
|
"Calypso",
|
|
"MerryBot",
|
|
"MathBot",
|
|
"GPT Assistant",
|
|
"Tatsu",
|
|
"Automated_Squirrel",
|
|
"IceCreamBeta",
|
|
"Dictionary",
|
|
"NotSoBot",
|
|
"Kainé",
|
|
"Birdbot",
|
|
"IceCreamBot",
|
|
"EasyPoll",
|
|
"TeXit",
|
|
"FredBoat♪♪",
|
|
"Ordis",
|
|
"Jikkeogi ⁞ 찌꺼기",
|
|
"Linux RSS Bot",
|
|
"Yappy, the GitLab Monitor",
|
|
"QuizBot",
|
|
"OkiDoki",
|
|
];
|
|
|
|
/**
|
|
* Returns a list of users on the server with "public_html" folders
|
|
* @return array Array of usernames
|
|
*/
|
|
function getUsers(): array
|
|
{
|
|
$usernames = array();
|
|
|
|
// Get all users in /home directory
|
|
$users = glob("/home/*");
|
|
|
|
foreach ($users as $user) {
|
|
if (is_dir($user)) {
|
|
if (file_exists("$user/public_html")) {
|
|
$username = basename($user);
|
|
$usernames[] = $username;
|
|
}
|
|
}
|
|
}
|
|
|
|
return $usernames;
|
|
}
|
|
|
|
/**
|
|
* Get the member list from the Discord widget API
|
|
* @return mixed Array of members
|
|
*/
|
|
function getDiscordWidget(): mixed
|
|
{
|
|
$json = json_decode(file_get_contents("https://discord.com/api/guilds/445821876183367680/widget.json"));
|
|
return $json->members;
|
|
}
|
|
|
|
// Execute the function and display results
|
|
$usernames = getUsers();
|
|
$members = getDiscordWidget();
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<title>frzn.dev</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
<link rel="stylesheet" href="/assets/master.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="page-container">
|
|
<div>
|
|
<div class="header">
|
|
<pre> _______ _____
|
|
| ___|.----.-----.-----.-----.-----.| \.-----.--.--.
|
|
| ___|​| _| _ |-- __| -__| |​| -- | -__| | |
|
|
|___| |__| |_____|_____|_____|__|__|​|_____/|_____|\___/</pre>
|
|
</div>
|
|
<div class="section">
|
|
<p><b>Members</b></p>
|
|
<ul class="members">
|
|
<?= count($usernames) == 0 ? "<li>Error Retrieving Users</li>" : "" ?>
|
|
<?php foreach ($usernames as $username) { ?>
|
|
<li><a href="/~<?= $username ?>">~<?= $username ?></a><?= $username == "amr" ? "*" : "" ?></li>
|
|
<?php } ?>
|
|
</ul>
|
|
<small>
|
|
* owner & admin
|
|
</small>
|
|
</div>
|
|
<div class="section">
|
|
<p><b>Services</b></p>
|
|
<table class="services">
|
|
<tr>
|
|
<td><a href="https://git.frzn.dev">git.frzn.dev</a></td>
|
|
<td>Forgejo<sup>1</sup></td>
|
|
<td>A lightweight git server (which is better than Gogs)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="https://p.frzn.dev">p.frzn.dev</a></td>
|
|
<td>fiche</td>
|
|
<td>A command line pastebin (similar to termbin)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="https://pb.frzn.dev">pb.frzn.dev</a></td>
|
|
<td>PrivateBin</td>
|
|
<td>A minimalist, open source online pastebin</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="https://bitwarden.frzn.dev/">bitwarden.frzn.dev</a></td>
|
|
<td>Vaultwarden<sup>1</sup></td>
|
|
<td>A Bitwarden-compatible server written in Rust</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="https://snowflake.torproject.org/">Snowflake</a></td>
|
|
<td></td>
|
|
<td>A web proxy server</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="https://crypt.frzn.dev">crypt.frzn.dev</a></td>
|
|
<td>CryptPad</td>
|
|
<td>An open-source web-based encrypted suite of realtime collaborative editors</td>
|
|
</tr>
|
|
<tr>
|
|
<td>frzn.dev:64738</td>
|
|
<td>Mumble<sup>1,2</sup></td>
|
|
<td>A VoIP server</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a href="https://irc.frozenelectronics.ca:8088/">frzn.dev:6697/6667</a></td>
|
|
<td>ZNC<sup>1</sup></td>
|
|
<td>An IRC bouncer</td>
|
|
</tr>
|
|
</table>
|
|
<small>
|
|
<sup>1</sup> Only available for existing members<br>
|
|
<sup>2</sup> Not running 24/7
|
|
</small>
|
|
</div>
|
|
<div class="section">
|
|
<p><b>System Info</b></p>
|
|
<table class="system-info">
|
|
<tr>
|
|
<td>time:</td>
|
|
<td><?= gmdate("l, j F Y g:i:s A (e)") ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>os:</td>
|
|
<td>Ubuntu GNU/Linux 24.04 (LTS)</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="sidebar">
|
|
<p><b>Online Members</b></p>
|
|
<div class="indent">
|
|
<ul class="discord-widget">
|
|
<?php foreach ($members as $member) { ?>
|
|
<?php if (!in_array($member->username, $BOT_USERS)) { ?>
|
|
<li><?= $member->username ?></li>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<hr>
|
|
(c) frzn.dev 2018 - <?= date('Y') ?> / design and "backend" by <a href="/~floppy">~floppy</a>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|