These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
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 = gettemplate('banned_body', true); |
||
20 | |||
21 | $query = doquery("SELECT * FROM {{banned}} ORDER BY `ban_id` DESC;"); |
||
22 | $i=0; |
||
23 | while($ban_row = db_fetch($query)) |
||
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 | display(parsetemplate($template)); |
||
37 | |||
38 | ?> |
||
0 ignored issues
–
show
|
|||
39 |
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.