-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhoisonline.php
84 lines (73 loc) · 2.45 KB
/
whoisonline.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
<?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';
$jobs = $_SESSION[$CONFIG_name.'jobs'];
if (is_woe())
redir('motd.php', 'main_div', $lang['WOE_TIME']);
$query = sprintf(WHOISONLINE);
$result = execute_query($query, "whoisonline.php");
caption($lang['WHOISONLINE_WHOISONLINE']);
echo '
<table class="maintable">
<tr>
<th align="left">'.$lang['NAME'].'</th>
<th align="left">'.$lang['CLASS'].'</th>
<th align="center">'.$lang['BLVLJLVL'].'</th>
';
if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin'])
echo '<th align="center">'.$lang['WHOISONLINE_COORDS'].'</th>';
echo '
<th align="left">'.$lang['MAP'].'</th>
</tr>
';
if ($result) {
while ($line = $result->fetch_row()) {
$charname = htmlformat($line[0]);
if ($line[9] >= $CONFIG_gm_hide) {
if (!isset($_SESSION[$CONFIG_name.'level']) || (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] < $line[9]))
continue;
}
echo '
<tr>
<td align="left">'.$charname.'</td>
<td align="left">
';
if (isset($jobs[$line[1]]))
echo $jobs[$line[1]];
else
echo $lang['UNKNOWN'];
echo '
</td>
<td align="center">'.$line[2].'/'.$line[3].'</td>
';
if (isset($_SESSION[$CONFIG_name.'level']) && $_SESSION[$CONFIG_name.'level'] >= $CONFIG['cp_admin'])
echo '<td align="center">'.$line[4].','.$line[5].'</td>';
echo '
<td align="left">'.$line[6].'</td>
</tr>
';
}
}
echo '</table>';
fim();
?>