site/index.php

169 lines
5.8 KiB
PHP
Raw Permalink Normal View History

2019-10-12 18:17:09 +00:00
<?php
2021-01-13 16:48:39 +00:00
// $additional_head = "
// <meta http-equiv='refresh' content='60' />
// ";
2019-10-12 18:17:09 +00:00
$user_info = json_decode(file_get_contents('/var/www/envs.net/users_info.json'));
$sys_info = json_decode(file_get_contents('/var/www/envs.net/sysinfo.json'));
2019-10-12 18:17:09 +00:00
$date = new DateTime(null, new DateTimeZone('Etc/UTC'));
$datetime = $date->format('l, d. F Y - h:i:s A (e)');
$online_users = str_replace(PHP_EOL, '', shell_exec("online-users"));
$total_users = $user_info->data->info->user_count;
2019-10-12 18:17:09 +00:00
2020-11-03 11:23:17 +00:00
$local_os = shell_exec("lsb_release -ds");
2019-10-12 18:17:09 +00:00
include 'header.php';
?>
<body id="body" class="dark-mode">
<!-- BODYDIV (closed in footer.php) -->
<div class="clear" style="min-width: 1050px;">
2019-10-12 18:17:09 +00:00
<!-- MAIN -->
2020-01-20 10:20:19 +00:00
<div id="main" style="padding-bottom: 2em;">
2019-10-12 18:17:09 +00:00
<pre class="banner">
2020-01-14 20:44:19 +00:00
<?php include 'banner_html.txt'; ?>
2020-03-09 09:50:15 +00:00
<small id="header_sub"><em>environments - since 9/2019</em></small>
2019-10-12 18:17:09 +00:00
</pre>
2020-11-29 13:58:53 +00:00
<br />
2019-10-12 18:17:09 +00:00
<!-- maintenance info -->
2023-12-30 13:56:27 +00:00
<!-- <pre class="alert">
2023-12-30 12:39:32 +00:00
<i class="fa fa-exclamation-triangle fa-fw" aria-hidden="true"></i><strong>&nbsp; srv01.envs.net is currently not reachable.</strong>
affected services are: cinny element-web hydrogen-web matrix mobilizon pleroma
i am working at full speed on a problem solution.
2023-12-30 13:56:27 +00:00
</pre> -->
2019-10-12 18:17:09 +00:00
<table>
2020-12-22 07:46:07 +00:00
<tr> <th class="tw140"></th> <th class="tw110"></th> <th></th> </tr>
<?php
2024-03-18 11:16:44 +00:00
$exclude = ['bbj','cinny','drone','element-web','gophernicus','hydrogen-web','ipinfo','jetforce','ntfy','tt-rss','thelounge','znc'];
$clean = array('http://', 'https://', '/');
foreach ($sys_info->data->services as $service => $value) {
$url = $sys_info->data->services->$service->url;
$urlname = str_replace($clean,'',$url);
$desc = $sys_info->data->services->$service->desc;
if (! in_array($service, $exclude)) {
echo " <tr>\n <td><a rel=\"$service\" href=\"$url\" target=\"_blank\">$urlname</a></td>\n"
." <td>- $service</td> <td><em>$desc</em></td>\n </tr>\n";
}
}
?>
2019-10-12 18:17:09 +00:00
</table>
<br />
2019-10-12 18:17:09 +00:00
<pre>
envs.net is a minimalist, non-commercial
2019-11-04 23:55:55 +00:00
shared linux system and will always be free to use.
2019-10-12 18:17:09 +00:00
2021-05-26 15:13:42 +00:00
we are linux lovers, sysadmins, programmers and users who like to build
2019-10-12 18:17:09 +00:00
webpages, write blogs, chat online, play cool console games and so much
2022-02-10 13:39:38 +00:00
more. do you wish to join a small shell user space? send an email
2019-10-12 18:17:09 +00:00
to <a href="mailto:hostmaster@envs.net?subject=signup%20user%20space%20-%20envs.net&body=desired%20username:%20%0A%0A%0Awhat%20interests%20you%20about%20envs.net?%0A%0A%0Assh%20public%20key:%0A%20--paste%20here--%0A" target="_blank">hostmaster&#64;envs.net</a> or use the <a href="/signup/">signup</a> form.
2022-02-10 13:39:38 +00:00
for more informations take a look to our <a href="https://help.envs.net/">help page</a>.
2020-02-03 10:10:28 +00:00
follow us in the <a href="/chat">chat</a> if you like.
2019-10-12 18:17:09 +00:00
</pre>
2020-02-19 09:09:11 +00:00
<br />
2019-10-12 18:17:09 +00:00
<div class="block">
2020-01-20 01:30:48 +00:00
<pre><strong><i class="fa fa-gear fa-fw" aria-hidden="true"></i> SYSTEM INFO</strong></pre>
2019-10-12 18:17:09 +00:00
<table>
2020-01-19 18:09:23 +00:00
<tr><th class="tw110"></th> <th></th></tr>
2020-11-03 11:23:17 +00:00
<tr><td>time:</td> <td><?=$datetime?></td></tr>
<tr><td>os:</td> <td><?=$local_os?></td></tr>
2019-10-12 18:17:09 +00:00
</table>
2020-01-19 13:00:42 +00:00
<p></p>
2020-01-20 01:30:48 +00:00
<pre>
2021-05-26 15:13:42 +00:00
<em>more info about the system and the installed packages can
2020-02-16 09:39:16 +00:00
be found on the <a href="/sysinfo/">sysinfo page</a>.</em>
2019-10-12 18:17:09 +00:00
</pre>
2020-01-20 01:30:48 +00:00
<p></p>
2019-10-12 18:17:09 +00:00
</div>
2020-01-19 13:00:42 +00:00
2019-10-12 18:17:09 +00:00
</div>
<!-- END MAIN -->
<!-- SIDEBAR -->
<div id="sidebar">
2022-07-30 14:25:24 +00:00
2019-10-12 18:17:09 +00:00
<div class="block">
<table>
2020-01-19 18:09:23 +00:00
<tr><th class="tw25"></th> <th></th></tr>
2020-01-23 10:48:28 +00:00
<?php
$menu = [
2023-05-02 20:00:28 +00:00
'chat' => ['fa' => 'comments-o', 'url' => '/chat/'],
2020-01-23 10:55:08 +00:00
'webmail' => ['fa' => 'envelope-o', 'url' => 'https://mail.envs.net/'],
'mailing list' => ['fa' => 'bullhorn', 'url' => 'https://lists.envs.net/'],
'forum' => ['fa' => 'forumbee', 'url' => 'https://bbj.envs.net/'],
2021-07-10 19:34:43 +00:00
'gopher' => ['fa' => 'hand-o-right', 'url' => 'https://gopher.envs.net/'],
'gemini' => ['fa' => 'hand-o-right', 'url' => 'https://gemini.envs.net/'],
2020-01-23 10:55:08 +00:00
'pleroma' => ['fa' => 'pleroma', 'url' => 'https://pleroma.envs.net/~envs'],
'code of conduct' => ['fa' => 'sticky-note-o', 'url' => '/coc/'],
'terms of service' => ['fa' => 'handshake-o', 'url' => '/tos/'],
'privacy policy' => ['fa' => 'eye', 'url' => '/privacy-policy/'],
'help' => ['fa' => 'book', 'url' => 'https://help.envs.net/'],
2023-05-02 20:00:28 +00:00
'faq' => ['fa' => 'question-circle-o', 'url' => 'https://help.envs.net/faq/'],
'donate' => ['fa' => 'rocket', 'url' => '/donate/']
2020-01-23 10:48:28 +00:00
];
foreach ($menu as $name => $m_entry) {
2023-05-02 20:06:47 +00:00
if ($name == 'code of conduct') echo "\t<tr><td>&nbsp;</td><td></td></tr>\n";
if ($name == 'donate') echo "\t<tr><td>&nbsp;</td><td></td></tr>\n"; ?>
2020-01-23 10:55:08 +00:00
<tr onclick="window.location='<?=$m_entry['url']?>';">
<td><i class="fa fa-<?=$m_entry['fa']?> fa-fw" aria-hidden="true"></i></td>
<td><strong><a rel="<?=$name?>" target="_top" href="<?=$m_entry['url']?>"><?=$name?></a></strong></td>
</tr>
2020-01-23 10:48:28 +00:00
<?php } ?>
2020-01-14 12:23:01 +00:00
</table>
2019-10-12 18:17:09 +00:00
</div>
2020-01-19 18:09:23 +00:00
<p></p>
2019-10-12 18:17:09 +00:00
<div class="block">
2020-01-20 01:30:48 +00:00
<pre>
2020-01-19 18:09:23 +00:00
<strong><i class="fa fa-users fa-fw" aria-hidden="true"></i> USERS</strong>
2019-10-12 18:17:09 +00:00
<small>online: <?=$online_users?> &#124; total: <?=$total_users?></small>
2020-01-14 12:23:01 +00:00
</pre>
2020-01-20 01:30:48 +00:00
<p></p>
2019-10-12 18:17:09 +00:00
<table>
2020-01-19 18:09:23 +00:00
<tr><th class="tw20"></th> <th></th></tr>
2019-10-12 18:17:09 +00:00
<tr onclick="window.location='/users_info.json';">
2020-01-19 18:09:23 +00:00
<td><small><i class="fa fa-info-circle fa-fw" aria-hidden="true"></i></small></td>
2020-01-19 12:11:01 +00:00
<td><small><a href="/users_info.json">users_info.json</a></small></td>
2019-10-12 18:17:09 +00:00
</tr>
<tr onclick="window.location='/user_updates/';">
2020-01-19 12:11:01 +00:00
<td><small><i class="fa fa-clock-o fa-fw" aria-hidden="true"></i></small></td>
2021-02-13 20:55:52 +00:00
<td><small><a href="/user_updates/">recent updates</a></small></td>
2019-10-12 18:17:09 +00:00
</tr>
</table>
2020-01-20 01:30:48 +00:00
2020-01-19 13:00:42 +00:00
<p></p>
2019-10-12 18:17:09 +00:00
<details><summary class="menu">user list</summary><small> &gt; <a href="/users/">list all users</a></small>
2020-01-20 11:09:38 +00:00
<p></p>
<ul class="userlist">
<?php
foreach ($user_info->data->users as $user => $value) {
if ($user_info->data->users->$user->website != '') {
echo "\t<li><a rel=\"$user\" target=\"_blank\" href=\"/~$user\">&#126;$user</a></li>\n";
}
2019-10-12 18:17:09 +00:00
}
2020-01-20 11:09:38 +00:00
?>
</ul>
2020-01-19 18:09:23 +00:00
</details>
2020-01-20 01:30:48 +00:00
<p></p>
2019-10-12 18:17:09 +00:00
</div>
</div>
<!-- END SIDEBAR -->
<?php include 'footer.php'; ?>