Ejemplo n.º 1
0
 public function view_list($offset = 0)
 {
     $items_per_page = 20;
     $number_of_districts = Districts::getTotalNumber();
     $districts = Districts::getPagedDistricts($offset, $items_per_page);
     if ($number_of_districts > $items_per_page) {
         $config['base_url'] = base_url() . "district_management/view_list/";
         $config['total_rows'] = $number_of_districts;
         $config['per_page'] = $items_per_page;
         $config['uri_segment'] = 3;
         $config['num_links'] = 5;
         $this->pagination->initialize($config);
         $data['pagination'] = $this->pagination->create_links();
     }
     $data['districts'] = $districts;
     $data['title'] = "District Management::All My Districts";
     $data['module_view'] = "view_districts_view";
     $this->base_params($data);
 }