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


PHP Csrf::add_placeholder方法代码示例

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


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

示例1: __construct

 /**
  * Constructor   -> Create the module-menu and an internal template-object
  * @global   InitCMS
  * @global   \Cx\Core\Html\Sigma
  * @global   array
  */
 function __construct()
 {
     global $objInit, $objTemplate, $_CORELANG;
     parent::__construct();
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_MODULE_PATH . '/Blog/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_intLanguageId = FRONTEND_LANG_ID;
     $objFWUser = \FWUser::getFWUserObject();
     $this->_intCurrentUserId = $objFWUser->objUser->getId();
     $strNavigation = '';
     $isAdmin = $objFWUser->objUser->getAdminStatus();
     //if(in_array(120, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
     $strNavigation .= '<a href="index.php?cmd=Blog" 
                 class="' . ($_GET['act'] == '' ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_ENTRY_MANAGE_TITLE'] . '</a>';
     //}
     if (in_array(121, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
         $strNavigation .= '<a href="index.php?cmd=Blog&amp;act=addEntry" 
                 class="' . (in_array($_GET['act'], array('addEntry', 'editEntry')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_ENTRY_ADD_TITLE'] . '</a>';
     }
     if (in_array(122, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
         $strNavigation .= '<a href="index.php?cmd=Blog&amp;act=manageCategory" 
                 class="' . (in_array($_GET['act'], array('manageCategory', 'manageCategory')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_CATEGORY_MANAGE_TITLE'] . '</a>';
     }
     if (in_array(125, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
         $strNavigation .= '<a href="index.php?cmd=Blog&amp;act=networks" 
                 class="' . (in_array($_GET['act'], array('networks', 'editNetwork')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_NETWORKS_TITLE'] . '</a>';
     }
     if (in_array(124, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
         $strNavigation .= '<a href="index.php?cmd=Blog&amp;act=settings" 
                 class="' . (in_array($_GET['act'], array('settings')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_SETTINGS_TITLE'] . '</a>';
     }
     $objTemplate->setVariable('CONTENT_NAVIGATION', $strNavigation);
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:40,代码来源:BlogManager.class.php

示例2: __construct

 /**
  * constructor
  *
  * global    object    $objTemplate
  * global    array    $_ARRAYLANG
  */
 function __construct()
 {
     global $objTemplate, $_ARRAYLANG;
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_CORE_MODULE_PATH . '/NetTools/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:13,代码来源:NetToolsManager.class.php

示例3: __construct

 /**
  * Headlines constructor
  * 
  * @param string $pageContent Template content
  */
 function __construct($pageContent)
 {
     parent::__construct('.');
     $this->getSettings();
     $this->pageContent = $pageContent;
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:12,代码来源:CalendarHeadlines.class.php

示例4: __construct

 /**
  * Constructor    -> Create the menu and copy the template
  *
  * @global    array
  * @global    \Cx\Core\Html\Sigma
  * @global    InitCMS
  */
 function __construct()
 {
     global $_ARRAYLANG, $objTemplate, $objInit;
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_MODULE_PATH . '/Gallery/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     \JS::registerCSS(substr(ASCMS_MODULE_FOLDER . '/Gallery/View/Style/main.css', 1));
     $this->intLangId = $objInit->userFrontendLangId;
     $this->strImagePath = ASCMS_GALLERY_PATH . '/';
     $this->strImageWebPath = ASCMS_GALLERY_WEB_PATH . '/';
     $this->strThumbnailPath = ASCMS_GALLERY_THUMBNAIL_PATH . '/';
     $this->strThumbnailWebPath = ASCMS_GALLERY_THUMBNAIL_WEB_PATH . '/';
     $this->strImportPath = ASCMS_GALLERY_IMPORT_PATH . '/';
     $this->importWebPath = ASCMS_GALLERY_IMPORT_WEB_PATH . '/';
     if (imagetypes() & IMG_GIF) {
         $this->boolGifEnabled = true;
     }
     if (imagetypes() & IMG_JPG) {
         $this->boolJpgEnabled = true;
     }
     if (imagetypes() & IMG_PNG) {
         $this->boolPngEnabled = true;
     }
     $this->getSettings();
     $this->checkImages();
     parent::__construct();
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:34,代码来源:GalleryManager.class.php

示例5: __construct

 /**
  * Constructor
  */
 function __construct($pageContent)
 {
     $this->pageContent = $pageContent;
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_DOCUMENT_ROOT);
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->path = ASCMS_DIR_PATH . '/';
     $this->webPath = ASCMS_DIR_WEB_PATH . '/';
     $this->imagePath = ASCMS_DIR_PATH . '/View/Media';
     $this->imageWebPath = ASCMS_DIR_WEB_PATH . '/View/Media';
     $this->mediaPath = ASCMS_MODULE_MEDIA_PATH . '/';
     $this->mediaWebPath = ASCMS_MODULE_MEDIA_WEB_PATH . '/';
     $this->rssPath = ASCMS_DIRECTORY_FEED_PATH . '/';
     $this->rssWebPath = ASCMS_DIRECTORY_FEED_WEB_PATH . '/';
     $this->folderImageLarge = "<img src='../../modules/Directory/View/Media/_folder_24.gif' alt='' />";
     $this->folderImageSmall = "<img src='../../modules/Directory/View/Media/_folder.gif' alt='' />";
     //create latest xml. (Dave, 2009-03-04: This sucks, as it causes the start
     //                    page to break if the FTP server doesn't work. And why
     //                    the hell do we need to re-create the RSS here anyhow?)
     #$this->createRSSlatest();
     //get settings
     $this->settings = $this->getSettings();
     //check community modul
     $objModulManager = new \Cx\Core\ComponentManager\Controller\ComponentManager();
     $arrInstalledModules = $objModulManager->getModules();
     if (in_array(23, $arrInstalledModules)) {
         $this->communityModul = true;
     } else {
         $this->communityModul = false;
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:34,代码来源:Directory.class.php

示例6: __construct

 /**
  * Constructor
  *
  * @access  publice
  */
 public function __construct()
 {
     $this->objTemplate = new \Cx\Core\Html\Sigma(ASCMS_DOCUMENT_ROOT);
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->objTemplate);
     $this->objTemplate->setErrorHandling(PEAR_ERROR_DIE);
     $this->objTemplate->loadTemplateFile('/core/Core/View/Template/Backend/Index.html');
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:12,代码来源:LoginManager.class.php

示例7: __construct

 /**
  * PHP5 constructor
  *
  * @global \Cx\Core\Html\Sigma
  * @global array
  * @global array
  * @global array
  */
 function __construct()
 {
     global $_ARRAYLANG;
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_MODULE_PATH . '/Block/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     if (isset($_GET['added']) && $_GET['added'] == 'true') {
         if (!empty($_GET['blockname'])) {
             $this->_strOkMessage = sprintf($_ARRAYLANG['TXT_BLOCK_BLOCK_ADDED_SUCCESSFULLY'], contrexx_raw2xhtml($_GET['blockname']));
         } else {
             $this->_strOkMessage = $_ARRAYLANG['TXT_BLOCK_BLOCK_ADDED_SUCCESSFULLY'];
         }
     }
     if (isset($_GET['modified']) && $_GET['modified'] == 'true') {
         if (!empty($_GET['blockname'])) {
             $this->_strOkMessage = sprintf($_ARRAYLANG['TXT_BLOCK_BLOCK_UPDATED_SUCCESSFULLY'], contrexx_raw2xhtml($_GET['blockname']));
         } else {
             $this->_strOkMessage = $_ARRAYLANG['TXT_BLOCK_BLOCK_UPDATED_SUCCESSFULLY'];
         }
     }
     if (isset($_POST['saveSettings'])) {
         $arrSettings = array('blockStatus' => isset($_POST['blockUseBlockSystem']) ? intval($_POST['blockUseBlockSystem']) : 0, 'blockRandom' => isset($_POST['blockUseBlockRandom']) ? intval($_POST['blockUseBlockRandom']) : 0);
         $this->_saveSettings($arrSettings);
         $this->_strOkMessage = $_ARRAYLANG['TXT_SETTINGS_UPDATED'];
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:34,代码来源:BlockManager.class.php

示例8: __construct

 /**
  * Constructor
  * @global object $objTemplate
  */
 function __construct($pageContent)
 {
     $this->pageContent = $pageContent;
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->mediaPath = ASCMS_MARKET_MEDIA_PATH . '/';
     $this->mediaWebPath = ASCMS_MARKET_MEDIA_WEB_PATH . '/';
     //get settings
     $this->settings = $this->getSettings();
     //check community modul
     $objModulManager = new \Cx\Core\ComponentManager\Controller\ComponentManager();
     $arrInstalledModules = $objModulManager->getModules();
     if (in_array(23, $arrInstalledModules)) {
         $this->communityModul = true;
     } else {
         $this->communityModul = false;
     }
     //ipn Check
     if (isset($_GET['act'])) {
         switch ($_GET['act']) {
             case "paypalIpnCheck":
                 $objPaypal = new \PayPal();
                 $objPaypal->ipnCheck();
                 exit;
                 break;
             default:
                 //nothging
                 break;
         }
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:36,代码来源:Market.class.php

示例9: __construct

 function __construct($pageContent)
 {
     $this->pageContent = $pageContent;
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:7,代码来源:Feed.class.php

示例10: __construct

 /**
  * Constructor
  *
  * @global \Cx\Core\Html\Sigma
  * @global array
  */
 public function __construct()
 {
     parent::__construct();
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_CORE_MODULE_PATH . '/Access/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:13,代码来源:AccessManager.class.php

示例11: __construct

 /**
  * PHP5 constructor
  *
  * @global object $objTemplate
  * @global array $_ARRAYLANG
  */
 public function __construct($name)
 {
     global $objTemplate, $_ARRAYLANG, $objJs;
     parent::__construct($name);
     $objJs = new CrmJavascript();
     $cx = \Cx\Core\Core\Controller\Cx::instanciate();
     $this->_mediaPath = $cx->getWebsiteMediaCrmPath();
     $this->_objTpl = new \Cx\Core\Html\Sigma($cx->getCodeBaseModulePath() . '/' . $this->moduleName . '/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->act = $_REQUEST['act'];
     $contentNavigation = '';
     if (\Permission::checkAccess($this->customerAccessId, 'static', true)) {
         $contentNavigation .= "<a href='index.php?cmd=" . $this->moduleName . "&act=customers' class='" . ($this->act == 'customers' ? 'active' : '') . "'  title='" . $_ARRAYLANG['TXT_CRM_CUSTOMERS'] . "'>{$_ARRAYLANG['TXT_CRM_CUSTOMERS']}</a>";
     }
     $contentNavigation .= "<a href='index.php?cmd=" . $this->moduleName . "&act=task' class='" . ($this->act == 'task' ? 'active' : '') . "' title='{$_ARRAYLANG['TXT_CRM_TASKS']}'>{$_ARRAYLANG['TXT_CRM_TASKS']}</a>\n             <a href='index.php?cmd=" . $this->moduleName . "&act=deals' class='" . ($this->act == 'deals' ? 'active' : '') . "' title='{$_ARRAYLANG['TXT_CRM_OPPORTUNITY']}'>{$_ARRAYLANG['TXT_CRM_OPPORTUNITY']}</a>";
     if (\Permission::checkAccess($this->adminAccessId, 'static', true)) {
         $contentNavigation .= "<a href='index.php?cmd=" . $this->moduleName . "&act=settings' class='" . ($this->act == 'settings' || $this->act == 'mailtemplate_overview' || $this->act == 'mailtemplate_edit' ? 'active' : '') . "' title='" . $_ARRAYLANG['TXT_CRM_SETTINGS'] . "'>" . $_ARRAYLANG['TXT_CRM_SETTINGS'] . "</a>";
     }
     $objTemplate->setVariable("CONTENT_NAVIGATION", $contentNavigation);
     $dispatcher = CrmEventDispatcher::getInstance();
     $default_handler = new \Cx\Modules\Crm\Model\Events\CrmDefaultEventHandler();
     $dispatcher->addHandler(CRM_EVENT_ON_USER_ACCOUNT_CREATED, $default_handler);
     $dispatcher->addHandler(CRM_EVENT_ON_TASK_CREATED, $default_handler);
     $dispatcher->addHandler(CRM_EVENT_ON_ACCOUNT_UPDATED, $default_handler);
     $this->_initCrmModule();
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:33,代码来源:CrmManager.class.php

示例12: getPage

 public function getPage($pos, $page_content)
 {
     global $_CONFIG, $_ARRAYLANG;
     $objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($objTpl);
     $objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $objTpl->setTemplate($page_content);
     $objTpl->setGlobalVariable($_ARRAYLANG);
     $term = isset($_REQUEST['term']) ? trim(contrexx_input2raw($_REQUEST['term'])) : '';
     if (strlen($term) >= 3) {
         $term = trim(contrexx_input2raw($_REQUEST['term']));
         $this->setTerm($term);
         $eventHandlerInstance = \Env::get('cx')->getEvents();
         $eventHandlerInstance->triggerEvent('SearchFindContent', array($this));
         if ($this->result->size() == 1) {
             $arraySearchResults[] = $this->result->toArray();
         } else {
             $arraySearchResults = $this->result->toArray();
         }
         usort($arraySearchResults, function ($a, $b) {
             if ($a['Score'] == $b['Score']) {
                 if (isset($a['Date'])) {
                     if ($a['Date'] == $b['Date']) {
                         return 0;
                     }
                     if ($a['Date'] > $b['Date']) {
                         return -1;
                     }
                     return 1;
                 }
                 return 0;
             }
             if ($a['Score'] > $b['Score']) {
                 return -1;
             }
             return 1;
         });
         $countResults = sizeof($arraySearchResults);
         if (!is_numeric($pos)) {
             $pos = 0;
         }
         $paging = getPaging($countResults, $pos, '&amp;section=Search&amp;term=' . contrexx_raw2encodedUrl($term), '<b>' . $_ARRAYLANG['TXT_SEARCH_RESULTS'] . '</b>', true);
         $objTpl->setVariable('SEARCH_PAGING', $paging);
         $objTpl->setVariable('SEARCH_TERM', contrexx_raw2xhtml($term));
         if ($countResults > 0) {
             $searchComment = sprintf($_ARRAYLANG['TXT_SEARCH_RESULTS_ORDER_BY_RELEVANCE'], contrexx_raw2xhtml($term), $countResults);
             $objTpl->setVariable('SEARCH_TITLE', $searchComment);
             $arraySearchOut = array_slice($arraySearchResults, $pos, $_CONFIG['corePagingLimit']);
             foreach ($arraySearchOut as $details) {
                 $objTpl->setVariable(array('COUNT_MATCH' => $_ARRAYLANG['TXT_RELEVANCE'] . ' ' . $details['Score'] . '%', 'LINK' => '<b><a href="' . $details['Link'] . '" title="' . contrexx_raw2xhtml($details['Title']) . '">' . contrexx_raw2xhtml($details['Title']) . '</a></b>', 'SHORT_CONTENT' => contrexx_raw2xhtml($details['Content'])));
                 $objTpl->parse('search_result');
             }
             return $objTpl->get();
         }
     }
     $noresult = $term != '' ? sprintf($_ARRAYLANG['TXT_NO_SEARCH_RESULTS'], $term) : $_ARRAYLANG['TXT_PLEASE_ENTER_SEARCHTERM'];
     $objTpl->setVariable('SEARCH_TITLE', $noresult);
     return $objTpl->get();
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:59,代码来源:Search.class.php

示例13: __construct

 function __construct($pageContent)
 {
     parent::__construct();
     $this->getSettings();
     $this->_pageContent = $pageContent;
     $this->_objTemplate = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTemplate);
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:8,代码来源:NewsHeadlines.class.php

示例14: __construct

 /**
  * constructor
  *
  * global    \Cx\Core\Html\Sigma
  * global    array
  */
 function __construct()
 {
     parent::__construct();
     $this->_objTpl = new \Cx\Core\Html\Sigma($this->cx->getCodeBaseCoreModulePath() . '/Stats/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->firstDate = time();
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:14,代码来源:Stats.class.php

示例15: __construct

 /**
  * PHP 5 Constructor
  */
 function __construct()
 {
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_CORE_MODULE_PATH . '/member/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->act = isset($_REQUEST['act']) ? $_REQUEST['act'] : '';
     $this->setNavigation();
 }
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:11,代码来源:admin.class.php


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