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


PHP sensitiveIO::unsetRequest方法代码示例

本文整理汇总了PHP中sensitiveIO::unsetRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP sensitiveIO::unsetRequest方法的具体用法?PHP sensitiveIO::unsetRequest怎么用?PHP sensitiveIO::unsetRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sensitiveIO的用法示例。


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

示例1: dirname

//
// $Id: page-previsualization.php,v 1.5 2010/03/08 16:41:19 sebastien Exp $
/**
 * PHP page : page previsualization
 * Used to view the page edited data.
 *
 * @package Automne
 * @subpackage admin
 * @author Antoine Pouch <antoine.pouch@ws-interactive.fr> &
 * @author Sébastien Pauchet <sebastien.pauchet@ws-interactive.fr>
 */
require_once dirname(__FILE__) . '/../../cms_rc_admin.php';
$currentPage = sensitiveIO::request('currentPage', 'sensitiveIO::isPositiveInteger', CMS_session::getPageID());
$draft = sensitiveIO::request('draft') ? true : false;
//unset request to avoid it to have interaction with page code
sensitiveIO::unsetRequest(array('draft', 'currentPage'));
//CHECKS
if (!SensitiveIO::isPositiveInteger($currentPage)) {
    die("Invalid page");
}
//view edited or edition mode ?
$cms_visual_mode = $draft ? PAGE_VISUALMODE_HTML_EDITION : PAGE_VISUALMODE_HTML_EDITED;
$cms_page = CMS_tree::getPageByID($currentPage);
if (!$cms_user->hasPageClearance($cms_page->getID(), CLEARANCE_PAGE_EDIT)) {
    die('No rigths on page ...');
    exit;
}
//unset vars to avoid interraction with page
unset($currentPage);
unset($draft);
echo $cms_page->getContent($cms_language, $cms_visual_mode);
开发者ID:davidmottet,项目名称:automne,代码行数:31,代码来源:page-previsualization.php

示例2: dirname

// $Id: templates-rows.php,v 1.4 2010/03/08 16:41:22 sebastien Exp $
/**
 * PHP page : template default rows
 * Used to view and set the default template rows
 *
 * @package Automne
 * @subpackage admin
 * @author Antoine Pouch <antoine.pouch@ws-interactive.fr> &
 * @author Sébastien Pauchet <sebastien.pauchet@ws-interactive.fr>
 */
require_once dirname(__FILE__) . '/../../cms_rc_admin.php';
define("MESSAGE_PAGE_TITLE", 852);
$view = CMS_view::getInstance();
$templateId = sensitiveIO::request('template', 'sensitiveIO::isPositiveInteger');
//unset request to avoid it to have interaction with page code
sensitiveIO::unsetRequest(array('template'));
//CHECKS
if (!SensitiveIO::isPositiveInteger($templateId)) {
    die("Invalid template");
}
$template = CMS_pageTemplatesCatalog::getByID($templateId);
if (!is_object($template) || $template->hasError()) {
    die("Invalid template or template error");
}
//RIGHTS CHECK
if (!$cms_user->hasAdminClearance(CLEARANCE_ADMINISTRATION_EDIT_TEMPLATES)) {
    //templates
    die("User has no rights on template edition");
}
$dummy_page = CMS_tree::getRoot();
$dummy_page->setTitle($cms_language->getMessage(MESSAGE_PAGE_TITLE, array($template->getLabel())), $cms_user);
开发者ID:davidmottet,项目名称:automne,代码行数:31,代码来源:templates-rows.php

示例3:

//block flash
$width = sensitiveIO::request('flashwidth');
$height = sensitiveIO::request('flashheight');
$name = sensitiveIO::request('flashname');
$version = sensitiveIO::request('flashversion');
$params = sensitiveIO::request('flashparams');
$flashvars = sensitiveIO::request('flashvars');
$attributes = sensitiveIO::request('flashattributes');
//block image
$imagelink = sensitiveIO::request('imagelink');
$imagelabel = sensitiveIO::request('imagelabel');
$zoomname = sensitiveIO::request('zoomname');
//block link
$linktext = sensitiveIO::request('link');
//unset requests to avoid them to have interaction with evaluated page codes
sensitiveIO::unsetRequest(array_keys($_REQUEST));
//try to instanciate the requested page
$cms_page = CMS_tree::getPageByID($currentPage);
//instanciate page and check if user has view rights on it
if (isset($cms_page) && $cms_page->hasError()) {
    CMS_grandFather::raiseError('Error on page : ' . $cms_page->getID());
    $view->show();
}
//check for edit rights for user
if (!$cms_user->hasPageClearance($cms_page->getID(), CLEARANCE_PAGE_EDIT)) {
    CMS_grandFather::raiseError('Error, user has no rights on page : ' . $cms_page->getID());
    $view->show();
}
//check for lock
if ($cms_page->getLock() && $cms_page->getLock() != $cms_user->getUserId()) {
    CMS_grandFather::raiseError('Page ' . $currentPage . ' is currently locked by another user and can\'t be updated.');
开发者ID:davidmottet,项目名称:automne,代码行数:31,代码来源:page-content-controler.php

示例4: dirname

// $Id: page-content.php,v 1.5 2010/03/08 16:41:19 sebastien Exp $
/**
 * PHP page : page previsualization
 * Used to view the page edited data.
 *
 * @package Automne
 * @subpackage admin
 * @author Antoine Pouch <antoine.pouch@ws-interactive.fr> &
 * @author Sébastien Pauchet <sebastien.pauchet@ws-interactive.fr>
 */
require_once dirname(__FILE__) . '/../../cms_rc_admin.php';
$cms_view = CMS_view::getInstance();
$currentPage = sensitiveIO::request('page', 'sensitiveIO::isPositiveInteger', CMS_session::getPageID());
$action = sensitiveIO::request('action');
//unset request to avoid it to have interaction with page code
sensitiveIO::unsetRequest(array('action', 'page'));
//CHECKS
if (!SensitiveIO::isPositiveInteger($currentPage)) {
    die("Invalid page");
}
$cms_page = CMS_tree::getPageByID($currentPage);
if (!is_object($cms_page) || $cms_page->hasError()) {
    die("Invalid page or page error");
}
//set page to context
CMS_session::setPage($cms_page);
//RIGHTS CHECK
if (!$cms_user->hasPageClearance($cms_page->getID(), CLEARANCE_PAGE_EDIT) || !$cms_user->hasModuleClearance(MOD_STANDARD_CODENAME, CLEARANCE_MODULE_EDIT)) {
    die("User has no rights on page");
} elseif (!$action && !$cms_page->getLock()) {
    $cms_page->lock($cms_user);
开发者ID:davidmottet,项目名称:automne,代码行数:31,代码来源:page-content.php


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