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


PHP Current_User::errorPage方法代碼示例

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


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

示例1: admin

 /**
  * Handles admin functions outside of file manager.
  * Expects an 'aop' command.
  */
 public function admin()
 {
     $javascript = false;
     // if true, sends to nakedDisplay
     $this->loadPanel();
     if (isset($_REQUEST['aop'])) {
         $aop = $_REQUEST['aop'];
     } else {
         $aop = $this->panel->getCurrentTab();
     }
     if (!Current_User::isLogged()) {
         Current_User::disallow();
         return;
     }
     if ($aop != 'edit_image' && $aop != 'get_images' && !Current_User::allow('filecabinet')) {
         Current_User::disallow();
         return;
     }
     // Requires an unrestricted user
     switch ($aop) {
         case 'delete_folder':
         case 'unpin':
             if (Current_User::isRestricted('filecabinet')) {
                 Current_User::disallow();
             }
     }
     switch ($aop) {
         case 'image':
             $this->panel->setCurrentTab('image');
             $this->title = dgettext('filecabinet', 'Image folders');
             $this->loadForms();
             $this->forms->getFolders(IMAGE_FOLDER);
             break;
         case 'multimedia':
             $this->panel->setCurrentTab('multimedia');
             $this->title = dgettext('filecabinet', 'Multimedia folders');
             $this->loadForms();
             $this->forms->getFolders(MULTIMEDIA_FOLDER);
             break;
         case 'add_folder':
             if (!Current_User::allow('filecabinet', 'edit_folders', null, null, true)) {
                 Current_User::disallow();
             }
             $javascript = true;
             $this->loadFolder();
             $this->addFolder();
             break;
         case 'classify':
             if (!Current_User::isDeity()) {
                 Current_User::errorPage();
             }
             $this->loadForms();
             $this->forms->classifyFileList();
             break;
         case 'classify_action':
             if (!Current_User::isDeity() || !Current_User::verifyAuthKey()) {
                 Current_User::errorPage();
             }
             $this->classifyAction();
             break;
         case 'classify_file':
             if (!Current_User::isDeity() || !Current_User::verifyAuthKey()) {
                 Current_User::disallow();
             }
             $this->loadForms();
             if (!empty($_POST['file_list'])) {
                 $this->forms->classifyFile($_POST['file_list']);
             } elseif (isset($_GET['file'])) {
                 $this->forms->classifyFile($_GET['file']);
             } else {
                 $this->forms->classifyFileList();
             }
             break;
         case 'post_classifications':
             if (!Current_User::isDeity()) {
                 Current_User::errorPage();
             }
             $result = $this->classifyFiles();
             if (is_array($result)) {
                 $this->message = implode('<br />', $result);
             }
             $this->loadForms();
             $this->forms->classifyFileList();
             break;
         case 'unpin':
             if (!Current_User::authorized('filecabinet')) {
                 Current_User::disallow();
             }
             Cabinet::unpinFolder();
             PHPWS_Core::goBack();
             break;
         case 'pin_form':
             $javascript = true;
             @($key_id = (int) $_GET['key_id']);
             if (!$key_id) {
                 javascript('close_refresh', array('refresh' => 0));
//.........這裏部分代碼省略.........
開發者ID:HaldunA,項目名稱:phpwebsite,代碼行數:101,代碼來源:Cabinet.php


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