Esempio n. 1
0
 public function view($offset = 0)
 {
     $temp_dir = $this->temp_proxy->GetDictionary($this->session->userdata('token'), $this->tabel);
     $temp_pek = $this->input->post('nm_pek');
     if ($temp_pek == '') {
         $temp_rec = $this->temp_proxy->GetRecordset($this->session->userdata('token'), $this->tabel, $this->filter, $this->order, $this->limit, $offset);
         $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel, $this->filter);
         $temp_jml = $temp_count['result'];
         $data['temp_pek'] = '';
     } else {
         $filter_pek = "nm_pekerjaan like '%" . $temp_pek . "%'";
         $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel, $filter_pek, $this->order, $this->limit, $offset);
         $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel, $filter_pek);
         $temp_jml = $temp_count['result'];
         $data['temp_pek'] = $temp_pek;
     }
     //pagination
     $config['base_url'] = site_url('ref_pekerjaan/view');
     $config['total_rows'] = $temp_count['result'];
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     //
     $data['pagination'] = $this->pagination->create_links();
     $data['offset'] = $offset;
     $data['listsdic'] = $temp_dir['result'];
     $data['listsrec'] = $temp_rec['result'];
     $data['total'] = $temp_count['result'];
     $offset == 0 ? $start = $this->pagination->cur_page : ($start = $offset + 1);
     $data['start'] = $start;
     $data['end'] = $this->pagination->cur_page * $this->pagination->per_page;
     tampil('ref/__view_pekerjaan', $data);
 }
Esempio n. 2
0
 public function login()
 {
     if ($this->input->post()) {
         //$this->form_validation->set_rules('inputWs', 'URL Webservice', 'trim|required');
         $this->form_validation->set_rules('inputUsername', 'Username Feeder', 'trim|required');
         $this->form_validation->set_rules('inputPassword', 'Password Feeder', 'required');
         //$ws = $this->input->post('inputWs', TRUE);
         $username = $this->input->post('inputUsername', TRUE);
         $password = $this->input->post('inputPassword', TRUE);
         $temp_ws = $this->input->post('db_ws');
         if ($this->form_validation->run() == TRUE) {
             $ws = $temp_ws == 'on' ? $this->dir_ws . 'live.php?wsdl' : $this->dir_ws . 'sandbox.php?wsdl';
             $ws_client = new nusoap_client($ws, true);
             $temp_proxy = $ws_client->getProxy();
             $temp_error = $ws_client->getError();
             if ($temp_proxy == NULL) {
                 $this->session->set_flashdata('error', 'Gagal melakukan koneksi ke Webservice Feeder.<br /><pre>' . $temp_error . '</pre>');
                 //$this->session->set_flashdata('error',$temp_error);
                 redirect(base_url());
             } else {
                 $temp_token = $temp_proxy->GetToken($username, $password);
                 if ($temp_token == 'ERROR: username/password salah') {
                     $this->session->set_flashdata('error', $temp_token);
                     redirect(base_url());
                 } else {
                     //$temp_npsn = substr($username, 0,6);
                     $temp_npsn = read_file('setting.ini');
                     //echo $temp_npsn;
                     $filter_sp = "npsn = '" . $temp_npsn . "'";
                     $temp_sp = $temp_proxy->getrecord($temp_token, 'satuan_pendidikan', $filter_sp);
                     //var_dump($temp_sp);
                     if ($temp_sp['result']) {
                         $id_sp = $temp_sp['result']['id_sp'];
                     } else {
                         $id_sp = '0';
                     }
                     $sessi = array('login' => TRUE, 'ws' => $ws, 'token' => $temp_token, 'username' => $username, 'password' => $password, 'url' => base_url(), 'kode_pt' => $temp_npsn, 'id_sp' => $id_sp);
                     $this->session->sess_expiration = '900';
                     //session expire 15 Minutes
                     $this->session->sess_expire_on_close = 'true';
                     $this->session->set_userdata($sessi);
                     //var_dump($sessi);
                     redirect('welcome');
                 }
             }
         }
     }
     tampil('__f_login');
 }
Esempio n. 3
0
 public function epsbed($offset = 0, $order_column = 'NIMHSMSMHS', $order_type = 'asc', $cari = '')
 {
     $temp_cari = $this->input->post('nm_mhs');
     //$temp_rec = $this->db->query("SELECT * FROM MSMHS JOIN MSPST ON (MSPST.KDPTIMSPST=MSMHS.KDPTIMSMHS)")->result();
     $temp_rec = $this->db->query("SELECT * FROM MSMHS, MSPST WHERE MSPST.KDPTIMSPST=MSMHS.KDPTIMSMHS AND MSMHS.TAHUNMSMHS='2014'")->result();
     //$temp_rec = $this->m_msmhs->get_all($this->limit,$offset,$order_column,$order_type,$temp_cari)->result();
     //$temp_tot = $this->m_msmhs->get_count($temp_cari)->num_rows();
     //$temp_tot = $this->m_msmhs->count_all()->num_rows();
     $temp_tot = count($temp_rec);
     //var_dump($temp_rec);
     //echo $temp_tot;
     $data['temp_rec'] = $temp_rec;
     $data['temp_tot'] = $temp_tot;
     $data['temp_cari'] = $temp_cari;
     tampil('epsbed/mahasiswa/__view_mahasiswa', $data);
 }
