當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Csrf::add_code方法代碼示例

本文整理匯總了PHP中Cx\Core\Csrf\Controller\Csrf::add_code方法的典型用法代碼示例。如果您正苦於以下問題:PHP Csrf::add_code方法的具體用法?PHP Csrf::add_code怎麽用?PHP Csrf::add_code使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Cx\Core\Csrf\Controller\Csrf的用法示例。


在下文中一共展示了Csrf::add_code方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getPage

 public function getPage(&$metaPageTitle, &$pageTitle)
 {
     $cmd = isset($_REQUEST['cmd']) ? explode('_', $_REQUEST['cmd']) : array(0 => null);
     $groupId = isset($cmd[1]) ? intval($cmd[1]) : null;
     // add whole component's language data to every application page of component
     $this->_objTpl->setVariable(\Env::get('init')->getComponentSpecificLanguageData('Access'));
     \Cx\Lib\SocialLogin::parseSociallogin($this->_objTpl, 'access_');
     \Cx\Core\Csrf\Controller\Csrf::add_code();
     switch ($cmd[0]) {
         case 'signup':
             $this->signUp();
             break;
         case 'settings':
             $this->settings();
             break;
         case 'members':
             $this->members($groupId);
             break;
         case 'user':
             $this->user($metaPageTitle, $pageTitle);
             break;
         default:
             $this->dashboard();
             break;
     }
     return $this->_objTpl->get();
 }
開發者ID:Niggu,項目名稱:cloudrexx,代碼行數:27,代碼來源:Access.class.php

示例2: getPage

 public function getPage(&$metaPageTitle, &$pageTitle)
 {
     $cmd = isset($_REQUEST['cmd']) ? explode('_', $_REQUEST['cmd']) : array(0 => null);
     $groupId = isset($cmd[1]) ? intval($cmd[1]) : null;
     \Cx\Lib\SocialLogin::parseSociallogin($this->_objTpl, 'access_');
     \Cx\Core\Csrf\Controller\Csrf::add_code();
     switch ($cmd[0]) {
         case 'signup':
             $this->signUp();
             break;
         case 'settings':
             $this->settings();
             break;
         case 'members':
             $this->members($groupId);
             break;
         case 'user':
             $this->user($metaPageTitle, $pageTitle);
             break;
         default:
             $this->dashboard();
             break;
     }
     return $this->_objTpl->get();
 }
開發者ID:nahakiole,項目名稱:cloudrexx,代碼行數:25,代碼來源:Access.class.php

示例3: getPage

 /**
  * Reads $_GET['cmd'] and selects (depending on the value) an action
  *
  */
 function getPage()
 {
     \Cx\Core\Csrf\Controller\Csrf::add_code();
     if (!isset($_GET['cmd'])) {
         $_GET['cmd'] = '';
     }
     switch ($_GET['cmd']) {
         case 'details':
             $this->showDetails($_GET['id']);
             break;
         case 'search':
             $this->showSearch();
             break;
         case 'cloud':
             $this->showTagCloud();
             break;
         default:
             $this->showEntries();
             break;
     }
     return $this->_objTpl->get();
 }
開發者ID:Cloudrexx,項目名稱:cloudrexx,代碼行數:26,代碼來源:Blog.class.php

示例4: getPage

 /**
  * Reads $this->cmd and selects (depending on the value) an action
  *
  */
 public function getPage()
 {
     \Cx\Core\Csrf\Controller\Csrf::add_code();
     switch ($this->cmd) {
         case 'download_file':
             $this->download();
             exit;
             break;
         case 'delete_file':
             $this->deleteDownload();
             $this->overview();
             break;
         case 'delete_category':
             $this->deleteCategory();
             $this->overview();
             break;
         default:
             $this->overview();
             break;
     }
     $this->parseMessages();
     return $this->objTemplate->get();
 }
開發者ID:Cloudrexx,項目名稱:cloudrexx,代碼行數:27,代碼來源:Downloads.class.php

示例5: getPage

 /**
  * get oage
  *
  * Reads the act and selects the right action
  *
  * @access   public
  * @return   string  parsed content
  */
 function getPage()
 {
     \Cx\Core\Csrf\Controller\Csrf::add_code();
     if (!isset($_REQUEST['cmd'])) {
         $_REQUEST['cmd'] = '';
     }
     if (!isset($_GET['lid'])) {
         $_GET['lid'] = '';
     }
     switch ($_REQUEST['cmd']) {
         case 'detail':
             $this->getHits(intval($_GET['id']));
             $this->feedDetails(intval($_GET['id']), intval($_GET['cid']), intval($_GET['lid']));
             break;
         case 'add':
             $this->newFeed();
             break;
         case 'myfeeds':
             $this->myFeeds();
             break;
         case 'latest':
             $this->latest();
             break;
         case 'edit':
             \Cx\Core\Csrf\Controller\Csrf::check_code();
             $this->editFeed();
             break;
         case 'search':
             $this->searchFeed();
             break;
         case 'vote':
             \Cx\Core\Csrf\Controller\Csrf::check_code();
             $this->voteFeed();
             break;
         default:
             if (isset($_GET['linkid'])) {
                 $this->redirectFeed(intval($_GET['linkid']));
             }
             $this->overview();
     }
     return $this->_objTpl->get();
 }
開發者ID:Niggu,項目名稱:cloudrexx,代碼行數:50,代碼來源:Directory.class.php


注:本文中的Cx\Core\Csrf\Controller\Csrf::add_code方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。