Advertisement
Guest User

Controller

a guest
Oct 22nd, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.62 KB | None | 0 0
  1. function search(){
  2.         $this->breadcrumb[] = array(
  3.                 "title"     => "List"
  4.             );
  5.  
  6.         if($this->input->post('btn_reset')){
  7.             // $this->_reset();
  8.             redirect($this->own_link);
  9.         }
  10.        
  11.         if($this->input->post('btn_search')){
  12.             $par_filter = array(
  13.                     "colum"         => trim($this->input->get('colum')),
  14.                     "keyword"       => trim($this->input->get('keyword')),
  15.                     "date_start"            => trim ($this->input->get('date_start')),
  16.                     "date_to"       => trim ($this->input->get('date_end'))
  17.             );
  18.  
  19.             $this->data_table = $this->M->infaq($par_filter);
  20.             $data = $this->_data(array(
  21.                     "base_url"  => $this->own_link.'/index'
  22.             ));
  23.            
  24.             $data['param'] = array(
  25.                     "noreg"         => trim($this->input->post('noreg')),
  26.                     "date_from"     => trim ($this->input->post('date_start')),
  27.                     "date_to"       => trim ($this->input->post('date_end'))
  28.             );
  29.             $this->_v($this->folder_view.$this->prefix_view,$data);    
  30.         }
  31.         if($this->input->post('print_excel')){
  32.             $par_filter = array(
  33.                     "noreg"         => trim($this->input->post('noreg')),
  34.                     "date_from"     => trim ($this->input->post('date_from')),
  35.                     "date_to"       => trim ($this->input->post('date_to'))
  36.             );
  37.             $cetak = $this->M->infaq($par_filter);
  38.             if($this->jCfg['user']['userrole'] == 31 || $this->jCfg['user']['userrole'] == 1 ){
  39.                 $this->_v($this->folder_view.$this->prefix_view."_export",$cetak,false);               
  40.             }
  41.         }
  42.             $this->js_plugins = array(
  43.             'plugins/bootstrap/bootstrap-datepicker.js',
  44.             'plugins/bootstrap/bootstrap-file-input.js',
  45.             'plugins/bootstrap/bootstrap-select.js',
  46.             'plugins/datatables/jquery.dataTables.min.js'
  47.         );
  48.         // echo json_encode($this->data_table);
  49.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement