Guest User

Untitled

a guest
Jan 15th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. public function index($pag_num = false, $linguagem = 'pt-br', $id = false, $url_id = false)
  2. {
  3. $this->load->library('pagination');
  4.  
  5. $config['base_url'] = base_url() . 'noticias/noticias/' . $this->linguagem . '/' . $id . '/' . $url_id;
  6. $config['total_rows'] = $this->db->count_all($this->table);
  7. $config['per_page'] = 15;
  8. $config['first_link'] = '‹ Primeiro';
  9. $config['last_link'] = 'Último ›';
  10. $config['uri_segment'] = 3;
  11.  
  12. $this->linguagem = $this->getLanguageByAbrev($linguagem);
  13.  
  14. $data['title'] = 'Notícias';
  15. $data['qNoticia'] = $this->getNoticiaByIds($id, $url_id);
  16. $data['qNoticias'] = $this->getAllNoticias($config['per_page'], $this->uri->segment(3));
  17.  
  18. $this->pagination->initialize($config);
  19. $this->load->view("noticias/noticias_view", $data);
  20. }
Add Comment
Please, Sign In to add comment