-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_status.php
90 lines (72 loc) · 3.68 KB
/
server_status.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
/*
Ceres Control Panel
This is a control pannel program for Athena and Freya
Copyright (C) 2005 by Beowulf and Nightroad
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
To contact any of the authors about special permissions send
an e-mail to [email protected]
*/
session_start();
include_once 'config.php'; // loads config variables
include_once 'query.php'; // imports queries
include_once 'functions.php';
$servers = server_status();
$quantos = moneyformat(online_count());
//Dynamic Info Check [ABOUT_RATES|RATES_AGIT]
if ($CONFIG_dynamic_info || $CONFIG_agit_check) {
if ($CONFIG_agit_check)
$query = sprintf(RATES_AGIT,$CONFIG_dynamic_name);
else
$query = sprintf(ABOUT_RATES,$CONFIG_dynamic_name);
$result = execute_query($query, 'server_status.php');
$line = $result->fetch_row();
$rate_base = moneyformat($line[0] / 100);
$rate_job = moneyformat($line[1] / 100);
$rate_drop = moneyformat($line[2] / 100);
if(isset($line[3])) {
if ($line[3] == 1)
$agit_status = '<font color="green">'.$lang['AGIT_ON'].'</font>';
else
$agit_status = '<font color="red">'.$lang['AGIT_OFF'].'</font>';
}
}
caption($CONFIG_name);
echo '<table class="maintable">';
if ($servers & 1)
echo '<tr><td align="left"><b>'.$lang['SERVERSTATUS_LOGIN'].' </b></td><td align="right"><font color="green">'.$lang['SERVERSTATUS_ONLINE'].'</font></td></td></tr>';
else
echo '<tr><td align="left"><b>'.$lang['SERVERSTATUS_LOGIN'].' </b></td><td align="right"><font color="red">'.$lang['SERVERSTATUS_OFFLINE'].'</font></td></td></tr>';
if ($servers & 2)
echo '<tr><td align="left"><b>'.$lang['SERVERSTATUS_CHAR'].' </b></td><td align="right"><font color="green">'.$lang['SERVERSTATUS_ONLINE'].'</font></td></td></tr>';
else
echo '<tr><td align="left"><b>'.$lang['SERVERSTATUS_CHAR'].' </b></td><td align="right"><font color="red">'.$lang['SERVERSTATUS_OFFLINE'].'</font></td></td></tr>';
if ($servers & 4)
echo '<tr><td align="left"><b>'.$lang['SERVERSTATUS_MAP'].' </b></td><td align="right"><font color="green">'.$lang['SERVERSTATUS_ONLINE'].'</font></td></td></tr>';
else
echo '<tr><td align="left"><b>'.$lang['SERVERSTATUS_MAP'].' </b></td><td align="right"><font color="red">'.$lang['SERVERSTATUS_OFFLINE'].'</font></td></tr>';
if ($CONFIG_show_rates) {
if ($CONFIG_dynamic_info)
echo '<tr><td align="left"><b>'.$lang['ABOUT_RATE'].' </b></td><td align="right">'.$rate_base.'/'.$rate_job.'/'.$rate_drop.'</td></tr>';
else
echo '<tr><td align="left"><b>'.$lang['ABOUT_RATE'].' </b></td><td align="right">'.$CONFIG_rate.'</td></tr>';
}
if ($CONFIG_agit_check)
echo '<tr><td align="left"><b>'.$lang['AGIT'].' </b></td><td>'.$agit_status.'</td></tr>';
if ($quantos)
echo '<tr><td align="left"><b><span title="See who is online" class="link" onClick="LINK_ajax(\'whoisonline.php\',\'main_div\');">'.$lang['SERVERSTATUS_USERSONLINE'].' </span></b></td><td align="right">'.$quantos.'</td></tr>';
else
echo '<tr><td align="left"><b>'.$lang['SERVERSTATUS_USERSONLINE'].' </b></td><td align="right">'.$quantos.'</td></tr>';
echo '</table>';
fim();
?>