From 9988679d567a8bba9bade92dd9524bb012a1fe43 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 12 Mar 2006 23:19:55 +0000 Subject: - streamlined reports to consist of the feature set we decided upon (Nils, your turn now) - use getenv instead of $_ENV (with $_ENV the case could be wrong) - permission fixes (there was a bug arising with getting permission flags - re-added them and handled roles deletion differently) - implemented max login attempts - changed the expected return parameters for logins/sessions - added acp page for editing report/denial reasons - other fixes here and there git-svn-id: file:///svn/phpbb/trunk@5622 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_display.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'phpBB/includes/functions_display.php') diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 775805f26a..78dba728cf 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -893,4 +893,35 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_ // $totaltime = $mtime[0] + $mtime[1] - $starttime; } +/** +* Display reasons +*/ +function display_reasons($reason_id = 0) +{ + global $db, $user, $template; + + $sql = 'SELECT * + FROM ' . REASONS_TABLE . ' + ORDER BY reason_order ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + // If the reason is defined within the language file, we will use the localized version, else just use the database entry... + if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) + { + $row['reson_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]; + $row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]; + } + + $template->assign_block_vars('reason', array( + 'ID' => $row['reason_id'], + 'TITLE' => $row['reason_title'], + 'DESCRIPTION' => $row['reason_description'], + 'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false) + ); + } + $db->sql_freeresult($result); +} + ?> \ No newline at end of file -- cgit v1.2.1