• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP print_header_redirect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中print_header_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP print_header_redirect函数的具体用法?PHP print_header_redirect怎么用?PHP print_header_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了print_header_redirect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: access_denied

function access_denied()
{
    if (!auth_is_user_authenticated()) {
        if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
            $t_return_page = $_SERVER['PHP_SELF'];
            if (isset($_SERVER['QUERY_STRING'])) {
                $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
            }
            $t_return_page = string_url(string_sanitize_url($t_return_page));
            print_header_redirect('login_page.php?return=' . $t_return_page);
        }
    } else {
        if (auth_get_current_user_id() == user_get_id_by_name(config_get_global('anonymous_account'))) {
            if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
                $t_return_page = $_SERVER['PHP_SELF'];
                if (isset($_SERVER['QUERY_STRING'])) {
                    $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
                }
                $t_return_page = string_url(string_sanitize_url($t_return_page));
                echo '<center>';
                echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
                print_bracket_link('login_page.php?return=' . $t_return_page, lang_get('click_to_login'));
                echo '<p></p>';
                print_bracket_link('main_page.php', lang_get('proceed'));
                echo '</center>';
            }
        } else {
            echo '<center>';
            echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
            print_bracket_link('main_page.php', lang_get('proceed'));
            echo '</center>';
        }
    }
    exit;
}
开发者ID:jin255ff,项目名称:company_website,代码行数:35,代码来源:access_api.php


示例2: access_denied

/**
 * Function to be called when a user is attempting to access a page that
 * he/she is not authorised to.  This outputs an access denied message then
 * re-directs to the mainpage.
 */
function access_denied()
{
    if (!auth_is_user_authenticated()) {
        if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
            $t_return_page = $_SERVER['SCRIPT_NAME'];
            if (isset($_SERVER['QUERY_STRING'])) {
                $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
            }
            $t_return_page = string_url(string_sanitize_url($t_return_page));
            print_header_redirect('login_page.php' . '?return=' . $t_return_page);
        }
    } else {
        if (current_user_is_anonymous()) {
            if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
                $t_return_page = $_SERVER['SCRIPT_NAME'];
                if (isset($_SERVER['QUERY_STRING'])) {
                    $t_return_page .= '?' . $_SERVER['QUERY_STRING'];
                }
                $t_return_page = string_url(string_sanitize_url($t_return_page));
                echo '<p class="center">' . error_string(ERROR_ACCESS_DENIED) . '</p><p class="center">';
                print_bracket_link(helper_mantis_url('login_page.php') . '?return=' . $t_return_page, lang_get('click_to_login'));
                echo '</p><p class="center">';
                print_bracket_link(helper_mantis_url('main_page.php'), lang_get('proceed'));
                echo '</p>';
            }
        } else {
            echo '<p class="center">' . error_string(ERROR_ACCESS_DENIED) . '</p>';
            echo '<p class="center">';
            print_bracket_link(helper_mantis_url('main_page.php'), lang_get('proceed'));
            echo '</p>';
        }
    }
    exit;
}
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:39,代码来源:access_api.php


示例3: auth_ensure_user_authenticated

/**
 * Check that there is a user logged-in and authenticated
 * If the user's account is disabled they will be logged out
 * If there is no user logged in, redirect to the login page
 * If parameter is given it is used as a URL to redirect to following
 * successful login.  If none is given, the URL of the current page is used
 * @param string $p_return_page Page to redirect to following successful logon, defaults to current page
 * @access public
 */
function auth_ensure_user_authenticated($p_return_page = '')
{
    # if logged in
    if (auth_is_user_authenticated()) {
        # check for access enabled
        #  This also makes sure the cookie is valid
        if (OFF == current_user_get_field('enabled')) {
            print_header_redirect('logout_page.php');
        }
    } else {
        # not logged in
        if (is_blank($p_return_page)) {
            if (!isset($_SERVER['REQUEST_URI'])) {
                $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
            }
            $p_return_page = $_SERVER['REQUEST_URI'];
        }
        $p_return_page = string_url($p_return_page);
        print_header_redirect('login_page.php?return=' . $p_return_page);
    }
}
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:30,代码来源:authentication_api.php


示例4: access_denied

