|  |  |  | 
|---|
|  |  |  | if($this->getRequest()->isXmlHttpRequest()){ | 
|---|
|  |  |  | $total = $this->user_service->getUserListTotal(); | 
|---|
|  |  |  | $data['draw'] = !empty($_REQUEST['draw'])?$_REQUEST['draw']:1; | 
|---|
|  |  |  | $data['start'] = !empty($_REQUEST['start'])?$_REQUEST['start']:0; | 
|---|
|  |  |  | $data['length'] = !empty($_REQUEST['length'])?$_REQUEST['length']:10; | 
|---|
|  |  |  | $data['recordsTotal'] = $total; | 
|---|
|  |  |  | $data['recordsFiltered'] = $total; | 
|---|
|  |  |  | $data['data'] = $this->user_service->getUserList(); | 
|---|
|  |  |  | $data['data'] = $this->user_service->getUserList(array(), array(), array(), $data['length'], $data['start']); | 
|---|
|  |  |  | exit($this->sendToDataTable($data)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改我的信息 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public function MyAction(){ | 
|---|
|  |  |  | $user_id = $this->session['user']['user_id']; | 
|---|
|  |  |  | $user = $this->user_service->getUserInfo(array('_id' => $user_id)); | 
|---|
|  |  |  | if($user){ | 
|---|
|  |  |  | if($this->getRequest()->isXmlHttpRequest()){ | 
|---|
|  |  |  | $data['nickname'] = $this->post('nickname'); | 
|---|
|  |  |  | $password = $this->post('password'); | 
|---|
|  |  |  | if(!empty($password)) | 
|---|
|  |  |  | $data['password'] = md5(md5($password).$user['encrypt']); | 
|---|
|  |  |  | $data['refresh_frequency'] = $this->post('refresh_frequency'); | 
|---|
|  |  |  | $data['is_open_upload'] = $this->post('is_open_upload'); | 
|---|
|  |  |  | $data['video'] = $this->post('video'); | 
|---|
|  |  |  | $data['edit_time'] = time(); | 
|---|
|  |  |  | if($this->user_service->update($data, array('_id' => $user_id))){ | 
|---|
|  |  |  | exit($this->showSuccess('用户修改成功', true)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else{ | 
|---|
|  |  |  | exit($this->showError($this->user_service->error, 400, true)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | $role_service = new Service_Role(); | 
|---|
|  |  |  | $roles = $role_service->getRoleList(); | 
|---|
|  |  |  | $this->getView()->assign(array('user' => $user, 'roles' => $roles)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else{ | 
|---|
|  |  |  | $this->redirect('/error/show/type/no_data'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 验证手机号码是否存在 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public function CheckPhoneAction(){ | 
|---|