예제 #1
0
 public function delmuban()
 {
     $needadmin = needadmin();
     $this->assign('needadmin', $needadmin);
     $db = M('zxmb');
     $count = $db->count();
     $page = new \Lib\Page($count);
     $limit = $page->firstRow . ',' . $page->listRows;
     $result = $db->order('id DESC')->limit($limit)->select();
     $this->assign('result', $result);
     $this->page = $page->show();
     $this->display();
 }
예제 #2
0
 public function searched()
 {
     if (!IS_POST) {
         E('无效的页面');
     }
     $arr = I('searched', '', trim);
     $where = array('uper' => $arr, 'id' => $arr, '_logic' => 'or');
     $db = M('zxmb');
     $count = $db->count();
     $page = new \Lib\Page($count);
     $limit = $page->firstRow . ',' . $page->listRows;
     $searched = $db->where(array($where))->limit($limit)->order('id DESC')->select();
     $this->assign('searched', $searched);
     $this->assign('needadmin', needadmin());
     $this->page = $page->show();
     $this->display();
 }
예제 #3
0
 public function index()
 {
     // 人事档案信息
     $db = M('people');
     $count = $db->count();
     $page = new \Lib\Page($count);
     $limit = $page->firstRow . ',' . $page->listRows;
     $result = $db->order('id DESC')->limit($limit)->select();
     $this->page = $page->show();
     $this->assign('people', $result);
     // 管理权限
     $needadmin = needadmin();
     $this->assign('needadmin', $needadmin);
     //team
     $team = M('team');
     $rteam = $team->select();
     $this->assign('team', $rteam);
     $this->display();
 }
예제 #4
0
 public function seeseas()
 {
     $needadmin = needadmin();
     $this->assign('needadmin', $needadmin);
     $pid = 1;
     $db = M('system');
     $where = array('pid' => $pid);
     $system = $db->where($where)->select();
     $this->assign('system', $system);
     $db = M('customer');
     $uid['uid'] = 0;
     $count = $db->count();
     $page = new \Lib\Page($count);
     $limit = $page->firstRow . ',' . $page->listRows;
     $result = $db->where($uid)->limit($limit)->order('id DESC')->select();
     $this->assign('result', $result);
     $dbc = M('login');
     $username = $dbc->field('id,name,username')->select();
     $this->assign('username', $username);
     $this->page = $page->show();
     $this->display();
 }
예제 #5
0
 public function adduser()
 {
     $needadmin = needadmin();
     $this->assign('needadmin', $needadmin);
     $this->display();
 }
예제 #6
0
 public function screening()
 {
     if (!IS_POST) {
         E('无效的页面');
     }
     $username = I('username');
     // //判断是否具有管理员权限,有管理员权限可以查看所有客户
     // if(session('admin') == 0){
     // 	$uid = session('uid');
     // }else{
     // 	$uid = array('egt',0);
     // }
     $db = M('customer');
     $maxdate = $db->max('date');
     $mindate = $db->min('date');
     //输入时间转为unix时间戳
     $d1 = (string) I('date1');
     $d2 = (string) I('date2');
     $date1 = strtotime($d1) == '' ? $mindate : strtotime($d1);
     $date2 = strtotime($d2) == '' ? $maxdate : strtotime($d2);
     $count = $db->count();
     $page = new \Lib\Page($count);
     $limit = $page->firstRow . ',' . $page->listRows;
     $userid = array('uid' => $uid);
     $date['date'] = array('BETWEEN', "{$date1},{$date2}");
     if ($username != 0) {
         $date['uid'] = $username;
     } else {
         $date['uid'] = array('egt', 0);
     }
     switch (I('success')) {
         case 'all':
             $date['success'] = array('egt', 0);
             break;
         case '1':
             $date['success'] = '1';
             break;
         case '0':
             $date['success'] = '0';
             break;
         default:
             $date['success'] = array('egt', 0);
             break;
     }
     $date['_logic'] = 'and';
     $searched = $db->where(array($date))->limit($limit)->order('id DESC')->select();
     $dbc = M('login');
     $username = $dbc->field('id,name,username')->select();
     $maxuid = $db->max('uid');
     $maxid = $maxuid + 1;
     $this->assign('maxid', $maxid);
     $dba = M('system');
     $pid = 1;
     $where = array('pid' => $pid);
     $system = $dba->where($where)->select();
     $this->assign('system', $system);
     $this->assign('username', $username);
     $this->assign('searched', $searched);
     $this->assign('needadmin', needadmin());
     $this->display();
 }