Compare commits
4 commits
discord-in
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
69e9d63be7 |
|||
|
c61b471529 |
|||
|
9fda9df4b6 |
|||
|
d2375beed6 |
2 changed files with 120 additions and 150 deletions
|
|
@ -9,6 +9,10 @@
|
||||||
--links: #89b4fa;
|
--links: #89b4fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
height: 98%;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
|
|
@ -49,10 +53,6 @@ li:before {
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.discord-widget > li::before {
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
p,
|
p,
|
||||||
ul,
|
ul,
|
||||||
pre {
|
pre {
|
||||||
|
|
@ -64,6 +64,14 @@ pre {
|
||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto max-content;
|
||||||
|
grid-template-rows: 1fr;
|
||||||
|
grid-column-gap: 0px;
|
||||||
|
grid-row-gap: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.section {
|
.section {
|
||||||
min-width: 20em;
|
min-width: 20em;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
|
|
@ -81,6 +89,10 @@ ul.members li:before {
|
||||||
content: none;
|
content: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.members li.error {
|
||||||
|
color: lightcoral
|
||||||
|
}
|
||||||
|
|
||||||
ul.sidebar-links li:before {
|
ul.sidebar-links li:before {
|
||||||
content: ">";
|
content: ">";
|
||||||
}
|
}
|
||||||
|
|
@ -131,11 +143,9 @@ table.system-info tr td:first-child {
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-container {
|
.page-container {
|
||||||
|
min-height: 100%;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 250px;
|
grid-template-rows: auto 1fr auto;
|
||||||
grid-template-rows: 1fr;
|
|
||||||
grid-column-gap: 0;
|
|
||||||
grid-row-gap: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-container > div {
|
.page-container > div {
|
||||||
|
|
@ -143,24 +153,16 @@ table.system-info tr td:first-child {
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-container > div.sidebar {
|
.page-container > div.sidebar {
|
||||||
border-left: 2px solid var(--foreground);
|
border-left: 2px solid gray;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer hr {
|
.footer hr {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 2px solid var(--foreground);
|
border-top: 2px solid gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
small {
|
small {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.indent {
|
|
||||||
padding-left: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sidebar li.offline {
|
|
||||||
opacity: 80%;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
86
index.php
86
index.php
|
|
@ -1,34 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$BOT_USERS = [
|
function getUsers()
|
||||||
"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();
|
$usernames = array();
|
||||||
|
|
||||||
|
|
@ -47,19 +19,8 @@ function getUsers(): array
|
||||||
return $usernames;
|
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
|
// Execute the function and display results
|
||||||
$usernames = getUsers();
|
$usernames = getUsers();
|
||||||
$members = getDiscordWidget();
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
@ -74,27 +35,41 @@ $members = getDiscordWidget();
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="page-container">
|
<div class="page-container">
|
||||||
<div>
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<pre> _______ _____
|
<pre>
|
||||||
|
_______ _____
|
||||||
| ___|.----.-----.-----.-----.-----.| \.-----.--.--.
|
| ___|.----.-----.-----.-----.-----.| \.-----.--.--.
|
||||||
| ___|​| _| _ |-- __| -__| |​| -- | -__| | |
|
| ___|​| _| _ |-- __| -__| |​| -- | -__| | |
|
||||||
|___| |__| |_____|_____|_____|__|__|​|_____/|_____|\___/</pre>
|
|___| |__| |_____|_____|_____|__|__|​|_____/|_____|\___/</pre>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<div>
|
||||||
|
<div class="section tor-notice">
|
||||||
|
<pre>
|
||||||
|
+----------------------------------------------------------------+
|
||||||
|
| This site is accessible via Tor! |
|
||||||
|
| <a href="http://frzndev32nhnla77oozhxhz5yzo4abldr6zbc4qkdh5hcyanizlxs2ad.onion/">frzndev32nhnla77oozhxhz5yzo4abldr6zbc4qkdh5hcyanizlxs2ad.onion</a> |
|
||||||
|
+----------------------------------------------------------------+
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<p><b>Members</b></p>
|
<p>Members</p>
|
||||||
<ul class="members">
|
<ul class="members">
|
||||||
<?= count($usernames) == 0 ? "<li>Error Retrieving Users</li>" : "" ?>
|
<?php if (count($usernames) > 0) { ?>
|
||||||
<?php foreach ($usernames as $username) { ?>
|
<?php foreach ($usernames as $username) { ?>
|
||||||
<li><a href="/~<?= $username ?>">~<?= $username ?></a><?= $username == "amr" ? "*" : "" ?></li>
|
<li><a href="/~<?= $username ?>">~<?= $username ?></a><?= $username == "amr" ? "*" : "" ?></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php } else { ?>
|
||||||
|
<li class="error">Error fetching members!</li>
|
||||||
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
<small>
|
<small>
|
||||||
* owner & admin
|
* owner & admin
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<p><b>Services</b></p>
|
<p>Services</p>
|
||||||
<table class="services">
|
<table class="services">
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://git.frzn.dev">git.frzn.dev</a></td>
|
<td><a href="https://git.frzn.dev">git.frzn.dev</a></td>
|
||||||
|
|
@ -142,8 +117,11 @@ $members = getDiscordWidget();
|
||||||
<sup>2</sup> Not running 24/7
|
<sup>2</sup> Not running 24/7
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<p><b>System Info</b></p>
|
<p>System Info</p>
|
||||||
<table class="system-info">
|
<table class="system-info">
|
||||||
<tr>
|
<tr>
|
||||||
<td>time:</td>
|
<td>time:</td>
|
||||||
|
|
@ -155,23 +133,13 @@ $members = getDiscordWidget();
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<hr>
|
<hr>
|
||||||
(c) frzn.dev 2018 - <?= date('Y') ?> / design and "backend" by <a href="/~floppy">~floppy</a>
|
(c) frzn.dev 2018 - <?= date('Y') ?> / design and "backend" by <a href="/~roscoe">~roscoe</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue