1 | <?php |
||||
2 | |||||
3 | /** |
||||
4 | * Project "SuperNova.WS" copyright (c) 2009-2017 Gorlum |
||||
5 | * @version #45a23# |
||||
6 | **/ |
||||
7 | |||||
8 | define('INSIDE', true); |
||||
9 | define('INSTALL', false); |
||||
10 | define('IN_ADMIN', true); |
||||
11 | |||||
12 | require('../common.' . substr(strrchr(__FILE__, '.'), 1)); |
||||
13 | |||||
14 | SnTemplate::messageBoxAdminAccessDenied(AUTH_LEVEL_ADMINISTRATOR); |
||||
15 | |||||
16 | global $user, $lang; |
||||
17 | |||||
18 | $delete = sys_get_param_str('delete'); |
||||
19 | $deleteall = sys_get_param_str('deleteall'); |
||||
20 | |||||
21 | if ($delete) { |
||||
22 | doquery("DELETE FROM `{{chat}}` WHERE `messageid` = {$delete};"); |
||||
0 ignored issues
–
show
Deprecated Code
introduced
by
![]() |
|||||
23 | } elseif ($deleteall == 'yes') { |
||||
24 | doquery("DELETE FROM `{{chat}}`;"); |
||||
0 ignored issues
–
show
The function
doquery() has been deprecated.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
25 | } |
||||
26 | |||||
27 | $template = SnTemplate::gettemplate('admin/admin_chat', true); |
||||
0 ignored issues
–
show
true of type true is incompatible with the type null|template expected by parameter $template of SnTemplate::gettemplate() .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
28 | |||||
29 | $query = doquery("SELECT * FROM `{{chat}}` ORDER BY `messageid` DESC LIMIT 25;"); |
||||
0 ignored issues
–
show
The function
doquery() has been deprecated.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
30 | while ($e = db_fetch($query)) { |
||||
0 ignored issues
–
show
The function
db_fetch() has been deprecated.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
31 | $template->assign_block_vars('message', array( |
||||
32 | 'ID' => $e['messageid'], |
||||
33 | 'TIMESTAMP' => str_replace(' ', ' ', date(FMT_DATE_TIME, $e['timestamp'])), |
||||
34 | 'PLAYER_NAME' => $e['user'], |
||||
35 | 'MESSAGE' => nl2br($e['message']), |
||||
36 | )); |
||||
37 | } |
||||
38 | |||||
39 | $template->assign_vars(array( |
||||
40 | 'PAGE_HEADER' => $lang['adm_ch_ttle'], |
||||
41 | 'msg_num' => SN::$gc->db->db_num_rows($query), |
||||
42 | )); |
||||
43 | |||||
44 | SnTemplate::display($template); |
||||
45 |