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

PHP gpc_set_cookie函数代码示例

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

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



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

示例1: helper_set_current_project

function helper_set_current_project($p_project_id)
{
    $t_project_cookie_name = config_get('project_cookie');
    gpc_set_cookie($t_project_cookie_name, $p_project_id, true);
    return true;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:6,代码来源:helper_api.php


示例2: string_display_line_links

, '<?php 
        echo AGILEMANTIS_PLUGIN_URL;
        ?>
');"
					height="16" width="16">
				</td>
				<td>
				<?php 
        echo string_display_line_links($row['summary']);
        ?>
			</td>
			</tr>
	<?php 
    }
    # add bug list cookie
    gpc_set_cookie(config_get('bug_list_cookie'), substr($t_buglist, 0, -1));
}
$additional_fields = 7;
$additional_fields += plugin_config_get('gadiv_tracker_planned_costs');
$additional_fields += plugin_config_get('gadiv_ranking_order');
?>
	<tr>
		<?php 
if (plugin_config_get('gadiv_ranking_order') == '1') {
    ?>
		<td style="background-color: #B1DDFF"></td>
		<?php 
}
?>
		<td style="background-color: #B1DDFF"></td>
		<?php 
开发者ID:CarlosPinedaT,项目名称:agileMantis,代码行数:31,代码来源:assume_userstories.php


示例3: array

if ($t_highlight_changed != -1) {
    $my_filter[FILTER_PROPERTY_HIGHLIGHT_CHANGED] = $t_highlight_changed;
}
# Handle custom fields.
$t_custom_fields = array();
foreach ($_GET as $t_var_name => $t_var_value) {
    if (strpos($t_var_name, 'custom_field_') === 0) {
        $t_custom_field_id = utf8_substr($t_var_name, 13);
        $t_custom_fields[$t_custom_field_id] = $t_var_value;
    }
}
$my_filter['custom_fields'] = $t_custom_fields;
# Must use advanced filter so that the project_id is applied and multiple
# selections are handled.
$my_filter['_view_type'] = 'advanced';
$tc_setting_arr = filter_ensure_valid_filter($my_filter);
$t_settings_serialized = serialize($tc_setting_arr);
$t_settings_string = config_get('cookie_version') . '#' . $t_settings_serialized;
# Store the filter string in the database: its the current filter, so some values won't change
$t_project_id = helper_get_current_project();
$t_project_id = $t_project_id * -1;
$t_row_id = filter_db_set_for_current_user($t_project_id, false, '', $t_settings_string);
# set cookie values
gpc_set_cookie(config_get('view_all_cookie'), $t_row_id, time() + config_get('cookie_time_length'), config_get('cookie_path'));
# redirect to print_all or view_all page
if ($f_print) {
    $t_redirect_url = 'print_all_bug_page.php';
} else {
    $t_redirect_url = 'view_all_bug_page.php';
}
print_header_redirect($t_redirect_url);
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:31,代码来源:search.php


示例4: destroy

	/**
	 * destroy session
	 */
	function destroy() {
		if( isset( $_COOKIE[session_name()] ) && !headers_sent() ) {
			gpc_set_cookie( session_name(), '', time() - 42000 );
		}

		unset( $_SESSION[ $this->key ] );
	}
开发者ID:rombert,项目名称:mantisbt,代码行数:10,代码来源:session_api.php


示例5: gpc_get_int

    if ($t_filter_reset) {
        $t_filter_user_value = META_FILTER_NONE;
        $t_filter_project_value = META_FILTER_NONE;
        $t_filter_config_value = META_FILTER_NONE;
    } else {
        $t_filter_user_value = gpc_get_int('filter_user_id', ALL_USERS);
        $t_filter_project_value = gpc_get_int('filter_project_id', ALL_PROJECTS);
        $t_filter_config_value = check_config_value(gpc_get_string('filter_config_id', META_FILTER_NONE));
    }
}
# Manage filter's persistency through cookie
$t_cookie_name = config_get('manage_config_cookie');
if ($t_filter_save) {
    # Save user's filter to the cookie
    $t_cookie_string = implode(':', array($t_filter_user_value, $t_filter_project_value, $t_filter_config_value));
    gpc_set_cookie($t_cookie_name, $t_cookie_string, true);
} else {
    # Retrieve the filter from the cookie if it exists
    $t_cookie_string = gpc_get_cookie($t_cookie_name, null);
    if (null !== $t_cookie_string) {
        $t_cookie_contents = explode(':', $t_cookie_string);
        $t_filter_user_value = $t_cookie_contents[0];
        $t_filter_project_value = $t_cookie_contents[1];
        $t_filter_config_value = check_config_value($t_cookie_contents[2]);
        if ($t_filter_project_value != META_FILTER_NONE && !project_exists($t_filter_project_value)) {
            $t_filter_project_value = ALL_PROJECTS;
        }
    }
}
# Get config edit values
$t_edit_user_id = gpc_get_int('user_id', $t_filter_user_value == META_FILTER_NONE ? ALL_USERS : $t_filter_user_value);
开发者ID:sfranks1124,项目名称:mantisbt,代码行数:31,代码来源:adm_config_report.php


