-
Notifications
You must be signed in to change notification settings - Fork 1
/
onlines.php
32 lines (29 loc) · 1.02 KB
/
onlines.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php require_once './API.php'; ?>
<html>
<header>
<link rel='stylesheet' href='assets/index-style.css'>
<meta name='refresh' content='5;url=onlines.php'>
<meta http-equiv="refresh" content="5" />
</header>
<body>
<div class='online-ifram'>
<?php
$users = GetOnlineUsers();
if ($users != "You are not logged in") {
foreach ($users as $user) {
$username = $user['username'];
$lastSeen = CustomizeDate($user['lastSeen'], true);
if ($username == $_SESSION['username']) {
echo "<li class='me-online-color'> <p class='username'>$username <span class='tip-online-color'>*Me</span></p></li>";
} else {
echo "<li> <p class='username'>$username </p><span>$lastSeen</span></li>";
}
}
} else {
http_response_code(400);
echo '<center><h1 style="color:red">' . $users . '</h1></center>';
}
?>
</div>
</body>
</html>