function access_denied()
{
    if (!php_version_at_least('4.1.0')) {
        global $_SERVER;
    }
    if (!auth_is_user_authenticated()) {
        if (basename($_SERVER['SCRIPT_NAME']) != 'login_page.php') {
            if (!isset($_SERVER['REQUEST_URI'])) {
                if (!isset($_SERVER['QUERY_STRING'])) {
                    $_SERVER['QUERY_STRING'] = '';
                }
                $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING'];
            }
            $t_return_page = string_url($_SERVER['REQUEST_URI']);
            print_header_redirect('login_page.php?return=' . $t_return_page);
        }
    } else {
        echo '<center>';
        echo '<p>' . error_string(ERROR_ACCESS_DENIED) . '</p>';
        print_bracket_link('main_page.php', lang_get('proceed'));
        echo '</center>';
    }
    exit;
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:24,代码来源:access_api.php


示例5: gpc_get_string

        $f_os_build = gpc_get_string('os_build');
        $f_description = gpc_get_string('description');
        if (profile_is_global($f_profile_id)) {
            access_ensure_global_level(config_get('manage_global_profile_threshold'));
            profile_update(ALL_USERS, $f_profile_id, $f_platform, $f_os, $f_os_build, $f_description);
            form_security_purge('profile_update');
            print_header_redirect('manage_prof_menu_page.php');
        } else {
            profile_update(auth_get_current_user_id(), $f_profile_id, $f_platform, $f_os, $f_os_build, $f_description);
            form_security_purge('profile_update');
            print_header_redirect('account_prof_menu_page.php');
        }
        break;
    case 'delete':
        if (profile_is_global($f_profile_id)) {
            access_ensure_global_level(config_get('manage_global_profile_threshold'));
            profile_delete(ALL_USERS, $f_profile_id);
            form_security_purge('profile_update');
            print_header_redirect('manage_prof_menu_page.php');
        } else {
            profile_delete(auth_get_current_user_id(), $f_profile_id);
            form_security_purge('profile_update');
            print_header_redirect('account_prof_menu_page.php');
        }
        break;
    case 'make_default':
        current_user_set_pref('default_profile', $f_profile_id);
        form_security_purge('profile_update');
        print_header_redirect('account_prof_menu_page.php');
        break;
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:account_prof_update.php


示例6: access_ensure_project_level

if ($f_manage_page && $t_dst_project_id != ALL_PROJECTS) {
    access_ensure_project_level(MANAGER, $t_dst_project_id);
}
# user should only be able to set columns for a project that is accessible.
if ($t_dst_project_id != ALL_PROJECTS) {
    access_ensure_project_level(VIEWER, $t_dst_project_id);
}
# Calculate the user id to set the configuration for.
if ($f_manage_page) {
    $t_user_id = NO_USER;
} else {
    $t_user_id = auth_get_current_user_id();
}
$t_all_columns = columns_get_all();
$t_default = null;
$t_view_issues_page_columns = config_get('view_issues_page_columns', $t_default, $t_user_id, $t_src_project_id);
$t_view_issues_page_columns = columns_remove_invalid($t_view_issues_page_columns, $t_all_columns);
$t_print_issues_page_columns = config_get('print_issues_page_columns', $t_default, $t_user_id, $t_src_project_id);
$t_print_issues_page_columns = columns_remove_invalid($t_print_issues_page_columns, $t_all_columns);
$t_csv_columns = config_get('csv_columns', $t_default, $t_user_id, $t_src_project_id);
$t_csv_columns = columns_remove_invalid($t_csv_columns, $t_all_columns);
$t_excel_columns = config_get('excel_columns', $t_default, $t_user_id, $t_src_project_id);
$t_excel_columns = columns_remove_invalid($t_excel_columns, $t_all_columns);
config_set('view_issues_page_columns', $t_view_issues_page_columns, $t_user_id, $t_dst_project_id);
config_set('print_issues_page_columns', $t_print_issues_page_columns, $t_user_id, $t_dst_project_id);
config_set('csv_columns', $t_csv_columns, $t_user_id, $t_dst_project_id);
config_set('excel_columns', $t_excel_columns, $t_user_id, $t_dst_project_id);
form_security_purge('manage_columns_copy');
$t_redirect_url = $f_manage_page ? 'manage_config_columns_page.php' : 'account_manage_columns_page.php';
print_header_redirect($t_redirect_url);
开发者ID:kaos,项目名称:mantisbt,代码行数:30,代码来源:manage_columns_copy.php


示例7: require_api

require_api('authentication_api.php');
require_api('constant_inc.php');
require_api('current_user_api.php');
require_api('gpc_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
require_api('string_api.php');
auth_ensure_user_authenticated();
$f_ref = string_sanitize_url(gpc_get_string('ref', ''));
if (count(current_user_get_accessible_projects()) == 1) {
    $t_project_ids = current_user_get_accessible_projects();
    $t_project_id = (int) $t_project_ids[0];
    if (count(current_user_get_accessible_subprojects($t_project_id)) == 0) {
        $t_ref_urlencoded = string_url($f_ref);
        print_header_redirect("set_project.php?project_id={$t_project_id}&ref={$t_ref_urlencoded}", true);
        /* print_header_redirect terminates script execution */
    }
}
html_page_top(lang_get('select_project_button'));
?>

<!-- Project Select Form BEGIN -->
<div id="select-project-div" class="form-container">
	<form id="select-project-form" method="post" action="set_project.php">
		<?php 
# CSRF protection not required here - form does not result in modifications
?>
		<fieldset>
			<legend><span><?php 
echo lang_get('choose_project');
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:login_select_proj_page.php


示例8: news_ensure_enabled

require_once 'string_api.php';
news_ensure_enabled();
$f_news_id = gpc_get_int('news_id');
$f_action = gpc_get_string('action', '');
# If deleting item redirect to delete script
if ('delete' == $f_action) {
    form_security_validate('news_delete');
    $row = news_get_row($f_news_id);
    # This check is to allow deleting of news items that were left orphan due to bug #3723
    if (project_exists($row['project_id'])) {
        access_ensure_project_level(config_get('manage_news_threshold'), $row['project_id']);
    }
    helper_ensure_confirmed(lang_get('delete_news_sure_msg'), lang_get('delete_news_item_button'));
    news_delete($f_news_id);
    form_security_purge('news_delete');
    print_header_redirect('news_menu_page.php', true);
}
# Retrieve news item data and prefix with v_
$row = news_get_row($f_news_id);
if ($row) {
    extract($row, EXTR_PREFIX_ALL, 'v');
}
access_ensure_project_level(config_get('manage_news_threshold'), $v_project_id);
$v_headline = string_attribute($v_headline);
$v_body = string_textarea($v_body);
html_page_top(lang_get('edit_news_title'));
# Edit News Form BEGIN
?>
<br />
<div align="center">
<form method="post" action="news_update.php">
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:news_edit_page.php


示例9: config_get

# $Id: bug_report_page.php,v 1.64.2.1 2007-10-13 22:32:53 giallu Exp $
# --------------------------------------------------------
# This file POSTs data to report_bug.php
$g_allow_browser_cache = 1;
require_once 'core.php';
$t_core_path = config_get('core_path');
require_once $t_core_path . 'file_api.php';
require_once $t_core_path . 'custom_field_api.php';
require_once $t_core_path . 'last_visited_api.php';
$f_master_bug_id = gpc_get_int('m_id', 0);
# this page is invalid for the 'All Project' selection except if this is a clone
if (ALL_PROJECTS == helper_get_current_project() && 0 == $f_master_bug_id) {
    print_header_redirect('login_select_proj_page.php?ref=bug_report_page.php');
}
if (ADVANCED_ONLY == config_get('show_report')) {
    print_header_redirect('bug_report_advanced_page.php' . (0 == $f_master_bug_id) ? '' : '?m_id=' . $f_master_bug_id);
}
if ($f_master_bug_id > 0) {
    # master bug exists...
    bug_ensure_exists($f_master_bug_id);
    # master bug is not read-only...
    if (bug_is_readonly($f_master_bug_id)) {
        error_parameters($f_master_bug_id);
        trigger_error(ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR);
    }
    $t_bug = bug_prepare_edit(bug_get($f_master_bug_id, true));
    # the user can at least update the master bug (needed to add the relationship)...
    access_ensure_bug_level(config_get('update_bug_threshold', null, $t_bug->project_id), $f_master_bug_id);
    #@@@ (thraxisp) Note that the master bug is cloned into the same project as the master, independent of
    #       what the current project is set to.
    if ($t_bug->project_id != helper_get_current_project()) {
开发者ID:jin255ff,项目名称:company_website,代码行数:31,代码来源:bug_report_page.php


示例10: Copyright

<?php

# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002  Kenzaburo Ito - [email protected]
# Copyright (C) 2002 - 2004  Mantis Team   - [email protected]
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
# --------------------------------------------------------
# $Id: logout_page.php,v 1.17 2004/05/30 01:49:31 vboctor Exp $
# --------------------------------------------------------
require_once 'core.php';
auth_logout();
if (HTTP_AUTH == config_get('login_method')) {
    auth_http_set_logout_pending(true);
}
print_header_redirect(config_get('logout_redirect_page'));
开发者ID:centaurustech,项目名称:BenFund,代码行数:16,代码来源:logout_page.php


示例11: strip_tags

$f_query_name = strip_tags(gpc_get_string('query_name'));
$f_is_public = gpc_get_bool('is_public');
$f_all_projects = gpc_get_bool('all_projects');
$t_query_redirect_url = 'query_store_page.php';
# We can't have a blank name
if (is_blank($f_query_name)) {
    $t_query_redirect_url = $t_query_redirect_url . '?error_msg=' . urlencode(lang_get('query_blank_name'));
    print_header_redirect($t_query_redirect_url);
}
# Check and make sure they don't already have a
# query with the same name
$t_query_arr = filter_db_get_available_queries();
foreach ($t_query_arr as $t_id => $t_name) {
    if ($f_query_name == $t_name) {
        $t_query_redirect_url = $t_query_redirect_url . '?error_msg=' . urlencode(lang_get('query_dupe_name'));
        print_header_redirect($t_query_redirect_url);
        exit;
    }
}
$t_project_id = helper_get_current_project();
if ($f_all_projects) {
    $t_project_id = 0;
}
$t_filter_string = filter_db_get_filter(gpc_get_cookie(config_get('view_all_cookie'), ''));
$t_new_row_id = filter_db_set_for_current_user($t_project_id, $f_is_public, $f_query_name, $t_filter_string);
if ($t_new_row_id == -1) {
    $t_query_redirect_url = $t_query_redirect_url . '?error_msg=' . urlencode(lang_get('query_store_error'));
    print_header_redirect($t_query_redirect_url);
} else {
    print_header_redirect('view_all_bug_page.php');
}
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:query_store.php


示例12: form_security_validate

# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
/**
 * @package MantisBT
 * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - [email protected]
 * @copyright Copyright (C) 2002 - 2013  MantisBT Team - [email protected]
 * @link http://www.mantisbt.org
 */
/**
 * MantisBT Core API's
 */
require_once 'core.php';
form_security_validate('manage_user_proj_add');
auth_reauthenticate();
$f_user_id = gpc_get_int('user_id');
$f_access_level = gpc_get_int('access_level');
$f_project_id = gpc_get_int_array('project_id', array());
$t_manage_user_threshold = config_get('manage_user_threshold');
user_ensure_exists($f_user_id);
foreach ($f_project_id as $t_proj_id) {
    if (access_has_project_level($t_manage_user_threshold, $t_proj_id) && access_has_project_level($f_access_level, $t_proj_id)) {
        project_add_user($t_proj_id, $f_user_id, $f_access_level);
    }
}
form_security_purge('manage_user_proj_add');
print_header_redirect('manage_user_edit_page.php?user_id=' . $f_user_id);
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:30,代码来源:manage_user_proj_add.php


示例13: require_api

require_api('authentication_api.php');
require_api('config_api.php');
require_api('constant_inc.php');
require_api('gpc_api.php');
require_api('print_api.php');
require_api('user_api.php');
# check if at least one way to get here is enabled
if (OFF == config_get('allow_signup') && OFF == config_get('lost_password_feature') && OFF == config_get('send_reset_password')) {
    trigger_error(ERROR_LOST_PASSWORD_NOT_ENABLED, ERROR);
}
$f_user_id = gpc_get_string('id');
$f_confirm_hash = gpc_get_string('confirm_hash');
# force logout on the current user if already authenticated
if (auth_is_user_authenticated()) {
    auth_logout();
    # reload the page after logout
    print_header_redirect('verify.php?id=' . $f_user_id . '&confirm_hash=' . $f_confirm_hash);
}
$t_calculated_confirm_hash = auth_generate_confirm_hash($f_user_id);
if ($f_confirm_hash != $t_calculated_confirm_hash) {
    trigger_error(ERROR_LOST_PASSWORD_CONFIRM_HASH_INVALID, ERROR);
}
# set a temporary cookie so the login information is passed between pages.
auth_set_cookies($f_user_id, false);
user_reset_failed_login_count_to_zero($f_user_id);
user_reset_lost_password_in_progress_count_to_zero($f_user_id);
# fake login so the user can set their password
auth_attempt_script_login(user_get_field($f_user_id, 'username'));
user_increment_login_count($f_user_id);
define('ACCOUNT_VERIFICATION_INC', true);
include dirname(__FILE__) . '/account_page.php';
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:verify.php


示例14: user_get_id_by_email

    $client->setAccessToken($_SESSION['access_token']);
}
if ($client->getAccessToken()) {
    $userData = $objOAuthService->userinfo->get();
    $data['userData'] = $userData;
    $_SESSION['access_token'] = $client->getAccessToken();
}
$user_id = user_get_id_by_email($userData->email);
# check for disabled account
if (!user_is_enabled($user_id)) {
    echo "<p>Your email didn't to registration on this web site. Please register new account first. ";
    return false;
}
# max. failed login attempts achieved...
if (!user_is_login_request_allowed($user_id)) {
    echo "<p>Your email didn't to registration on this web site. Please register new account first. ";
    return false;
}
# check for anonymous login
if (user_is_anonymous($user_id)) {
    echo "<p>Your email didn't to registration on this web site. Please register new account first. ";
    return false;
}
user_increment_login_count($user_id);
user_reset_failed_login_count_to_zero($user_id);
user_reset_lost_password_in_progress_count_to_zero($user_id);
# set the cookies
auth_set_cookies($user_id, false);
auth_set_tokens($user_id);
print_header_redirect('../../../my_view_page.php');
开发者ID:vboctor,项目名称:GoogleOauth,代码行数:30,代码来源:redirect.php


示例15: gpc_get_int

require_once $t_core_path . 'custom_field_api.php';
require_once $t_core_path . 'date_api.php';
require_once $t_core_path . 'last_visited_api.php';
require_once $t_core_path . 'projax_api.php';
$f_bug_id = gpc_get_int('bug_id');
$t_bug = bug_prepare_edit(bug_get($f_bug_id, true));
if ($t_bug->project_id != helper_get_current_project()) {
    # in case the current project is not the same project of the bug we are viewing...
    # ... override the current project. This to avoid problems with categories and handlers lists etc.
    $g_project_override = $t_bug->project_id;
    $t_changed_project = true;
} else {
    $t_changed_project = false;
}
if (SIMPLE_ONLY == config_get('show_update')) {
    print_header_redirect('bug_update_page.php?bug_id=' . $f_bug_id);
}
if (bug_is_readonly($f_bug_id)) {
    error_parameters($f_bug_id);
    trigger_error(ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR);
}
access_ensure_bug_level(config_get('update_bug_threshold'), $f_bug_id);
html_page_top1(bug_format_summary($f_bug_id, SUMMARY_CAPTION));
html_page_top2();
print_recently_visited();
?>

<br />
<form method="post" action="bug_update.php">
<?php 
echo form_security_field('bug_update');
开发者ID:renemilk,项目名称:spring-website,代码行数:31,代码来源:bug_update_advanced_page.php


示例16: config_get

# check if at least one way to get here is enabled
if ( OFF == config_get( 'allow_signup' ) &&
	OFF == config_get( 'lost_password_feature' ) &&
	OFF == config_get( 'send_reset_password' ) ) {
	trigger_error( ERROR_LOST_PASSWORD_NOT_ENABLED, ERROR );
}

$f_user_id = gpc_get_string('id');
$f_confirm_hash = gpc_get_string('confirm_hash');

# force logout on the current user if already authenticated
if( auth_is_user_authenticated() ) {
	auth_logout();

	# reload the page after logout
	print_header_redirect( "verify.php?id=$f_user_id&confirm_hash=$f_confirm_hash" );
}

$t_calculated_confirm_hash = auth_generate_confirm_hash( $f_user_id );

if ( $f_confirm_hash != $t_calculated_confirm_hash ) {
	trigger_error( ERROR_LOST_PASSWORD_CONFIRM_HASH_INVALID, ERROR );
}

# set a temporary cookie so the login information is passed between pages.
auth_set_cookies( $f_user_id, false );

user_reset_failed_login_count_to_zero( $f_user_id );
user_reset_lost_password_in_progress_count_to_zero( $f_user_id );

# fake login so the user can set their password
开发者ID:rombert,项目名称:mantisbt,代码行数:31,代码来源:verify.php


示例17: print_header_redirect

    if (!is_blank($f_return)) {
        print_header_redirect($f_return, false, false, true);
    } else {
        print_header_redirect(config_get('default_home_page'));
    }
}
# Check for automatic logon methods where we want the logon to just be handled by login.php
if (auth_automatic_logon_bypass_form()) {
    $t_uri = 'login.php';
    if (ON == config_get('allow_anonymous_login')) {
        $t_uri = 'login_anon.php';
    }
    if (!is_blank($f_return)) {
        $t_uri .= '?return=' . string_url($f_return);
    }
    print_header_redirect($t_uri);
    exit;
}
# Determine if secure_session should default on or off?
# - If no errors, and no cookies set, default to on.
# - If no errors, but cookie is set, use the cookie value.
# - If errors, use the value passed in.
if ($t_session_validation) {
    if (!$f_error && !$f_cookie_error) {
        $t_default_secure_session = is_null($f_secure_session_cookie) ? true : $f_secure_session_cookie;
    } else {
        $t_default_secure_session = $f_secure_session;
    }
}
# Determine whether the username or password field should receive automatic focus.
$t_username_field_autofocus = 'autofocus';
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:login_page.php


示例18: print_header_redirect

                        case 'bug_view_page.php':
                        case 'bug_view_advanced_page.php':
                        case 'bug_update_page.php':
                        case 'bug_change_status_page.php':
                            $t_path = $t_home_page;
                            break;
                        default:
                            $t_path = $t_referrer_page . $t_param;
                            break;
                    }
                    $t_redirect_url = $t_path;
                } else {
                    if ($t_referrer_page == 'plugin.php') {
                        $t_redirect_url = $t_referrer_page . $t_param;
                        # redirect to same plugin page
                    } else {
                        $t_redirect_url = $t_home_page;
                    }
                }
            }
        } else {
            $t_redirect_url = $t_home_page;
        }
    }
}
print_header_redirect($t_redirect_url, true, true);
html_page_top1();
html_meta_redirect($t_redirect_url);
html_page_top1();
html_operation_successful($t_redirect_url);
html_page_bottom();
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:set_project.php


