예제 #1
0
 /**
  * 注册手机
  */
 protected function regMobile()
 {
     if (REQUEST_METHOD == 'POST') {
         $mobile = (int) $this->input->post('mobile');
         $this->setSession('mobile', $mobile);
         CAjax::show(0, 'successful');
     } else {
         CView::show('register/reg_mobile');
     }
 }
예제 #2
0
파일: payman.php 프로젝트: shreksrg/microHR
 /**
  * 删除用户
  */
 public function drop()
 {
     $id = $this->input->post('id');
     $return = $this->_modelPay->deletepay($id);
     $repArr = array('0', 'successful');
     if ($return !== true) {
         $repArr = array('1001', 'fail');
     }
     CAjax::show($repArr[0], $repArr[1]);
 }
예제 #3
0
 /**
  * 编辑密码
  */
 public function password()
 {
     $id = $this->input->get('id');
     $password = $this->input->post('password');
     $return = $this->_modelOrder->setPassword($id, $password);
     $repArr = array('0', 'successful');
     if ($return !== true) {
         $repArr = array('1001', 'fail');
     }
     CAjax::show($repArr[0], $repArr[1]);
 }
예제 #4
0
 /**
  *故事列表
  */
 public function index()
 {
     $offset = 10;
     if (REQUEST_METHOD == 'GET') {
         $data['rows'] = $this->_modelStory->getRows(0, $offset);
         CView::show('story/index', $data);
     } else {
         $total = (int) $this->input->post('total');
         $rows = $this->_modelStory->getRows($total, $offset);
         CAjax::show(0, 'successful', $rows);
     }
 }
예제 #5
0
파일: panel.php 프로젝트: shreksrg/microHR
 /**
  * ajax获取项目列表
  */
 public function getList()
 {
     $page = $this->input->get('page', true);
     $data = $this->_modelItem->getList($page);
     //格式化为json输出
     $list = array();
     if ($data) {
         foreach ($data as $itemId => $planItem) {
             $list[$itemId] = array('item' => $planItem->row, 'goods' => $planItem->goods->rows);
         }
     }
     CAjax::show(0, 'successful', $list);
 }
예제 #6
0
 /**
  * 用户登出
  */
 public function logout()
 {
     $this->_user->logout();
     CAjax::show(0, 'successful');
 }