} $select = $form->AjouterInputFile(1, 2, GSession::Libelle(LIB_PRS_LISTEDERFICHIER), '', true); for ($i = 0; $i < 15; $i++) { $select->AjouterElement($i, GSession::Libelle(LIB_PRS_ELEMENT)); } $select = $form->AjouterInputNewSelect(1, 3, GSession::Libelle(LIB_PRS_LISTEDERBOUTON), true); $formIn = new SForm('', 0, 0); $select->AjouterFormulaire(GSession::Libelle(LIB_PRS_NOUVEAU), $formIn); for ($i = 0; $i < 15; $i++) { $select->AjouterElement($i, GSession::Libelle(LIB_PRS_ELEMENT)); } $form->AjouterInputText(2, 1, GSession::Libelle(LIB_PRS_TEXTEAEDITER), '', false); $form->AjouterInputCheckbox(2, 2, GSession::Libelle(LIB_PRS_CASEACOCHER), '', false); $form->AjouterInputInfo(2, 3, GSession::Libelle(LIB_PRS_INFOFORM), false); $form->SetCadreBoutons(2, 1, 1, 1); $form->AjouterInputButton(1, 1, '', GSession::Libelle(LIB_PRS_BOUTON)); $cadre = new SCadre('', GSession::Libelle(LIB_PRS_FORM), $form, true, false); $vue->AttacherCellule(2, 1, $cadre); $liste = new SElement(CLASSSEPARATEUR); $cListeModificationPresentation = new cListeModificationPresentation('', 'ModifPres', $nomContexte, -1, -1, false, '', true, '', '', '', '', '', '', '', AJAXFONC_RECHARGER); $libelle = GSession::Libelle(LIB_PRS_CHAMP, true, true); $cListeModificationPresentation->AjouterElement($libelle . '10', $libelle, '', $libelle, $libelle, $libelle); $cListeModificationPresentation->AjouterElement($libelle . '11', $libelle, '', $libelle, $libelle, $libelle); $cListeModificationPresentation->AjouterElement($libelle . '12', $libelle, '', $libelle, $libelle, $libelle); $cadre = new SCadre('', GSession::Libelle(LIB_PRS_LISTES), $cListeModificationPresentation, true, false); $vue->AttacherCellule(3, 1, $cadre); $classeur = new SClasseur('', 'presex', true, true); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); GContexte::AjouterOnglet('presex', GSession::Libelle(LIB_PRS_ONGLET), '', '', '', true, false); $cadre = new SCadre('', GSession::Libelle(LIB_PRS_TABONGLETS), $classeur, true, false);
$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); } }
$form->SetCadreInputs(1, 1, 3, 6); $form->FusionnerCelluleCadre(1, 1, 0, 2); $form->FusionnerCelluleCadre(1, 4, 0, 2); $form->FusionnerCelluleCadre(2, 1, 0, 1); $form->FusionnerCelluleCadre(2, 3, 0, 1); $form->FusionnerCelluleCadre(2, 5, 0, 1); $form->FusionnerCelluleCadre(3, 1, 0, 5); $select = $form->AjouterInputSelect(1, 1, 'Jeu:'); $select->AjouterElement(1, 'Guild War', 'Jeu gratuit.'); $select->AjouterElement(2, 'Warhammer', 'Jeu avec des nains.', true); $select->AjouterElement(3, 'World of Warcraft', 'Jeu avec des gnomes.'); $select = $form->AjouterInputSelect(1, 4, 'Jeu:', '', true, 'Le jeu auquel tu joues.', 'Il faut choisir un jeu.', 'JEU', '', ''); $select->AjouterCategorie(1, 'RPG'); $select->AjouterElement(1, 'Guild War', 'Jeu avec des PPBL.'); $select->AjouterElement(2, 'Warhammer', 'Jeu avec des nains.', true); $select->AjouterElement(3, 'World of Warcraft', 'Jeu avec des gnomes.'); $select->AjouterCategorie(2, 'RTS'); $select->AjouterElement(4, 'Age of Empires', 'Jeu avec des paysans.'); $select->AjouterElement(5, 'Warcraft 3', 'Jeu avec des elfes.'); $form->AjouterInputText(2, 1, 'Jeu:'); $form->AjouterInputText(2, 3, 'Nom:', '', true, 'Doe', 6, 6, 'px', 'Ton nom.', 'Il faut remplir le nom.'); $form->AjouterInputText(2, 5, 'Prénom:', '', true, 'John', -1, -1, 'px', 'Ton prénom.', 'Il faut remplir le prénom.'); $form->AjouterInputFile(3, 1, 'Image:', '', false, 1, 'Fichier image.', '', INPUTFILE_TYPE_IMAGEPERSO); $form->SetCadreBoutons(2, 1, 2, 1); $form->AjouterInputButton(1, 1, '', 'Valider', 'Validation en cours', true, 'test', true, true); $form->AjouterInputButton(2, 1, '', 'Annuler', '', '', 'alert', false, true); echo $form->BuildHTML(); echo "\n\n"; echo '</body> </html>';