1$total = $this->bmodel->countResultsBanner();
2 $data['total'] = $total;
3/* Comment out this part
4 $uri_segment = $this->uri->segment(4);
5 if($uri_segment == 0 || empty($uri_segment)){
6 $uri_segment = 0;
7 }
8 */
9 $perPage = 5;
10 $config['base_url'] = base_url()."index.php/modules/banner/index";
11 $config['total_rows'] = $total;
12 $config['per_page'] = $perPage;
13 $config['num_links'] = 4;
14 //$config['cur_tag_open'] = '<b><span class="current_page">';
15 //$config['cur_tag_close'] = '</span></b>';
16 $this->pagination->initialize($config);
17/*Change the following line*/
18 $result = $this->bmodel->getAllBanners($perPage,$this->uri->segment(5));
19 $data['result'] = $result;
20