forked from tylda-public/main
52 lines
872 B
PHP
52 lines
872 B
PHP
<?php
|
|
|
|
include 'header.php';
|
|
|
|
$activeUsers = json_decode(file_get_contents('/opt/html/online.json'), true);
|
|
|
|
?>
|
|
<h1>> Users </h1>
|
|
<article id="content">
|
|
Lista użytkowników obecnie aktywnych:
|
|
|
|
<div class="user-list">
|
|
<?php
|
|
|
|
if (!empty($activeUsers)) {
|
|
foreach ($activeUsers as $user) {
|
|
$username = htmlspecialchars($user);
|
|
echo "<a class=\"users\" href='/~$username'>$username</a>";
|
|
}
|
|
} else {
|
|
echo "...";
|
|
}
|
|
|
|
?>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
Lista użytkowników i linki do ich blogów:
|
|
<ul>
|
|
|
|
<div class="user-list">
|
|
<?php
|
|
$host=htmlspecialchars($_SERVER['SERVER_NAME']);
|
|
//$host="";
|
|
foreach (scandir("/home/") as $file) {
|
|
if (in_array($file, array('.', '..'))) continue;
|
|
echo "<a href=\"/~$file\">$file</a>";
|
|
}
|
|
|
|
?>
|
|
</div>
|
|
|
|
</ul>
|
|
</article>
|
|
|
|
<?php
|
|
|
|
include 'footer.php';
|
|
|
|
?>
|