예제 #1
0
 public function deleteDepartment()
 {
     $post = $this->input->post();
     if (!$this->session->admin) {
         $error = array('status' => 'error', 'msg' => 'You cannot delete this department.');
         echo json_encode($error);
         exit;
     }
     Department_Model::deleteDepartment($post['assignId'], $post['deleteId']);
     $msg = array('status' => 'success', 'msg' => 'Successfully deleted department ' . $post['deleteId']);
     echo json_encode($msg);
 }