Esempio n. 4
0
 public function view($offset = 0)
 {
     $temp_wil = $this->input->post('nm_wil');
     if ($temp_wil == '') {
         $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel, $this->filter, $this->order, $this->limit, $offset);
         /*$temp_rec_count = $this->feeder->getrset($this->session->userdata('token'), 
              $this->tabel, $this->filter, 
              $this->order, '', 
              $offset
           );*/
         $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel, $this->filter);
         $temp_jml = $temp_count['result'];
         //$temp_jml = count($temp_rec_count['result']);
         //var_dump($temp_jml);
         $data['temp_wil'] = '';
     } else {
         $filter_wil = "nm_wil like '%" . $temp_wil . "%'";
         $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel, $filter_wil, $this->order, $this->limit, $offset);
         $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel, $filter_wil);
         $temp_jml = $temp_count['result'];
         if (!$temp_rec['result']) {
             $filter_id_wil = "id_wil like '%" . $temp_wil . "%'";
             $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel, $filter_id_wil, $this->order, $this->limit, $offset);
             $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel, $filter_id_wil);
             $temp_jml = $temp_count['result'];
         }
         //$temp_jml = count($temp_rec['result']);
         $data['temp_wil'] = $temp_wil;
     }
     //pagination
     $config['base_url'] = site_url('ref_wilayah/view');
     $config['total_rows'] = $temp_jml;
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     //
     $data['pagination'] = $this->pagination->create_links();
     $data['offset'] = $offset;
     $data['temp_error'] = $temp_rec['error_desc'];
     $data['listsrec'] = $temp_rec['result'];
     $data['total'] = $temp_jml;
     $offset == 0 ? $start = $this->pagination->cur_page : ($start = $offset + 1);
     $data['start'] = $start;
     $data['end'] = $this->pagination->cur_page * $this->pagination->per_page;
     tampil('ref/__view_wilayah', $data);
 }
Esempio n. 5
0
 public function view($offset = 0)
 {
     $temp_dic = $this->feeder->getdic($this->session->userdata('token'), $this->tabel);
     $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel, $this->filter, $this->order, $this->limit, $offset);
     $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel);
     //pagination
     $config['base_url'] = site_url('ws_bobot/view');
     $config['total_rows'] = $temp_count['result'];
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     //
     $data['pagination'] = $this->pagination->create_links();
     $data['offset'] = $offset;
     $data['listsdic'] = $temp_dic;
     $data['listsrec'] = $temp_rec;
     $data['total'] = $temp_count['result'];
     $data['url_add'] = 'index.php/ws_bobot/form';
     tampil('__view_add', $data);
 }
Esempio n. 6
0
 public function kelas($offset = 0)
 {
     $temp_mk = $this->input->post('mk');
     if ($temp_mk == '') {
         $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel, $this->filter, 'id_smt DESC', $this->limit, $offset);
         $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel, $this->filter);
         $temp_jml = $temp_count['result'];
         $data['temp_mk'] = $temp_mk;
     } else {
         $filter_nm_mk = "nm_mk like '%" . $temp_mk . "%'";
         $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel, $filter_nm_mk, $this->order, $this->limit, $offset);
         $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel, $filter_nm_mk);
         $temp_jml = $temp_count['result'];
         $data['temp_mk'] = $temp_mk;
     }
     $config['base_url'] = site_url('ws_nilai/kelas');
     $config['total_rows'] = $temp_jml;
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     //
     $data['pagination'] = $this->pagination->create_links();
     $data['offset'] = $offset;
     $data['temp_error'] = $temp_rec['error_desc'];
     $data['listsrec'] = $temp_rec['result'];
     $data['total'] = $temp_jml;
     $data['tabel'] = $this->tabel;
     $offset == 0 ? $start = $this->pagination->cur_page : ($start = $offset + 1);
     $data['start'] = $start;
     $data['end'] = $this->pagination->cur_page * $this->pagination->per_page;
     tampil('nilai/__view_kelas', $data);
 }
