Guest User

polling_detail

a guest
Feb 6th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. public function polling_detail($id=NULL) {
  2. //echo "here";
  3. //print_r($_POST);DIE;
  4. $t['title'] = 'Polling Media Indonesia | Refrensi Indonesia';
  5. $data['polling_detail'] = $t['title'] ;
  6.  
  7.  
  8. //$this->output->enable_profiler(TRUE);
  9. $this->load->model('data', 'polling_detail');
  10. $this->load->helper('analytics');
  11. $this->output->cache(10);
  12.  
  13. //$t['rows'] = $this->model_utama->polling_sum($row['id'])->row_array();
  14. //$t['polling'] = $this->model_utama->polling();
  15. //$t['id'] = $this->polling_detail->polling_sum($row['id'])->row_array();
  16. $t['polling'] = $this->polling_detail->all_polling();
  17. echo "post:<pre>";
  18. print_r($_POST);
  19. echo "</pre>";
  20. //DIE;
  21.  
  22. /*
  23. cek apakah ada post masuk
  24.  
  25. */
  26. if($this->input->post('poll')){
  27. if($id!==NULL) die('error');
  28. $poll = $this->input->post('poll'); //POLL
  29. echo($poll);die;
  30. //$poll = $this->input->post('id');//ambil IP
  31. //echo($poll);die;
  32. foreach($poll as $id=>$row){
  33. //insert disini
  34. //ambil nilai si poll
  35. //ambil ip
  36. //simpan
  37.  
  38.  
  39. $t['polling_detail'] = $this->polling_detail->polling_sum($id);
  40. echo "<pre>";
  41. print_r($t['polling_detail']);
  42. echo "</pre>";
  43.  
  44. redirect("home/polling_detail/".$id);
  45. }
  46. }
  47. $t['polling_detail'] = $this->polling_detail->polling_sum($id);
  48.  
  49.  
  50. //die('ha');
  51.  
  52.  
  53.  
  54.  
  55. #Menu
  56. $t['v_menu'] = $this->load->view('template/v_menu',NULL,TRUE);
  57. #Footer
  58. $t['v_footer'] = $this->load->view('template/v_footer',NULL,TRUE);
  59. #Analytic
  60. $t['analytics'] = google();
  61. #Revive
  62. $t['revive'] = revive();
  63. $page = $this->load->view('read/v_detail_polling' ,$t,FALSE);
  64.  
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment