Exemplo n.º 1
0
 public function holds_position($deptid)
 {
     if (empty($this->positions)) {
         return false;
     }
     $dept = new DepartmentObj($deptid);
     foreach ($this->positions as $posid) {
         if ($dept->has_position($posid)) {
             return true;
         }
     }
     return false;
 }
Exemplo n.º 2
0
 public function action_delete_department()
 {
     $deptid = $_REQUEST["deptid"];
     $department = new DepartmentObj($deptid);
     if (!$department->loaded) {
         return print "Department cannot be found!";
     }
     $department->delete();
     return print 1;
 }