Esempio n. 7
0
 public function setting()
 {
     $temp_npsn = read_file('setting.ini');
     if ($this->input->post()) {
         $temp_pt = $this->input->post('inputNpsn', TRUE);
         $this->form_validation->set_rules('inputNpsn', 'Kode PT', 'trim|required');
         if ($this->form_validation->run() == TRUE) {
             $temp_result = write_file('setting.ini', $temp_pt);
             if ($temp_result) {
                 $filter_sp = "npsn = '" . $temp_pt . "'";
                 $temp_sp = $this->feeder->getrecord($this->session->userdata['token'], 'satuan_pendidikan', $filter_sp);
                 //var_dump($temp_sp);
                 if ($temp_sp['result']) {
                     $id_sp = $temp_sp['result']['id_sp'];
                 } else {
                     $id_sp = '0';
                 }
                 //$this->session->set_userdata('')
                 $sessi = array('kode_pt' => $temp_pt, 'id_sp' => $id_sp);
                 //$this->session->set_userdata('id_sp',$id_sp);
                 $this->session->set_userdata($sessi);
                 $this->session->set_flashdata('sukses', 'Kode PT berhasil diupdate');
                 redirect(base_url() . 'index.php/welcome/setting');
             } else {
                 $this->session->set_flashdata('error', 'Kode PT tidak bisa diupdate. File setting tidak bisa ditulisi');
                 redirect(base_url() . 'index.php/welcome/setting');
             }
         }
     }
     $data['npsn'] = $temp_npsn;
     tampil('welcome/__setting', $data);
 }
Esempio n. 8
0
 public function view($offset = 0)
 {
     $temp_mhs = $this->input->post('nm_mhs');
     if ($temp_mhs == '') {
         $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel2, $this->filter, 'nipd ASC', $this->limit, $offset);
         $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel2, $this->filter);
         $temp_jml = $temp_count['result'];
         $data['temp_mhs'] = '';
     } else {
         $filter_nim = "nipd like '%" . $temp_mhs . "%'";
         $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel2, $filter_nim, 'nipd ASC', $this->limit, $offset);
         $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel2, $filter_nim);
         $temp_jml = $temp_count['result'];
         if (!$temp_rec['result']) {
             $filter_mhs = "nm_pd like '%" . $temp_mhs . "%'";
             $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel2, $filter_mhs, 'nipd ASC', $this->limit, $offset);
             //var_dump($temp_rec_mhs);
             //$filter_id_pd = "id_pd='".$."'";
             $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel2, $filter_mhs);
             $temp_jml = $temp_count['result'];
         }
         //var_dump($temp_rec['result']);
         //$temp_jml = count($temp_rec['result']);
         $data['temp_mhs'] = $temp_mhs;
     }
     //pagination
     $config['base_url'] = site_url('ws_mahasiswa/view');
     $config['total_rows'] = $temp_jml;
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     //
     $data['pagination'] = $this->pagination->create_links();
     $data['offset'] = $offset;
     $data['temp_error'] = $temp_rec['error_desc'];
     $data['listsrec'] = $temp_rec['result'];
     $data['total'] = $temp_jml;
     $offset == 0 ? $start = $this->pagination->cur_page : ($start = $offset + 1);
     $data['start'] = $start;
     $data['end'] = $this->pagination->cur_page * $this->pagination->per_page;
     tampil('/mahasiswa/__view_mahasiswa', $data);
 }
Esempio n. 9
0
 public function epsbed()
 {
     $temp_smt = $this->feeder->getrset($this->session->userdata('token'), 'semester', $this->filter, 'nm_smt DESC', $this->limit, $this->offset);
     //var_dump($temp_smt);
     //echo "Error ".$temp_smt['error_desc'];
     $data['smt'] = $temp_smt['result'];
     $data['error'] = $temp_smt['error_desc'];
     tampil('epsbed/mahasiswa/__view_mahasiswa', $data);
 }
Esempio n. 10
0
 public function kelas($offset = 0)
 {
     $temp_rec = $this->feeder->getrset($this->session->userdata('token'), $this->tabel, $this->filter, 'id_smt DESC', $this->limit, $offset);
     $temp_count = $this->feeder->count_all($this->session->userdata('token'), $this->tabel, $this->filter);
     //list prodi
     $temp_sp = $this->session->userdata('id_sp');
     $filter_sms = "id_sp = '" . $temp_sp . "'";
     $temp_prodi = $this->feeder->getrset($this->session->userdata('token'), 'sms', $filter_sms, '', '30', '');
     //semester
     $temp_semester = $this->feeder->getrset($this->session->userdata('token'), 'semester', '', 'nm_smt DESC', '10', '');
     //pagination
     $config['base_url'] = site_url('ws_nilai/kelas');
     $config['total_rows'] = $temp_count['result'];
     $config['per_page'] = $this->limit;
     $config['uri_segment'] = 3;
     $this->pagination->initialize($config);
     //
     $data['pagination'] = $this->pagination->create_links();
     $data['offset'] = $offset;
     //$data['listsdic'] = $temp_dic;
     $data['listsrec'] = $temp_rec['result'];
     $data['total'] = $temp_count['result'];
     $data['url_add'] = 'index.php/ws_nilai/csv';
     $data['tabel'] = $this->tabel;
     $data['listprodi'] = $temp_prodi['result'];
     $data['semester'] = $temp_semester['result'];
     //var_dump($temp_semester['result']);
     tampil('nilai/__view_kelas', $data);
 }