示例#1
0
 public function index()
 {
     if ($_POST || $this->input->get('test') == 1) {
         if ($_POST) {
             $msg = array('str' => '');
             $this->session->unset_userdata($msg);
             $msg = array('str' => $this->input->post('search'));
             $this->session->set_userdata($msg);
         }
         $str = $this->session->userdata('str');
         $per_page = 7;
         $p = (int) page_cur();
         // 获取当前页码
         $data['p'] = $p;
         $data['cases'] = $this->cases_m->search_list($str, $per_page, $per_page * ($p - 1));
         $data['page_html'] = page_r($this->cases_m->search_num($str), $per_page);
         $data['username'] = $this->session->userdata('username');
         $this->load->view('admin/cases_list', $data);
     } else {
         $per_page = 7;
         $p = (int) page_cur();
         // 获取当前页码
         $data['p'] = $p;
         $data['cases'] = $this->cases_m->get_list($per_page, $per_page * ($p - 1));
         $data['page_html'] = page_r($this->cases_m->get_num(), $per_page);
         $data['username'] = $this->session->userdata('username');
         $this->load->view('admin/cases_list', $data);
     }
 }
示例#2
0
 public function index()
 {
     $per_page = 10;
     $p = (int) page_cur();
     // 获取当前页码
     if (!$this->input->get('search')) {
         $keyword = $this->input->get('search');
     } else {
         $keyword = NULL;
     }
     $data['servicechannel'] = $this->service_channel_m->get_list($per_page, $per_page * ($p - 1), $keyword);
     $data['page_html'] = page_r($this->service_channel_m->get_num($keyword), $per_page);
     $data['p'] = $p;
     $data['username'] = $this->session->userdata('username');
     $data['form_url'] = 'admin/servicechannel?p=' . $p . '&search=' . $keyword;
     $this->load->view('admin/service_list', $data);
 }
示例#3
0
 public function index()
 {
     $data['username'] = $this->session->userdata('username');
     $type = $this->input->get('type');
     $data['type'] = $type;
     $per_page = 7;
     $p = (int) page_cur();
     // 获取当前页码
     $offset = $per_page * ($p - 1);
     $num = $this->about_us_m->get_all_num($type);
     $query = $this->about_us_m->select_limit($type, $per_page, $offset);
     $data['font'] = $query;
     $data['p'] = $p;
     //echo $num;
     $data['link'] = page_r($num, $per_page);
     $this->load->view('admin/general', $data);
 }
示例#4
0
文件: type.php 项目: shanliqun/yanjun
 public function index()
 {
     $data['username'] = $this->session->userdata('username');
     $type = $this->input->get('type', true);
     $data['type'] = $type;
     //分页
     $per_page = 10;
     $p = (int) page_cur();
     // 获取当前页码
     $offset = $per_page * ($p - 1);
     $num = $this->type_m->get_all_num($type);
     $data['link'] = page_r($num, $per_page);
     $data['p'] = $p;
     $data['types'] = $this->type_m->select_limit($type, $per_page, $offset);
     $data['type_name'] = $this->type_m->get_type_name($type);
     $this->load->view('admin/type', $data);
 }
示例#5
0
 public function job()
 {
     $per_page = 10;
     $p = (int) page_cur();
     // 获取当前页码
     $data['p'] = $p;
     $data['jobs'] = $this->join_us_m->get_job_list($per_page, $per_page * ($p - 1));
     foreach ($data['jobs'] as &$job) {
         $department = $this->join_us_m->get_department_name($job['did']);
         $job['department'] = $department;
     }
     //var_dump($data['jobs']);
     $data['page_html'] = page_r($this->join_us_m->get_num('yj_job'), $per_page);
     $data['username'] = $this->session->userdata('username');
     $this->load->view('admin/job_list', $data);
 }