diff --git a/info.php b/info.php index 12a10476b..5e04a7041 100644 --- a/info.php +++ b/info.php @@ -16,9 +16,9 @@ $user->session_start(); global $lang; -$info = array(); +$info = []; $html_dir = LANG_DIR . 'html/'; -$req_mode = !empty($_REQUEST['show']) ? (string)$_REQUEST['show'] : 'not_found'; +$req_mode = (string)$_REQUEST['show']; switch ($req_mode) { case 'advert': @@ -31,59 +31,23 @@ switch ($req_mode) { $info['src'] = 'copyright_holders.html'; break; - case 'not_found': - $info['title'] = $lang['NOT_FOUND']; - $info['src'] = 'not_found.html'; - break; - case 'user_agreement': $info['title'] = $lang['USER_AGREEMENT']; $info['src'] = 'user_agreement.html'; break; default: - bb_simple_die('Invalid request'); + case 'not_found': + $info['title'] = $lang['NOT_FOUND']; + $info['src'] = 'not_found.html'; + break; } -$require = file_exists($html_dir . $info['src']) ? $html_dir . $info['src'] : $html_dir . 'not_found.html'; +$require = file_exists($html_dir . $info['src']) ? $html_dir . $info['src'] : false; -?> - -
- - - - - - -[ ] -
-