} $repeat -= $obj->becomeNext(); } $_SESSION["dPbloc"]["id"] = null; } else { //Modification des plages if ($obj->_id != 0) { $oldObj = new CPlageOp(); $oldObj->load($obj->_id); $salle_id = $oldObj->salle_id; $chir_id = $oldObj->chir_id; $spec_id = $oldObj->spec_id; $secondary_function_id = $oldObj->secondary_function_id; while ($repeat > 0) { if ($obj->_id) { if ($msg = $obj->store()) { CAppUI::setMsg("Plage non mise à jour", UI_MSG_ERROR); CAppUI::setMsg("Plage du {$obj->date}: {$msg}", UI_MSG_ERROR); } else { CAppUI::setMsg("Plage mise à jour", UI_MSG_OK); } managePersonnel($obj); } $repeat -= $obj->becomeNext($salle_id, $chir_id, $spec_id, $secondary_function_id); } } else { // Création des plages while ($repeat > 0) { if ($msg = $obj->store()) { CAppUI::setMsg("Plage non créée", UI_MSG_ERROR); CAppUI::setMsg("Plage du {$obj->date}: {$msg}", UI_MSG_ERROR);
* @version $Revision: 26995 $ */ global $m; $do = new CDoObjectAddEdit("COperation"); $do->doBind(); if (intval(CValue::post("del", null))) { CValue::setSession("operation_id"); $do->redirectDelete = "m={$m}&tab=vw_edit_planning&operation_id=0"; $do->doDelete(); } else { if ($do->_obj->plageop_id && $do->_old->plageop_id != $do->_obj->plageop_id) { $do->_obj->rank = 0; } $do->doStore(); if (CModule::getActive("forms") && CValue::post("_set_fin_op") && CValue::post("fin_op") == "current") { $ex_class_events = CExClassEvent::getForObject($do->_obj, "fin_intervention", "required"); echo CExClassEvent::getJStrigger($ex_class_events); } if ($do->_obj->plageop_id && $do->_old->plageop_id && $do->_old->plageop_id != $do->_obj->plageop_id) { $plageop = new CPlageOp(); $plageop->load($do->_old->plageop_id); $plageop->spec_id = ""; $plageop->store(); } $m = CValue::post("otherm", $m); if ($m == "dPhospi") { $do->redirectStore = "m={$m}#operation" . $do->_obj->operation_id; } $do->redirectStore = "m={$m}&operation_id=" . $do->_obj->operation_id; } $do->doRedirect();