mirror of
https://github.com/tildeclub/site.git
synced 2026-01-23 21:40:18 +00:00
Refactor active users display with marquee
This commit is contained in:
committed by
GitHub
parent
a32d553d27
commit
b70b29de4c
39
news.php
39
news.php
@@ -6,29 +6,28 @@
|
|||||||
|
|
||||||
<!-- <p class="advisory">GMAIL USERS: We no longer accept gmail.com addresses for signups since you would not receive your account> -->
|
<!-- <p class="advisory">GMAIL USERS: We no longer accept gmail.com addresses for signups since you would not receive your account> -->
|
||||||
<!-- Active Users Scrolling List -->
|
<!-- Active Users Scrolling List -->
|
||||||
<div class="active-users-container">
|
<div id="active-users">
|
||||||
<h2 style="display: inline;">Currently Active Users:</h2>
|
<h2>Currently Active Users:</h2>
|
||||||
<div class="active-users-list">
|
|
||||||
<ul>
|
|
||||||
<?php
|
<?php
|
||||||
$activeUsers = json_decode(file_get_contents('online-users.json'), true);
|
$activeUsers = json_decode(file_get_contents('/usr/share/nginx/html/online-users.json'), true);
|
||||||
|
|
||||||
if (!empty($activeUsers)) {
|
if (!empty($activeUsers))
|
||||||
foreach ($activeUsers as $user) {
|
{
|
||||||
$username = htmlspecialchars($user);
|
echo '<marquee scrollamount="2">';
|
||||||
echo "<li><a href='/~$username'>$username</a></li>";
|
|
||||||
}
|
foreach ($activeUsers as $user)
|
||||||
// Repeat the list for seamless scrolling
|
{
|
||||||
foreach ($activeUsers as $user) {
|
$username = htmlspecialchars($user);
|
||||||
$username = htmlspecialchars($user);
|
echo "<a href='/~$username'>$username</a> ";
|
||||||
echo "<li><a href='/~$username'>$username</a></li>";
|
}
|
||||||
}
|
|
||||||
} else {
|
echo '</marquee>';
|
||||||
echo "<li>No active users at the moment.</li>";
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
echo "<li>No active users at the moment.</li>";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
// Load the HTML from inn_status.html
|
// Load the HTML from inn_status.html
|
||||||
|
|||||||
Reference in New Issue
Block a user