diff options
Diffstat (limited to 'include/functions_html.inc.php')
-rw-r--r-- | include/functions_html.inc.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php index b0f123a14..5af5c1862 100644 --- a/include/functions_html.inc.php +++ b/include/functions_html.inc.php @@ -273,15 +273,16 @@ function tag_alpha_compare($a, $b) */ function access_denied() { - global $user; + global $user, $conf; $login_url = get_root_url().'identification.php?redirect=' .urlencode(urlencode($_SERVER['REQUEST_URI'])); - set_status_header(401); if ( isset($user) and !is_a_guest() ) { + set_status_header(401); + echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'; echo '<div style="text-align:center;">'.l10n('You are not authorized to access the requested page').'<br>'; echo '<a href="'.get_root_url().'identification.php">'.l10n('Identification').'</a> '; @@ -289,6 +290,10 @@ function access_denied() echo str_repeat( ' ', 512); //IE6 doesn't error output if below a size exit(); } + elseif (!$conf['guest_access'] and is_a_guest()) + { + redirect_http($login_url); + } else { redirect_html($login_url); @@ -648,4 +653,4 @@ function flush_page_messages() } } -?>
\ No newline at end of file +?> |