require_once inc_manage_unit; $FacilID = isset($_POST["FacilID"]) ? $_POST["FacilID"] : ""; //________________ GET ACCESS _________________ $accessObj = new ModuleAccess($FacilID, "", Deputy, Module_writ); $item_accessObj = new ModuleAccess($FacilID, 1, Deputy, Module_writ); $accesscostcenterObj = new ModuleAccess($FacilID, SubModule_cost_center_id, Deputy, Module_writ); //----------------------------------------------- $writ_id = $_REQUEST["WID"]; $staff_id = $_REQUEST["STID"]; if (!empty($_REQUEST["WID"])) { $writver = isset($_REQUEST["WVER"]) ? $_REQUEST["WVER"] : ""; $objWrt = new manage_writ($writ_id, $writver, $staff_id); $writver = $objWrt->writ_ver; $where = " w.writ_id = :WID AND w.writ_ver = :WVER AND w.staff_id = :STID"; $whereParam = array(":WID" => $writ_id, ":WVER" => $writver, ":STID" => $staff_id); $FullWrt = manage_writ::GetWritInfo($where, $whereParam); if (count($FullWrt) == 0) { $FullWrt = NULL; } } //............................................ if ($objWrt->corrective && $objWrt->history_only != 0) { $is_new_corrective = true; } else { $is_new_corrective = false; } //............................................ if (empty($_REQUEST["PID"])) { $objPerson = new manage_person("", $staff_id); } else { $objPerson = new manage_person($_REQUEST["PID"]);