Advertisement
Guest User

Untitled

a guest
Aug 5th, 2015
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. function xyz(){
  2. $this->load->library('pagination');
  3. $config['base_url'] = "http://localhost/rainbow/admin/postList/xyz";
  4. $config['per_page'] = 10;
  5. $config['total_rows'] = $this->post_model->list_count();
  6. $config['uri_segment'] = 3;
  7. $config['page_query_string'] = TRUE;
  8. $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
  9. $this->pagination->initialize($config);
  10.  
  11. $data['lists']=$this->post_model->listing($config["per_page"], $page);
  12. $this->load->view('includes/header');
  13. $this->load->view('listing/listing_post',$data);
  14. $this->load->view('includes/footer');
  15.  
  16. function search_listing($limit, $start)
  17. {
  18. if(isset($this->input->get('search')))
  19. {
  20. $this->db->like('post_name',$this->input->get('search'))
  21. }
  22. $this->db->limit($limit, $start);
  23. $query=$this->db->get('blog');
  24. return $query->result();
  25. }
  26.  
  27. function xyz()
  28. {
  29. $this->load->library('pagination');
  30. $config['base_url'] = "http://localhost/rainbow/admin/postList/xyz";
  31. $config['per_page'] = 10;
  32. $config['total_rows'] = $this->post_model->list_count();
  33. $config['uri_segment'] = 4;
  34. $config['page_query_string'] = TRUE;
  35. $page = ($this->uri->segment(4)) ? $this->uri->segment(4) : 0;
  36. $this->pagination->initialize($config);
  37.  
  38. $data['lists']=$this->post_model->listing($config["per_page"], $page);
  39. $this->load->view('includes/header');
  40. $this->load->view('listing/listing_post',$data);
  41. $this->load->view('includes/footer');
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement