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


PHP IPSLib::fetchInputAsArray方法代碼示例

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


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

示例1: _unlock

 /**
  * Unlock selected accounts
  *
  * @return	@e void		[Outputs to screen]
  */
 protected function _unlock()
 {
     //-----------------------------------------
     // Check
     //-----------------------------------------
     $ids = IPSLib::fetchInputAsArray('mid_');
     if (count($ids) < 1) {
         $this->registry->output->showError($this->lang->words['t_nolockloc'], 11251);
     }
     //-----------------------------------------
     // Unlock
     //-----------------------------------------
     if ($this->request['type'] == 'unlock') {
         try {
             $message = $this->_getManagementClass()->unlockMembers($ids);
         } catch (Exception $error) {
             $this->registry->output->showError($error->getMessage(), 11247);
         }
         $this->registry->output->global_message = $message;
         $this->registry->output->silentRedirectWithMessage($this->settings['base_url'] . 'app=members');
     } else {
         if ($this->request['type'] == 'ban') {
             $this->registry->getClass('class_permissions')->checkPermissionAutoMsg('member_ban', 'members', 'members');
             try {
                 $message = $this->_getManagementClass()->banMembers($ids);
             } catch (Exception $error) {
                 $this->registry->output->showError($error->getMessage(), 11247);
             }
             $this->registry->output->global_message = $message;
             $this->registry->output->silentRedirectWithMessage($this->settings['base_url'] . 'app=members');
         } else {
             if ($this->request['type'] == 'delete') {
                 $this->registry->getClass('class_permissions')->checkPermissionAutoMsg('member_delete', 'members', 'members');
                 $this->registry->output->global_message = $this->_getManagementClass()->deleteMembers($ids);
                 $this->registry->output->silentRedirectWithMessage($this->settings['base_url'] . 'app=members');
             }
         }
     }
 }
開發者ID:Advanture,項目名稱:Online-RolePlay,代碼行數:44,代碼來源:tools.php

示例2: _unlock

 /**
  * Unlock selected accounts
  *
  * @return	@e void		[Outputs to screen]
  */
 protected function _unlock()
 {
     //-----------------------------------------
     // Check
     //-----------------------------------------
     $ids = IPSLib::fetchInputAsArray('mid_');
     if (count($ids) < 1) {
         $this->returnJsonError($this->lang->words['t_nolockloc'], 11251);
     }
     //-----------------------------------------
     // Unlock
     //-----------------------------------------
     if ($this->request['type'] == 'unlock') {
         try {
             $message = $this->_getManagementClass()->unlockMembers($ids);
         } catch (Exception $error) {
             $this->returnJsonError($error->getMessage());
         }
         $this->returnJsonArray(array('ok' => 1, 'msg' => $message));
     } else {
         if ($this->request['type'] == 'ban') {
             $this->registry->getClass('class_permissions')->return = true;
             if (!$this->registry->getClass('class_permissions')->checkPermission('member_ban', 'members', 'members')) {
                 $this->returnJsonError($this->lang->words['no_permission']);
             }
             try {
                 $message = $this->_getManagementClass()->banMembers($ids);
             } catch (Exception $error) {
                 $this->returnJsonError($error->getMessage());
             }
             $this->returnJsonArray(array('ok' => 1, 'msg' => $message));
         } else {
             if ($this->request['type'] == 'delete') {
                 $this->registry->getClass('class_permissions')->return = true;
                 if (!$this->registry->getClass('class_permissions')->checkPermission('member_delete', 'members', 'members')) {
                     $this->returnJsonError($this->lang->words['no_permission']);
                 }
                 $message = $this->_getManagementClass()->deleteMembers($ids);
                 $this->returnJsonArray(array('ok' => 1, 'msg' => $message));
             }
         }
     }
 }
開發者ID:mover5,項目名稱:imobackup,代碼行數:48,代碼來源:members.php


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