示例19: require_api

 * @uses event_api.php
 * @uses form_api.php
 * @uses gpc_api.php
 * @uses print_api.php
 * @uses project_api.php
 */
require_once 'core.php';
require_api('access_api.php');
require_api('authentication_api.php');
require_api('config_api.php');
require_api('event_api.php');
require_api('form_api.php');
require_api('gpc_api.php');
require_api('print_api.php');
require_api('project_api.php');
form_security_validate('manage_proj_update');
auth_reauthenticate();
$f_project_id = gpc_get_int('project_id');
$f_name = gpc_get_string('name');
$f_description = gpc_get_string('description');
$f_status = gpc_get_int('status');
$f_view_state = gpc_get_int('view_state');
$f_file_path = gpc_get_string('file_path', '');
$f_enabled = gpc_get_bool('enabled');
$f_inherit_global = gpc_get_bool('inherit_global', 0);
access_ensure_project_level(config_get('manage_project_threshold'), $f_project_id);
project_update($f_project_id, $f_name, $f_description, $f_status, $f_view_state, $f_file_path, $f_enabled, $f_inherit_global);
event_signal('EVENT_MANAGE_PROJECT_UPDATE', array($f_project_id));
form_security_purge('manage_proj_update');
print_header_redirect('manage_proj_page.php');
开发者ID:gtn,项目名称:mantisbt,代码行数:30,代码来源:manage_proj_update.php


示例20: gpc_get_string

#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
/**
 * login_anon.php logs a user in anonymously without having to enter a username
 * or password.
 *
 * Depends on two global configuration variables:
 * allow_anonymous_login - bool which must be true to allow anonymous login.
 * anonymous_account - name of account to login with.
 *
 * TODO:
 * Check how manage account is impacted.
 * Might be extended to allow redirects for bug links etc.
 * @package MantisBT
 * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - [email protected]
 * @copyright Copyright (C) 2002 - 2014  MantisBT Team - [email protected]
 * @link http://www.mantisbt.org
 */
/**
 * MantisBT Core API's
 */
require_once 'core.php';
$f_return = gpc_get_string('return', '');
$t_anonymous_account = config_get('anonymous_account');
if ($f_return !== '') {
    $t_return = string_url(string_sanitize_url($f_return));
    print_header_redirect("login.php?username={$t_anonymous_account}&perm_login=false&return={$t_return}");
} else {
    print_header_redirect("login.php?username={$t_anonymous_account}&perm_login=false");
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:31,代码来源:login_anon.php



注:本文中的print_header_redirect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP print_header_simple函数代码示例发布时间:2022-05-15
下一篇:
PHP print_header函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap