} function doStore() { global $doc_ged_id, $file_id, $_validation; $this->_obj->date = CMbDT::dateTime(); $this->_obj->remarques = CAppUI::tr("Modele"); $this->_obj->doc_ged_id = $doc_ged_id; if ($file_id !== null) { $this->_obj->file_id = $file_id; $this->_obj->doc_ged_suivi_id = null; } if ($msg = $this->_obj->store()) { CAppUI::setMsg($msg, UI_MSG_ERROR); if ($this->redirectError) { $this->redirect =& $this->redirectError; } } } } $do1 = new CDoDocGedAddEdit(); if (!CCanDo::admin()) { $do1->doRedirect(); } $do1->doIt(); if ($file_id) { $do2 = new CDoDocGedSuiviAddEdit(); $do2->doIt(); } elseif ($_firstModeleGed) { $do1->dodelete(); CAppUI::setMsg("CDocGed-msg-error_file", UI_MSG_ERROR); }
$this->suppressHeaders = CValue::post("suppressHeaders"); $this->callBack = CValue::post("callback"); unset($_POST["ajax"]); unset($_POST["suppressHeaders"]); unset($_POST["callback"]); // Object binding $this->_obj->bind($_POST["suivi"]); $this->_old->load($this->_obj->_id); } function doStore() { global $doc_ged_id, $file_id, $_validation; $this->_obj->date = CValue::post("date"); $this->_obj->doc_ged_id = $doc_ged_id; if ($file_id !== null) { $this->_obj->file_id = $file_id; } if ($msg = $this->_obj->store()) { CAppUI::setMsg($msg, UI_MSG_ERROR); if ($this->redirectError) { $this->redirect =& $this->redirectError; } } } } $do1 = new CDoDocGedAddEdit(); $do1->doIt(); if (!$_validation) { $do2 = new CDoDocGedSuiviAddEdit(); $do2->doIt(); }