本文整理汇总了PHP中check_referrer函数的典型用法代码示例。如果您正苦于以下问题:PHP check_referrer函数的具体用法?PHP check_referrer怎么用?PHP check_referrer使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了check_referrer函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirector
// check for redirects
include mnminclude . 'redirector.php';
$x = new redirector($_SERVER['REQUEST_URI']);
header("Location: {$my_pligg_base}/error_404.php");
die;
}
// Hide private group stories
if ($link->link_group_id) {
$privacy = $db->get_var("SELECT group_privacy FROM " . table_groups . " WHERE group_id = {$link->link_group_id}");
if ($privacy == 'private' && !isMember($link->link_group_id)) {
die('Access denied');
}
}
if (isset($_POST['process']) && sanitize($_POST['process'], 3) != '') {
if (sanitize($_POST['process'], 3) == 'newcomment') {
check_referrer();
$vars = array('user_id' => $link->author, 'link_id' => $link->id);
check_actions('comment_subscription', $vars);
insert_comment();
}
}
require_once mnminclude . 'check_behind_proxy.php';
// Set globals
$globals['link_id'] = $link->id;
$globals['category_id'] = $link->category;
$globals['category_name'] = $link->category_name();
$globals['category_url'] = $link->category_safe_name();
$vars = '';
check_actions('story_top', $vars);
$main_smarty->assign('link_submitter', $link->username());
// setup breadcrumbs and page title
示例2: Smarty
include_once 'internal/Smarty.class.php';
$main_smarty = new Smarty();
include 'config.php';
include mnminclude . 'html1.php';
include mnminclude . 'link.php';
include mnminclude . 'tags.php';
include mnminclude . 'user.php';
include mnminclude . 'smartyvariables.php';
if (!$_COOKIE['referrer']) {
if (empty($_POST['phase']) && !empty($_GET['url'])) {
if (!empty($_GET['url'])) {
$_POST['url'] = $_GET['url'];
}
}
$url = htmlspecialchars(sanitize($_POST['url'], 3));
check_referrer($url);
}
// html tags allowed during submit
if (checklevel('admin')) {
$Story_Content_Tags_To_Allow = Story_Content_Tags_To_Allow_God;
} elseif (checklevel('moderator')) {
$Story_Content_Tags_To_Allow = Story_Content_Tags_To_Allow_Admin;
} else {
$Story_Content_Tags_To_Allow = Story_Content_Tags_To_Allow_Normal;
}
$main_smarty->assign('Story_Content_Tags_To_Allow', htmlspecialchars($Story_Content_Tags_To_Allow));
#print_r($_SESSION);
#exit;
// breadcrumbs and page titles
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Submit');
$navwhere['link1'] = getmyurl('submit', '');