-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.php
69 lines (50 loc) · 1.35 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
<?php
require_once("config.inc.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="javascript/jquery-2.1.4.min.js"></script>
<link rel="shortcut icon" href="favicon.ico">
<title>PHP Arma2/3 Server Status</title>
<script>
$(document).ready(function() {
//use asynchronous AJAX call via JQuery to query the servers in the backend
//this way it's not blocking the loading of the page
var datastring = 'query-servers=true';
$.ajax({
type: "POST",
url: "query-servers.php",
data: datastring,
success: function(data) {
//show information in our div
$('.server-data').show().html(data);
//hide all player lists by default
$('.hide-players').hide();
//hide all mods by default
$('.hide-mods').hide();
$(".players").click(function() {
$('.hide-players',this).toggle();
});
$(".mods").click(function() {
$('.hide-mods',this).toggle();
});
}
});
});
</script>
</head>
<body>
<h2>PHP Arma2/3 Server Status</h2>
<div class='server-data'>
Loading...
</div>
<br><hr>
<div style="text-align: center;">
<a href="https://github.com/firefly2442/phparma2serverstatus">phparma2serverstatus</a>
<br>Version: <?php echo VERSION;?>
</div>
</body>
</html>