public function index()
 {
     $kehu = M('kehu');
     $list = $kehu->order('status asc,date desc')->select();
     $this->assign('list', $list);
     $id = $this->_session('id');
     $this->user = M('user')->find($id);
     $kejob = new KehuViewModel();
     $this->kelist = $kejob->order('jinji desc,status asc,newdate desc')->select();
     $this->display();
 }
 public function job()
 {
     import('ORG.Util.Page');
     $kejob = new KehuViewModel();
     $title = $this->_post('text');
     $data['jobname'] = array('like', array("%{$title}%"));
     $count = $kejob->where($data)->count();
     $page = new Page($count, 45);
     $show = $page->show();
     $this->list = $kejob->where($data)->order('status asc,newdate desc')->limit($page->firstRow . ',' . $page->listRows)->select();
     $this->assign('page', $show);
     $this->assign('text', $title);
     $this->display();
 }