protected function InitialiserReferentielsElement($element) { $mObjet = $element[LISTE_ELEMENT_OBJET]; $mListeJeux = new MListeJeux(); $mJeu = new MJeu(); $mJeu->Id($mObjet->Jeu()->Id()); $mJeu->Libelle($mObjet->Jeu()->Libelle()); $mListeJeux->AjouterElement($mJeu); $this->AjouterReferentielElement($element, array(COL_JEU, COL_ID), $mListeJeux, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); $mListeServeurs = new MListeServeurs(); $mListeServeurs->AjouterColSelection(COL_ID); $mListeServeurs->AjouterColSelection(COL_LIBELLE); $mListeServeurs->AjouterFiltreEgal(COL_JEU, $mObjet->Jeu()->Id()); $this->AjouterReferentielElement($element, array(COL_SERVEUR, COL_ID), $mListeServeurs, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); $mListeTypesGroupes = new MListeTypesGroupes(); $mListeTypesGroupes->AjouterColSelection(COL_ID); $mListeTypesGroupes->AjouterColSelection(COL_LIBELLE); $mListeTypesGroupes->AjouterFiltreEgal(COL_JEU, $mObjet->Jeu()->Id()); $this->AjouterReferentielElement($element, array(COL_TYPEGROUPE, COL_ID), $mListeTypesGroupes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); }
$mListeCommunautes->AjouterColSelection(COL_LIBELLE); $mListeCommunautes->AjouterColOrdre(COL_LIBELLE); GReferentiel::AjouterReferentiel(COL_COMMUNAUTE, $mListeCommunautes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); if ($dejaCharge === false) { $jeuId = GSession::Jeu(COL_ID); $dejaCharge = false; if ($jeuId == NULL) { $dejaCharge = true; } $mListeJeux = new MListeCommunautes(); $mListeJeux->AjouterColSelection(COL_ID); $mListeJeux->AjouterColSelection(COL_LIBELLE); $mListeJeux->AjouterColOrdre(COL_LIBELLE); if ($jeuId != NULL) { $mJeu = new MJeu(); $mJeu->Id($jeuId); $mJeu->Libelle(GSession::Jeu(COL_LIBELLE)); $mListeJeux->AjouterElement($mJeu); } GReferentiel::AjouterReferentiel(COL_JEU, $mListeJeux, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); $mListeServeurs = new MListeServeurs(); $mListeServeurs->AjouterColSelection(COL_ID); $mListeServeurs->AjouterColSelection(COL_LIBELLE); $mListeServeurs->AjouterColOrdre(COL_LIBELLE); $mListeServeurs->AjouterFiltreEgal(COL_JEU, $jeuId); $mListeServeurs->AjouterFiltreDifferent(COL_SUPPRIME, true); GReferentiel::AjouterReferentiel(COL_SERVEUR, $mListeServeurs, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), $dejaCharge); $mListeTypesGroupes = new MListeTypesGroupes(); $mListeTypesGroupes->AjouterColSelection(COL_ID); $mListeTypesGroupes->AjouterColSelection(COL_LIBELLE); $mListeTypesGroupes->AjouterColOrdre(COL_LIBELLE);
$checkbox->AjouterCheckbox('', GSession::Libelle(LIB_JEU_NECMETIERINFO), $mJeu->NecessiteMetier()); $checkbox = $form->AjouterInputCheckbox(6, 1, GSession::Libelle(LIB_JEU_NECNIVEAU), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITENIVEAU), GSession::Libelle(LIB_JEU_NECNIVEAUINFO)); $checkbox->AjouterCheckbox('', GSession::Libelle(LIB_JEU_NECNIVEAUINFO), $mJeu->NecessiteNiveau()); $form->AjouterInputText(6, 2, GSession::Libelle(LIB_JEU_NIVEAUMAX), '', false, GContexte::FormaterVariable($nomContexte, COL_NIVEAUMAX), $mJeu->NiveauMax(), 1, 5, 5, false, '', GSession::Libelle(LIB_JEU_NIVEAUMAXINFO), '', INPUTTEXT_REGEXP_DECIMAL_FV); $checkbox = $form->AjouterInputCheckbox(7, 1, GSession::Libelle(LIB_JEU_NECOBJET), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITEOBJET), GSession::Libelle(LIB_JEU_NECOBJETINFO)); $checkbox->AjouterCheckbox('', GSession::Libelle(LIB_JEU_NECOBJETINFO), $mJeu->NecessiteObjet()); $checkbox = $form->AjouterInputCheckbox(8, 1, GSession::Libelle(LIB_JEU_NECROLE), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITEROLE), GSession::Libelle(LIB_JEU_NECROLEINFO)); $checkbox->AjouterCheckbox('', GSession::Libelle(LIB_JEU_NECROLEINFO), $mJeu->NecessiteRole()); $checkbox = $form->AjouterInputCheckbox(9, 1, GSession::Libelle(LIB_JEU_NECSERVEUR), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITESERVEUR), GSession::Libelle(LIB_JEU_NECSERVEURINFO)); $checkbox->AjouterCheckbox('', GSession::Libelle(LIB_JEU_NECSERVEURINFO), $mJeu->NecessiteServeur()); $form->SetCadreInputs(2, 1, 1, 2, true, false); $form->SetLargeurCelluleCadre(1, 1, '50%'); $form->SetLargeurCelluleCadre(1, 2, '50%'); $form->AjouterPropCelluleCadre(1, 1, PROP_STYLE, 'vertical-align: top'); $form->AjouterPropCelluleCadre(1, 2, PROP_STYLE, 'vertical-align: top'); $liste = $form->AjouterInputListe(1, 1, GSession::Libelle(LIB_JEU_SERVEURS), '', false, GContexte::FormaterVariable($nomContexte, COL_SERVEUR), GSession::Libelle(LIB_JEU_SERVEURSINFO)); $liste->AjouterListe($cListeJeuServeurs); $liste = $form->AjouterInputListe(1, 2, GSession::Libelle(LIB_JEU_TYPESGROUPES), '', false, GContexte::FormaterVariable($nomContexte, COL_TYPEGROUPE), GSession::Libelle(LIB_JEU_TYPESGROUPESINFO)); $liste->AjouterListe($cListeJeuTypesGroupes); $form->SetCadreBoutons(3, 1, 1, 1); $bouton = $form->AjouterInputButtonModifierDansContexte(1, 1, $nomContexte, true, GSession::Libelle(LIB_JEU_MODIFIERJEU)); $bouton->AjouterParamRetour(GContexte::FormaterVariable($nomContexte, COL_ID), $mJeu->Id()); // Cadre contenant le formulaire et son explication. $cadre = new SCadre(PIC_JEU, GSession::Libelle(LIB_JEU_ADMINISTRATIONJEU), $form, true, true); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $cadre); } else { // Rechargement des référentiels. GReferentiel::GetDifferentielReferentielFichiersForSelect(COL_ICONE); GReferentiel::GetDifferentielReferentielForSelect(COL_TYPEJEU, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE), array(COL_DESCRIPTION, COL_LIBELLE))); } }