public function employee_delete($user_id = '') { if (!is_moduleAllowed($this->session->userdata('group_id'), 'employee/employee_registration')) { redirect('home'); } if (!is_moduleAllowed($this->session->userdata('group_id'), 'employee/employee_list')) { redirect('home'); } if ($user_id == "") { redirect('employee/employee_list'); } if ($user_id == $this->session->userdata('user_id')) { redirect('employee/employee_list'); } $params = array('user_id' => $user_id); $params['single'] = true; $getUser = $this->model_user->getUser($params); if ($getUser['roles'] == 'license_owner') { redirect('employee/employee_list'); } $this->model_user->update(array('deleted' => 'Y'), $params); redirect('employee/employee_list'); }
public function student_delete($student_id = '') { if (!is_moduleAllowed($this->session->userdata('student_id'), 'student/student_registration')) { redirect('home'); } if (!is_moduleAllowed($this->session->userdata('student_id'), 'student/student_admission')) { redirect('home'); } if (!is_moduleAllowed($this->session->userdata('student_id'), 'student/student_list')) { redirect('home'); } if ($student_id == "") { redirect('student/student_list'); } if ($student_id == $this->session->userdata('student_id')) { redirect('student/student_list'); } $params = array('user_id' => $user_id); $params['single'] = true; $this->model_student->update(array('deleted' => 'Y'), $params); redirect('student/student_list'); }
public function view_qualification() { $qualification_id = $this->input->post('qualification_id'); if ($qualification_id == '' || $qualification_id == 'NULL' || !is_moduleAllowed($this->session->userdata('group_id'), 'security/qualification_management')) { echo "failed"; exit; } $license_id = $this->session->userdata('license_id'); $params['license_id'] = $license_id; $params['qualification_id'] = $qualification_id; $params['single'] = true; $getQualification = $this->model_qualification->getQualification($params); if (isset($getQualification['qualification_name'])) { $return['qualification_name'] = $getQualification['qualification_name']; echo json_encode($return); } else { echo "failed"; } }