Ejemplo n.º 1
0
 function index($offset = 0)
 {
     //Content
     $uri_segment = 3;
     $offset = $this->uri->segment($uri_segment);
     $query_id = $this->session->userdata('query_id');
     $this->input->load_query($query_id);
     $code_s = $this->input->get('code_s');
     $name_s = $this->input->get('name_s');
     $this->data['query'] = $this->questions_model->search($code_s, $name_s, $this->limit, $offset);
     $page_config['base_url'] = site_url('questions/index/');
     $page_config['total_rows'] = $this->questions_model->count_results($name_s);
     $page_config['per_page'] = $this->limit;
     $page_config['uri_segment'] = $uri_segment;
     $page_config = parent::set_pager_style($page_config);
     $this->pagination->initialize($page_config);
     $this->data['pagination'] = $this->pagination->create_links();
     $this->data['total_rows'] = $page_config['total_rows'];
     $this->data['content'] = 'questions_list';
     $this->load->view('templates/default', $this->data);
 }