-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.php
70 lines (57 loc) · 2.05 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
59
60
61
62
63
64
65
66
67
68
69
70
<?php
session_start();
require "Assets/PHP/Includes/settings.php";
require $AutoLoadPath;
$serverList = $server->GetServerList();
$comOnlinePlayers = 0;
$userManager = null;
// Counting all of the online players for all of the servers
foreach ((array) $serverList as $serveritem) {
// Pinging the server to see if the server is online
$serverOnline = $server->ServerOnline($serveritem["server_ip"], $serveritem["server_port"]);
// Checking if the server is online, if it is it will count the online players
if ($serverOnline) {
$sinfo = $server->GetOnlineUsers($serveritem["server_ip"], $serveritem["server_port"]);
if (empty($sinfo)) {
$comOnlinePlayers += 0;
}
else {
$comOnlinePlayers += count($sinfo);
}
}
}
?>
<!DOCTYPE html>
<html>
<head>
<!-- LINKING ALL OF THE CSS FILES NECCESARRY -->
<link rel="stylesheet" type="text/css" href="Assets/CSS/comm_vars.css">
<link rel="stylesheet" type="text/css" href="Assets/CSS/main_style.css">
<link rel="stylesheet" type="text/css" href="Assets/CSS/comm_menu.css">
<!-- FONT INITIALIZATION -->
<link href="https://fonts.googleapis.com/css?family=Titillium+Web" rel="stylesheet">
<title>DailyNetwork</title>
</head>
<body>
<?php include('Assets/PHP/navigation.php'); ?>
<header>
<header-top>
</header-top>
<header-middle>
<page-title>
<span class="comm-col-1">Daily</span>
<span class="comm-col-2">Network</span>
</page-title>
<br>
<page-slogan>
SOME SLOGAN THAT SOUNDS NICE GOES HERE
</page-slogan>
</header-middle>
<header-buttom>
<online-count>
ONLINE MEDLEMMER: <?php echo $comOnlinePlayers; ?>
</online-count>
</header-buttom>
</header>
</body>
</html>