コード例 #1
0
 /**
  * 编辑用户
  */
 public function cEdit()
 {
     $this->_modelUser = $this->getGlobal('model/User', 'Model_User');
     if ($this->isPost()) {
         $postArr = array('id' => intval($this->getR('id')), 'vuser' => $this->getR('vuser'), 'pwd' => $this->getR('pwd'), 'pwd1' => $this->getR('pwd1'), 'role' => $this->getR('role'), 'login_count' => RegistryRequest::getInstance()->absInt('login_count'));
         $info = $this->_modelUser->edit($postArr);
         if ($info['status'] == 1) {
             $this->success($info['info'], $info['url']);
         } else {
             $this->error($info['info'], $info['url']);
         }
     } else {
         $this->_modelRole = $this->getGlobal('model/Role', 'Model_Role');
         $roles = $this->_modelRole->getAll();
         $this->assign('roleList', $roles);
         $dataList = $this->_modelUser->findById($this->getR('id'));
         $dataList['role'] = $dataList['role'] ? explode(',', $dataList['role']) : array();
         $this->assign('dataList', $dataList);
         $this->display(VIEW_PAGE);
     }
 }
コード例 #2
0
 public static function getUrlParams()
 {
     loadCore('registry/RegistryRequest');
     self::$_registryRequest = RegistryRequest::getInstance();
     switch (config('URL_MODEL')) {
         case URL_COMMON:
             //默认模式
             self::_common();
             break;
         case URL_PATHINFO:
             //pathinfo模式
             break;
         case URL_REWRITE:
             //伪静态模式
             break;
         case URL_COMPAT:
             //兼容模式
             break;
         default:
             throwException('事件分发错误,请检测URL配置');
             break;
     }
 }
コード例 #3
0
 /**
  * 删除request值
  * @param $key
  */
 public static function delR($key)
 {
     RegistryRequest::getInstance()->del($key);
 }