function index() { $this->load->library('pagination'); $this->data['title'] = 'Product Listing'; $total_records = $this->product_model->get_product(array('count' => TRUE)); $pagination_data = array('base_url' => ADMIN_SITE_URL . 'product/index', 'total_rows' => $total_records, 'per_page' => 10, 'uri_segment' => 4); $pagination_config = geneate_pagination($pagination_data); $this->pagination->initialize($pagination_config); $this->data['page'] = $this->uri->segment(4) ? $this->uri->segment(4) : 0; $query_data = array('limit' => 10, 'offset' => $this->data['page']); $this->data['product_data'] = $this->product_model->get_product($query_data); $this->data['pagination'] = $this->pagination->create_links(); $this->layout->view('admin/product/index', $this->data); }
function index() { $this->load->library('pagination'); $this->data['title'] = 'Epin Listing'; $total_records = $this->epin_model->get_epin_details(array('count' => TRUE)); $pagination_data = array('base_url' => ADMIN_SITE_URL . 'epin/index', 'total_rows' => $total_records, 'per_page' => 10, 'uri_segment' => 4); $pagination_config = geneate_pagination($pagination_data); $this->pagination->initialize($pagination_config); $this->data['page'] = $this->uri->segment(4) ? $this->uri->segment(4) : 0; $query_data = array('limit' => 10, 'offset' => $this->data['page']); $this->data['epin_data'] = $this->epin_model->get_epin_details($query_data); // echo "<pre>";print_r($this->data['epin_data'] );exit; $this->data['pagination'] = $this->pagination->create_links(); $this->layout->view('admin/epin/index', $this->data); }