示例#1
0
function html_guest_error()
{
    $frame_top_target = html_get_top_frame_name();
    $webtag = get_webtag();
    forum_check_webtag_available($webtag);
    $final_uri = sprintf("logon.php?webtag=%s&final_uri=%s", $webtag, rawurlencode(get_request_uri(true, false)));
    $available_popup_files_preg = implode("|^", array_map('preg_quote_callback', get_available_popup_files()));
    $available_support_pages_preg = implode("|^", array_map('preg_quote_callback', get_available_support_files()));
    if (preg_match("/^{$available_popup_files_preg}/", $final_uri) > 0) {
        html_draw_error(gettext("Sorry, you need to be logged in to use this feature."), null, 'post', array('close_popup' => gettext("Close")));
    } else {
        if (preg_match("/^{$available_support_pages_preg}/", $final_uri) > 0) {
            html_draw_error(gettext("Sorry, you need to be logged in to use this feature."));
        } else {
            html_draw_error(gettext("Sorry, you need to be logged in to use this feature."), html_get_forum_file_path('logout.php'), 'post', array('submit' => gettext("Login now"), 'register' => gettext("Register")), array('final_uri' => $final_uri), $frame_top_target);
        }
    }
}
示例#2
0
function get_forum_access_ignore_files()
{
    return array_merge(get_available_admin_files(), get_available_user_files(), get_forum_check_webtag_ignore_files(), get_available_support_files());
}