当前位置: 首页>>代码示例>>PHP>>正文


PHP check_referrer函数代码示例

本文整理汇总了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
开发者ID:bklein01,项目名称:pligg-cms,代码行数:31,代码来源:story.php

示例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', '');
开发者ID:bendroid,项目名称:pligg-cms,代码行数:31,代码来源:submit.php


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