Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function proses_import_member()
- {
- $this->load->library('form_validation');
- if ($this->valid) {
- $this->form_validation->set_rules('pegawai_l', 'pegawai_l', 'trim|required|xss_clean');
- $this->form_validation->set_rules('pegawai_p', 'pegawai_p', 'trim|required|xss_clean');
- $this->form_validation->set_rules('siswa_l', 'siswa_l', 'trim|required|xss_clean');
- $this->form_validation->set_rules('siswa_p', 'siswa_p', 'trim|required|xss_clean');
- if ($this->form_validation->run() == FALSE) {
- $output = '{ "success": "no", "title": "Isi data dengan lengkap" }';
- } else {
- $data['pegawai_l'] = $this->input->post('pegawai_l');
- $data['pegawai_p'] = $this->input->post('pegawai_p');
- $data['siswa_l'] = $this->input->post('siswa_l');
- $data['siswa_p'] = $this->input->post('siswa_p');
- $this->member_model->update($this->input->post('id'),$data);
- $data['url'] = $this->input->post('url');
- $output = '{ "success": "yes", "title": "save", "content":"member", "component": "index_member/' . $data['url'] . '" }';
- }
- $output = str_replace("\r", "", $output);
- $output = str_replace("\n", "", $output);
- echo $output;
- }else {
- $this->session->sess_destroy();
- $this->load->view('redirect_logout');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement