$form->FusionnerCelluleCadre(2, 3, 0, 3); $form->FusionnerCelluleCadre(3, 1, 0, 1); $form->FusionnerCelluleCadre(3, 3, 0, 1); $form->FusionnerCelluleCadre(3, 5, 0, 1); $form->FusionnerCelluleCadre(4, 1, 0, 5); $form->FusionnerCelluleCadre(5, 1, 0, 5); $img = $form->AjouterInputImage(1, 1, GSession::Libelle(LIB_GPE_ICONE), '', false, GContexte::FormaterVariable($nomContexte, COL_ICONE), PATH_IMAGES . 'Jeu/', '', GSession::Libelle(LIB_GPE_ICONEINFO), '', TYPEFICHIER_IMAGEGLOBALE_JEU, $nomContexte); $img->AjouterElementsFromListe(COL_ICONE); $form->AjouterInputText(1, 3, GSession::Libelle(LIB_GPE_NOM), '', true, GContexte::FormaterVariable($nomContexte, COL_NOM), '', 1, 100, 50, false, '', GSession::Libelle(LIB_GPE_NOMINFO), GSession::Libelle(LIB_GPE_NOMERREUR), INPUTTEXT_REGEXP_TOUT_FV); $select = $form->AjouterInputSelect(2, 3, GSession::Libelle(LIB_GPE_JEU), INPUTSELECT_TYPE_FIND, true, GContexte::FormaterVariable($nomContexte, COL_JEU), GSession::Libelle(LIB_GPE_JEUINFO), GSession::Libelle(LIB_GPE_JEUERREUR), $nomContexte . COL_JEU, $nomContexte . COL_SERVEUR . ';' . $nomContexte . COL_TYPEGROUPE); $select->AjouterElementsFromListe(COL_JEU, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', $jeuId); $select = $form->AjouterInputSelect(3, 1, GSession::Libelle(LIB_GPE_SERVEUR), '', false, GContexte::FormaterVariable($nomContexte, COL_SERVEUR), '', '', $nomContexte . COL_SERVEUR, '', $nomContexte . COL_JEU, AJAXFONC_CHARGERREFERENTIELCONTEXTE, 'contexte=' . $nomContexte); $select->AjouterElementsFromListe(COL_SERVEUR, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); $select = $form->AjouterInputSelect(3, 3, GSession::Libelle(LIB_GPE_COMMUNAUTE), '', true, GContexte::FormaterVariable($nomContexte, COL_COMMUNAUTE), '', GSession::Libelle(LIB_GPE_COMMUNAUTEERREUR)); $select->AjouterElementsFromListe(COL_COMMUNAUTE, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', GSession::Communaute(COL_ID)); $select = $form->AjouterInputSelect(3, 5, GSession::Libelle(LIB_GPE_TYPEGROUPE), '', true, GContexte::FormaterVariable($nomContexte, COL_TYPEGROUPE), GSession::Libelle(LIB_GPE_TYPEGPEINFO), GSession::Libelle(LIB_GPE_TYPEGPEERREUR), $nomContexte . COL_TYPEGROUPE, '', $nomContexte . COL_JEU, AJAXFONC_CHARGERREFERENTIELCONTEXTE, 'contexte=' . $nomContexte); $select->AjouterElementsFromListe(COL_TYPEGROUPE, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); $form->AjouterInputText(4, 1, GSession::Libelle(LIB_GPE_DESCRIPTION), '', false, GContexte::FormaterVariable($nomContexte, COL_DESCRIPTION), '', 1, 250, -1, true, '', GSession::Libelle(LIB_GPE_DESCRIPTIONINFO)); $form->AjouterInputText(5, 1, GSession::Libelle(LIB_GPE_HISTOIRE), '', false, GContexte::FormaterVariable($nomContexte, COL_HISTOIRE), '', 1, NULL, 5, true, '', GSession::Libelle(LIB_GPE_HISTOIREINFO)); $form->SetCadreBoutons(2, 1, 1, 1); $form->AjouterInputButtonAjouterAuContexte(1, 1, $nomContexte, true, GSession::Libelle(LIB_GPE_CREERGROUPE)); $org->AttacherCellule(2, 1, $form); // Cadre contenant le formulaire et son explication. $cadre = new SCadre($prefixIdClass, GSession::Libelle(LIB_GPE_CREATIONGPE), $org, true, true); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $cadre); } else { // Rechargement des référentiels. GReferentiel::GetDifferentielReferentielFichiersForSelect(COL_ICONE); GReferentiel::GetDifferentielReferentielForSelect(COL_COMMUNAUTE, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); } }
<?php require_once 'cst.php'; require_once INC_GSESSION; require_once INC_SFORM; require_once INC_SCADRE; $activationInfo = new SElement(CLASSTEXTE_INFO); $activationInfo->SetText(GSession::Libelle(LIB_ACT_INFOACTIVATION)); $activationForm = new SForm('activation', 2, 1, false); $activationForm->SetCadreInputs(1, 1, 1, 1, false); $activationForm->AjouterInputText(1, 1, GSession::Libelle(LIB_ACT_CODEACTIVATION), '', true, GContexte::FormaterVariable($nomContexte, 'codeActivation'), '', 1, 40, 40, false, '', GSession::Libelle(LIB_ACT_CODEACTIVATIONINFO)); $activationForm->SetCadreBoutons(2, 1, 1, 1); $activationForm->AjouterInputButtonModifierDansContexte(1, 1, CONT_ACTIVATION, true); $activationOrg = new SOrganiseur(2, 1); $activationOrg->AttacherCellule(1, 1, $activationInfo); $activationOrg->AttacherCellule(2, 1, $activationForm); $activationCadre = new SCadre('activation', GSession::Libelle(LIB_ACT_ACTIVATIONCOMPTE), $activationOrg, true, true); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $activationCadre);
$creerJoueurForm->AjouterInputText(1, 1, GSession::Libelle(LIB_CON_EMAIL), '', true, GContexte::FormaterVariable(CONT_CONNEXION, 'login'), '', 1, 70, 70, false, '', GSession::Libelle(LIB_CON_EMAILINFO), GSession::Libelle(LIB_CON_EMAILERREUR), INPUTTEXT_REGEXP_EMAIL_FV); $creerJoueurForm->AjouterInputText(2, 1, GSession::Libelle(LIB_CON_MOTDEPASSE), INPUTTEXT_TYPE_PASSWORD, true, GContexte::FormaterVariable(CONT_CONNEXION, 'motDePasse'), '', 5, 20, 20, false, '', GSession::Libelle(LIB_CON_MOTDEPASSEINFO), GSession::Libelle(LIB_CON_MOTDEPASSEERREUR)); $creerJoueurForm->AjouterInputText(3, 1, GSession::Libelle(LIB_CON_PSEUDO), '', true, GContexte::FormaterVariable(CONT_CONNEXION, 'pseudo'), '', 1, 30, 30, false, '', GSession::Libelle(LIB_CON_PSEUDOINFO), GSession::Libelle(LIB_CON_PSEUDOERREUR)); $label = $creerJoueurForm->AjouterInputLabel(6, 1, GSession::Libelle(LIB_CON_DATENAISSANCE)); $label->AjouterInputText(GSession::Libelle(LIB_CON_ANNEE), '', false, GContexte::FormaterVariable(CONT_CONNEXION, 'annee'), '', 1, 4, 4, false, '', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 1900, intval(date('Y'))); $label->AjouterInputText(GSession::Libelle(LIB_CON_MOIS), '', false, GContexte::FormaterVariable(CONT_CONNEXION, 'mois'), '', 1, 2, 2, false, '', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 1, 12); $label->AjouterInputText(GSession::Libelle(LIB_CON_JOUR), '', false, GContexte::FormaterVariable(CONT_CONNEXION, 'jour'), '', 1, 2, 2, false, '', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 1, 31); $creerJoueurForm->SetCadreBoutons(2, 1, 1, 2); $creerJoueurForm->AjouterInputButtonValiderAjaxContexte(1, 1, CONT_CONNEXION, 'CreerJoueur'); $creerJoueurForm->AjouterInputButtonAnnuler(1, 2); $connexionForm = new SForm('connexion', 1, 2); $connexionForm->SetCadreInputs(1, 1, 1, 2); $select = $connexionForm->AjouterInputNewText(1, 1, GSession::Libelle(LIB_CON_EMAIL), true, GContexte::FormaterVariable(CONT_CONNEXION, 'login'), '', 1, 70, 20, false, '', '', '', INPUTTEXT_REGEXP_EMAIL_FV); $select->AjouterFormulaire(GSession::Libelle(LIB_CON_CREERCOMPTE), $creerJoueurForm); $connexionForm->AjouterInputText(1, 2, GSession::Libelle(LIB_CON_MOTDEPASSE), INPUTTEXT_TYPE_PASSWORD, true, GContexte::FormaterVariable(CONT_CONNEXION, 'motDePasse'), '', 5, 20, 10, false, '', '', ''); $connexionForm->SetCadreBoutons(1, 2, 1, 1); $bouton = $connexionForm->AjouterInputButton(1, 1, '', GSession::Libelle(LIB_CON_CONNEXION), GSession::Libelle(LIB_CON_CONNEXION), true, AJAXFONC_CHARGERCONTEXTES, true, true); $bouton->AjouterParamRetour('contextes[0]', CONT_CONNEXION); GContexte::AjouterContenu(CADRE_INFO_JOUEUR, $connexionForm); } else { if (GDroit::EstConnecte(false) === true && (GSession::Connecte() === false || $dejaCharge === false)) { GSession::Connecte(true); $connecteForm = new SForm('connecte', 1, 2); $connecteForm->SetCadreInputs(1, 1, 1, 1); $connecteForm->AjouterInputInfo(1, 1, GSession::Libelle(LIB_CON_PSEUDO), GSession::Joueur(COL_PSEUDO), true); $connecteForm->SetCadreBoutons(1, 2, 1, 1); $bouton = $connecteForm->AjouterInputButton(1, 1, '', GSession::Libelle(LIB_CON_DECONNEXION), GSession::Libelle(LIB_CON_DECONNEXION), true, AJAXFONC_CHARGERCONTEXTES, true, true); $bouton->AjouterParamRetour('contextes[0]', CONT_DECONNEXION); GContexte::AjouterContenu(CADRE_INFO_JOUEUR, $connecteForm); } }
//$rechargeParam = 'contexte='.$nomContexte; $changeFonc = AJAXFONC_MODIFIERDANSCONTEXTE; $changeParam = 'cf=' . GSession::NumCheckFormulaire() . '&contexte=' . $nomContexte; $selectPresActive = new SForm($prefixIdClass, 1, 2, true, false); $selectPresActive->SetCadreInputs(1, 1, 1, 1); $select = $selectPresActive->AjouterInputSelect(1, 1, GSession::Libelle(LIB_PRS_PRESACTIVE), '', true, GContexte::FormaterVariable($nomContexte, COL_PRESENTATION . 'active'), '', '', '', '', '', '', '', $changeFonc, $changeParam); $select->AjouterElementsFromListe(COL_PRESENTATION . 'active', COL_ID, COL_NOM, '', GSession::PresentationActive()); $selectPresActive->SetCadreBoutonsCache(1, 2); $elemPresActive = new SCentreur($selectPresActive); $selectPresModif = new SForm($prefixIdClass, 1, 2, false, false); $selectPresModif->SetCadreInputs(1, 1, 1, 1); $select = $selectPresModif->AjouterInputNewSelect(1, 1, GSession::Libelle(LIB_PRS_PRESMODIF), true, GContexte::FormaterVariable($nomContexte, COL_PRESENTATION . 'modif'), '', '', '', '', '', '', '', $changeFonc, $changeParam); $formCreerPres = new SForm($prefixIdClass, 2, 1); $formCreerPres->SetCadreInputs(1, 1, 1, 1); $formCreerPres->AjouterInputText(1, 1, GSession::Libelle(LIB_PRS_NOM), '', true, GContexte::FormaterVariable($nomContexte, COL_NOM), '', 1, 200, 40); $formCreerPres->SetCadreBoutons(2, 1, 1, 2); $bouton = $formCreerPres->AjouterInputButtonAjouterAuContexte(1, 1, $nomContexte); $bouton->AjouterParamRetour('nouvPres', '1'); $formCreerPres->AjouterInputButtonAnnuler(1, 2); $select->AjouterFormulaire(GSession::Libelle(LIB_PRS_CREERPRES), $formCreerPres); $select->AjouterElementsFromListe(COL_PRESENTATION . 'modif', COL_ID, COL_NOM, '', GSession::PresentationModif()); $selectPresModif->SetCadreBoutonsCache(1, 2); $elemPresModif = new SCentreur($selectPresModif); $classeurPres = new SClasseur($prefixIdClass, 'pres', true, true); $mListe = new MListeTypesPresentationsModules(); $mListe->AjouterColSelection(COL_ID); $mListe->AjouterColSelection(COL_LIBELLE); $mListe->AjouterFiltreEgal(COL_ACTIF, true); $mListe->Charger(); $liste = $mListe->GetListe(); foreach ($liste as $mObjet) {