示例6: auth_http_set_logout_pending

/**
 *
 * @param bool $p_pending
 * @access public
 */
function auth_http_set_logout_pending($p_pending)
{
    $t_cookie_name = config_get('logout_cookie');
    if ($p_pending) {
        gpc_set_cookie($t_cookie_name, '1', false);
    } else {
        $t_cookie_path = config_get('cookie_path');
        gpc_clear_cookie($t_cookie_name, $t_cookie_path);
    }
}
开发者ID:kaos,项目名称:mantisbt,代码行数:15,代码来源:authentication_api.php


示例7: require_api

require_api('string_api.php');
$t_allow_perm_login = ON == config_get('allow_permanent_cookie');
$f_username = gpc_get_string('username', '');
$f_password = gpc_get_string('password', '');
$f_perm_login = $t_allow_perm_login && gpc_get_bool('perm_login');
$t_return = string_url(string_sanitize_url(gpc_get_string('return', config_get('default_home_page'))));
$f_from = gpc_get_string('from', '');
$f_secure_session = gpc_get_bool('secure_session', false);
$f_install = gpc_get_bool('install');
# If upgrade required, always redirect to install page.
if ($f_install) {
    $t_return = 'admin/install.php';
}
$f_username = auth_prepare_username($f_username);
$f_password = auth_prepare_password($f_password);
gpc_set_cookie(config_get_global('cookie_prefix') . '_secure_session', $f_secure_session ? '1' : '0');
if (auth_attempt_login($f_username, $f_password, $f_perm_login)) {
    session_set('secure_session', $f_secure_session);
    if ($f_username == 'administrator' && $f_password == 'root' && (is_blank($t_return) || $t_return == 'index.php')) {
        $t_return = 'account_page.php';
    }
    $t_redirect_url = 'login_cookie_test.php?return=' . $t_return;
} else {
    $t_redirect_url = 'login_page.php?return=' . $t_return . '&error=1&username=' . urlencode($f_username) . '&secure_session=' . ($f_secure_session ? 1 : 0);
    if ($t_allow_perm_login) {
        $t_redirect_url .= '&perm_login=' . ($f_perm_login ? 1 : 0);
    }
    if (HTTP_AUTH == config_get('login_method')) {
        auth_http_prompt();
        exit;
    }
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:login.php


示例8: filter_get_bug_rows

$t_page_count = null;
$rows = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true);
if ($rows === false) {
    print_header_redirect('view_all_set.php?type=0');
}
$t_bugslist = array();
$t_users_handlers = array();
$t_project_ids = array();
$t_row_count = count($rows);
for ($i = 0; $i < $t_row_count; $i++) {
    array_push($t_bugslist, $rows[$i]->id);
    $t_users_handlers[] = $rows[$i]->handler_id;
    $t_project_ids[] = $rows[$i]->project_id;
}
$t_unique_users_handlers = array_unique($t_users_handlers);
$t_unique_project_ids = array_unique($t_project_ids);
user_cache_array_rows($t_unique_users_handlers);
project_cache_array_rows($t_unique_project_ids);
gpc_set_cookie(config_get('bug_list_cookie'), implode(',', $t_bugslist));
compress_enable();
# don't index view issues pages
html_robots_noindex();
html_page_top1(lang_get('view_bugs_link'));
if (current_user_get_pref('refresh_delay') > 0) {
    html_meta_redirect('view_all_bug_page.php?page_number=' . $f_page_number, current_user_get_pref('refresh_delay') * 60);
}
html_page_top2();
print_recently_visited();
define('VIEW_ALL_INC_ALLOW', true);
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'view_all_inc.php';
html_page_bottom();
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:31,代码来源:view_all_bug_page.php


示例9: helper_set_current_project

/**
 * Set the current project id (stored in a cookie)
 * @param int $p_project_id
 * @return bool always true
 */
function helper_set_current_project($p_project_id)
{
    global $g_cache_current_project;
    $t_project_cookie_name = config_get('project_cookie');
    $g_cache_current_project = $p_project_id;
    gpc_set_cookie($t_project_cookie_name, $p_project_id, true);
    return true;
}
开发者ID:rahmanjis,项目名称:dipstart-development,代码行数:13,代码来源:helper_api.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP gpc_string_to_bool函数代码示例发布时间:2022-05-15
下一篇:
PHP gpc_get_string_array函数代码示例发布时间: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