$function = $user_printers->loadRefFunction(); $nb_printers = $function->countBackRefs("printers"); } $list_mode_entree = array(); if (CAppUI::conf("dPplanningOp CSejour use_custom_mode_entree")) { $mode_entree = new CModeEntreeSejour(); $where = array("actif" => "= '1'"); $list_mode_entree = $mode_entree->loadGroupList($where); } if (CAppUI::conf("ref_pays") == 2) { $rpu->loadRefEchelleTri(); $rpu->loadRefMotif(); $rpu->loadRefsReponses(); $rpu->orderCtes(); $chapitre = new CChapitreMotif(); $chapitres = $chapitre->loadList(); $motif = new CMotif(); if ($rpu->code_diag) { $motif->chapitre_id = $rpu->_ref_motif->chapitre_id; } $motifs = $motif->loadMatchingList(); } $is_praticien = CAppUI::$user->isPraticien(); // Création du template $smarty = new CSmartyDP(); if (CAppUI::conf("ref_pays") == 2) { $smarty->assign("chapitre_id", 0); $smarty->assign("chapitres", $chapitres); $smarty->assign("motif_id", 0); $smarty->assign("motifs", $motifs); }
* @version $Revision: 27936 $ */ CCanDo::checkRead(); $motif_id = CValue::get("motif_id"); $chapitre_id = CValue::get("chapitre_id"); $readonly = CValue::get("readonly"); $motif = new CMotif(); if ($motif_id) { $motif->load($motif_id); $motif->loadRefChapitre(); $motif->loadRefsQuestions(); if ($readonly) { $motif->loadRefsQuestionsByDegre(); } } $chapitre = new CChapitreMotif(); $chapitres = $chapitre->loadList(null, "nom"); if ($chapitre_id) { $chapitre->load($chapitre_id); $chapitre->loadRefsMotifs(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("motif", $motif); $smarty->assign("motif_id", $motif_id); $smarty->assign("chapitre", $chapitre); $smarty->assign("chapitre_id", $chapitre_id); $smarty->assign("chapitres", $chapitres); $smarty->assign("question", new CMotifQuestion()); $smarty->assign("readonly", $readonly); $smarty->display("edit_chapitre_motif.tpl");