Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function polling_detail($id=NULL) {
- //echo "here";
- //print_r($_POST);DIE;
- $t['title'] = 'Polling Media Indonesia | Refrensi Indonesia';
- $data['polling_detail'] = $t['title'] ;
- //$this->output->enable_profiler(TRUE);
- $this->load->model('data', 'polling_detail');
- $this->load->helper('analytics');
- $this->output->cache(10);
- //$t['rows'] = $this->model_utama->polling_sum($row['id'])->row_array();
- //$t['polling'] = $this->model_utama->polling();
- //$t['id'] = $this->polling_detail->polling_sum($row['id'])->row_array();
- $t['polling'] = $this->polling_detail->all_polling();
- echo "post:<pre>";
- print_r($_POST);
- echo "</pre>";
- //DIE;
- /*
- cek apakah ada post masuk
- */
- if($this->input->post('poll')){
- if($id!==NULL) die('error');
- $poll = $this->input->post('poll'); //POLL
- echo($poll);die;
- //$poll = $this->input->post('id');//ambil IP
- //echo($poll);die;
- foreach($poll as $id=>$row){
- //insert disini
- //ambil nilai si poll
- //ambil ip
- //simpan
- $t['polling_detail'] = $this->polling_detail->polling_sum($id);
- echo "<pre>";
- print_r($t['polling_detail']);
- echo "</pre>";
- redirect("home/polling_detail/".$id);
- }
- }
- $t['polling_detail'] = $this->polling_detail->polling_sum($id);
- //die('ha');
- #Menu
- $t['v_menu'] = $this->load->view('template/v_menu',NULL,TRUE);
- #Footer
- $t['v_footer'] = $this->load->view('template/v_footer',NULL,TRUE);
- #Analytic
- $t['analytics'] = google();
- #Revive
- $t['revive'] = revive();
- $page = $this->load->view('read/v_detail_polling' ,$t,FALSE);
- }
Advertisement
Add Comment
Please, Sign In to add comment