-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
58 lines (48 loc) · 1.71 KB
/
index.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
include_once("handler/database.php");
include_once("inc/functions.php");
$messages = GetActiveMessages();
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The XYZ Network - Loading Screen</title>
<meta name="description" content="The loading screen for The XYZ Network">
<meta name="author" content="The XYZ Network">
<link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet'>
<link rel="stylesheet" href="css/styles.css?v=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<?php
$useragent = $_SERVER['HTTP_USER_AGENT'];
if(strpos($useragent, 'Awesomium') === false) {
echo '<body class="body1">';
} else {
echo '<body class="body2">';
};
?>
<div class="center-screen">
<?php
if(strpos($useragent, 'Awesomium') === false) {
echo '<img class="logo floating" src="assets/logo.png">';
};
?>
</div>
<div class="bottom-screen">
<?php foreach($messages as $order => $message) { ?>
<div id="content-<?= $order ?>"><img src="<?= GetAvatar($message['userid']) ?>" class="round"><a class="name" style="color: <?= htmlspecialchars(GetColour($message['userid'])) ?>"><?= htmlspecialchars(GetName($message['userid'])) ?></a>: <?= htmlspecialchars($message['message']) ?></div>
<?php } ?>
</div>
<script>
var divs = $('div[id^="content-"]').hide(),
i = 0;
(function cycle() {
divs.eq(i).fadeIn(400)
.delay(2000)
.fadeOut(400, cycle);
i = ++i % divs.length;
})();
</script>
</body>
</html>