Issues (1369)

banned.php (3 issues)

1
<?php
2
3
/**
4
 * banned.php
5
 *
6
 * List of all issued bans
7
 *
8
 * 2.0 (c) copyright 2010-2011 by Gorlum for http://supernova.ws
9
 *  [!] Full rewrite
10
 *  [~] Complies with PCG1
11
 *  [~] Utilize PTE
12
 * @version 1.0 Created by e-Zobar (XNova Team). All rights reversed (C) 2008
13
 *
14
 */
15
16
$allow_anonymous = true;
17
include('common.' . substr(strrchr(__FILE__, '.'), 1));
18
19
$template = SnTemplate::gettemplate('banned_body', 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 ignore-type  annotation

19
$template = SnTemplate::gettemplate('banned_body', /** @scrutinizer ignore-type */ true);
Loading history...
20
21
$query = doquery("SELECT * FROM {{banned}} ORDER BY `ban_id` DESC;");
0 ignored issues
show
Deprecated Code introduced by
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 ignore-deprecated  annotation

21
$query = /** @scrutinizer ignore-deprecated */ doquery("SELECT * FROM {{banned}} ORDER BY `ban_id` DESC;");
Loading history...
22
$i=0;
23
while($ban_row = db_fetch($query))
0 ignored issues
show
Deprecated Code introduced by
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 ignore-deprecated  annotation

23
while($ban_row = /** @scrutinizer ignore-deprecated */ db_fetch($query))
Loading history...
24
{
25
  $template->assign_block_vars('banlist', array(
26
    'USER_NAME'   => $ban_row['ban_user_name'],
27
    'REASON'      => $ban_row['ban_reason'],
28
    'FROM'        => $ban_row['ban_time'] ? date(FMT_DATE_TIME, $ban_row['ban_time']) : '--',
29
    'UNTIL'       => date(FMT_DATE_TIME, $ban_row['ban_until']),
30
    'ISSUER_NAME' => $ban_row['ban_issuer_name']
31
  ));
32
  $i++;
33
}
34
35
$template->assign_var('BANNED_COUNT', $i);
36
SnTemplate::display($template);
37