protected function GetElemCreationListeMenus() { $menus = array(); if ($this->HasDroitCreation()) { $this->AjouterMenuToListe($menus, 0, GSession::Libelle(LIB_LIS_AJOUTER, true, true), $this->foncAjaxCreation, 'contexte=' . $this->contexte . '&ref=' . $this->TypeSynchroPage(), true, LISTE_JQCADRE_ETAGE . '1', true); } return $menus; }
protected function ConstruireElemCreation() { //$elem = parent::ConstruireElemCreation(); $org = new SOrganiseur(4, 1, true, true); $org->AttacherCellule(1, 1, $this->ConstruireChamp('champ_1', LISTE_CHAMPTYPE_CREAT)); $org->AttacherCellule(2, 1, $this->ConstruireChamp('champ_2', LISTE_CHAMPTYPE_CREAT)); $org->AttacherCellule(3, 1, $this->ConstruireChamp('champ_3', LISTE_CHAMPTYPE_CREAT)); $org->AttacherCellule(4, 1, $this->ConstruireChamp('champ_4', LISTE_CHAMPTYPE_CREAT)); $elem = parent::ConstruireElemCreation(GSession::Libelle(LIB_PRS_TITRE, true, true), $org); //$elem->Attach($org); return $elem; }
public static function LeverWarning($code, $libelle, $affichageJoueur = false, $logFichier = true) { if ($affichageJoueur === true) { GReponse::AjouterElementWarning(strval($code), $libelle); } if ($logFichier === true) { if (is_int($libelle)) { $libelle = GSession::Libelle($libelle, false, true); } $fichier = fopen(PATH_SERVER_LOCAL . 'log/warnings' . date('Y-m-d') . '.txt', 'a+'); $remoteHost = ''; if (array_key_exists('REMOTE_HOST', $_SERVER)) { $remoteHost = $_SERVER['REMOTE_HOST']; } fwrite($fichier, date('H:i:s') . ' - ' . $_SERVER['REMOTE_ADDR'] . ' - ' . $remoteHost . ' - ' . $code . ': ' . $libelle . "\r\n"); fclose($fichier); } }
protected function ConstruireElemConsultation(&$element) { $elem = parent::ConstruireElemConsultation($element, $this->GetElemChampValeurConsultation($element, COL_LIBELLE), $this->GetElemChampValeurConsultation($element, COL_CONTENU)); if ($this->GetElemChampValeurConsultation($element, 'cligno') === true) { $elem->AddClass(VISUALISEUR_JQ_CLIGNOTEMENT); $div = new SBalise(BAL_DIV); $div->AddClass(VISUALISEUR_JQ_CLIGNOTEMENT_INFOPP); $div->AddStyle('display:none;'); $div->SetText(GSession::Libelle(LIB_PRS_SEPREMIERPLAN, true, true)); $elem->Attach($div); $div = new SBalise(BAL_DIV); $div->AddClass(BAL_DIV); $div->AddClass(VISUALISEUR_JQ_CLIGNOTEMENT_INFOAP); $div->AddStyle('display:none;'); $div->SetText(GSession::Libelle(LIB_PRS_SESECONDPLAN, true, true)); $elem->Attach($div); $div = new SBalise(BAL_DIV); $div->AddClass(VISUALISEUR_JQ_CLIGNOTEMENT_INFO . '20'); $div->AddStyle('display:none;'); $div->SetText(GSession::Libelle(LIB_PRS_CLIGNO20, true, true)); $elem->Attach($div); $div = new SBalise(BAL_DIV); $div->AddClass(VISUALISEUR_JQ_CLIGNOTEMENT_INFO . '30'); $div->AddStyle('display:none;'); $div->SetText(GSession::Libelle(LIB_PRS_CLIGNO30, true, true)); $elem->Attach($div); $div = new SBalise(BAL_DIV); $div->AddClass(VISUALISEUR_JQ_CLIGNOTEMENT_INFO . '40'); $div->AddStyle('display:none;'); $div->SetText(GSession::Libelle(LIB_PRS_CLIGNO40, true, true)); $elem->Attach($div); $div = new SBalise(BAL_DIV); $div->AddClass(VISUALISEUR_JQ_CLIGNOTEMENT_INFO . '45'); $div->AddStyle('display:none;'); $div->SetText(GSession::Libelle(LIB_PRS_CLIGNO45, true, true)); $elem->Attach($div); } return $elem; }
protected function InitialiserChamps() { $this->AjouterChamp(COL_ID, '-1', true, true); $autresDonnees = array(); $autresDonnees[LISTE_AUTRESDONNEES_CHAMPLABEL] = GSession::Libelle(LIB_GPE_NOM); $this->AjouterChamp(COL_NOM, '', false, false, LISTE_INPUTTYPE_TEXT, LISTE_INPUTTYPE_TEXT, NULL, NULL, $autresDonnees); $autresDonnees = array(); $autresDonnees[LISTE_AUTRESDONNEES_CHAMPLABEL] = GSession::Libelle(LIB_GPE_DESCRIPTION); $this->AjouterChamp(COL_DESCRIPTION, '', false, false, LISTE_INPUTTYPE_TEXT, LISTE_INPUTTYPE_TEXT, NULL, NULL, $autresDonnees); $autresDonnees = array(); $autresDonnees[LISTE_AUTRESDONNEES_CHAMPLABEL] = GSession::Libelle(LIB_GPE_HISTOIRE); $this->AjouterChamp(COL_HISTOIRE, '', false, false, LISTE_INPUTTYPE_TEXT, LISTE_INPUTTYPE_TEXT, NULL, NULL, $autresDonnees); $autresDonnees = array(); $autresDonnees[LISTE_AUTRESDONNEES_IMAGEVISUALISEUR] = true; $autresDonnees[LISTE_AUTRESDONNEES_IMAGETYPE] = TYPEFICHIER_IMAGEGLOBALE_COMMUNAUTE; $autresDonnees[LISTE_AUTRESDONNEES_CHAMPLABEL] = GSession::Libelle(LIB_GPE_ICONE); $this->AjouterChamp(COL_ICONE, '', false, false, LISTE_INPUTTYPE_IMAGE, LISTE_INPUTTYPE_IMAGE, NULL, NULL, $autresDonnees); $autresDonnees = array(); $autresDonnees[LISTE_AUTRESDONNEES_CHAMPLABEL] = GSession::Libelle(LIB_GPE_COMMUNAUTE); $this->AjouterChamp(array(COL_COMMUNAUTE, COL_ID), '', false, false, LISTE_INPUTTYPE_SELECT, LISTE_INPUTTYPE_SELECT, NULL, NULL, $autresDonnees); $this->AjouterChamp(array(COL_COMMUNAUTE, COL_LIBELLE, COL_LIBELLE), '', false, false); $autresDonnees = array(); $autresDonnees[LISTE_AUTRESDONNEES_SELECTIMPACT] = array(array(COL_SERVEUR, COL_ID), array(COL_TYPEGROUPE, COL_ID)); $autresDonnees[LISTE_AUTRESDONNEES_CHAMPLABEL] = GSession::Libelle(LIB_GPE_JEU); $this->AjouterChamp(array(COL_JEU, COL_ID), '', false, false, LISTE_INPUTTYPE_FIND, LISTE_INPUTTYPE_FIND, NULL, NULL, $autresDonnees); $this->AjouterChamp(array(COL_JEU, COL_LIBELLE, COL_LIBELLE), '', false, false); $autresDonnees = array(); $autresDonnees[LISTE_AUTRESDONNEES_SELECTDEPENDANCE] = array(array(COL_JEU, COL_ID)); $autresDonnees[LISTE_AUTRESDONNEES_CHAMPLABEL] = GSession::Libelle(LIB_GPE_SERVEUR); $this->AjouterChamp(array(COL_SERVEUR, COL_ID), '', false, false, LISTE_INPUTTYPE_SELECT, LISTE_INPUTTYPE_SELECT, NULL, NULL, $autresDonnees); $this->AjouterChamp(array(COL_SERVEUR, COL_LIBELLE, COL_LIBELLE), '', false, false); $autresDonnees = array(); $autresDonnees[LISTE_AUTRESDONNEES_SELECTDEPENDANCE] = array(array(COL_JEU, COL_ID)); $autresDonnees[LISTE_AUTRESDONNEES_CHAMPLABEL] = GSession::Libelle(LIB_GPE_TYPEGROUPE); $this->AjouterChamp(array(COL_TYPEGROUPE, COL_ID), '', false, false, LISTE_INPUTTYPE_SELECT, LISTE_INPUTTYPE_SELECT, NULL, NULL, $autresDonnees); $this->AjouterChamp(array(COL_TYPEGROUPE, COL_LIBELLE, COL_LIBELLE), '', false, false); }
$formulaireValide = false; } if ($mJoueur->Pseudo() == NULL) { GLog::LeverException(EXF_0003, GSession::Libelle(LIB_CON_PSEUDOERREUR), true); $formulaireValide = false; } if ($formulaireValide === true) { // Si un joueur existait et était supprimé on le met à jour, sinon on crée un nouveau joueur. if ($mJoueurExistant->Id() != NULL) { $mJoueurExistant->Modifier(); unset($mJoueur); $mJoueur = $mJoueurExistant; } else { $mJoueur->Ajouter(); } } // Si le joueur a bien été créé, on lui envoie un mail avec son pseudo, son mot de passe et son code d'activation. if ($mJoueur->Id() !== NULL) { $headers = 'From: "Admin"<*****@*****.**>' . "\n"; $headers .= 'Content-Type: text/plain; charset="utf8"' . "\n"; $headers .= 'Content-Transfer-Encoding: 8bit'; ini_set('SMTP', SMTP); $message = GSession::Libelle(LIBTEXT_CON_MAILMESSAGE, false, true) . "\r\n\r\n" . GSession::Libelle(LIB_CON_PSEUDO, false, true) . ' ' . $mJoueur->Pseudo() . "\r\n" . GSession::Libelle(LIB_CON_MOTDEPASSE, false, true) . ' ' . $mJoueur->MotDePasse() . "\r\n" . GSession::Libelle(LIB_CON_CODEACTIVATION, false, true) . ' ' . $mJoueur->CodeActivation(); mail($mJoueur->Login(), GSession::Libelle(LIB_CON_MAILTITRE, false, true), $message, $headers); GSession::Joueur(COL_ID, $mJoueur->Id()); GSession::Joueur(COL_PSEUDO, $mJoueur->Pseudo()); GContexte::SetContexte(CONT_ACTIVATION); } else { GLog::LeverException(EXF_0004, GSession::Libelle(LIB_CON_CREATCOMPTEERREUR), true, $formulaireValide); } $pasDeRechargement = true;
$mPresentation = new MPresentation(); $mPresentation->Nom(GContexte::LirePost(COL_NOM)); $mPresentation->CreateurJoueur(GSession::Joueur(COL_ID)); $mPresentation->CreateurGroupe($groupe); if ($mPresentation->Nom() === NULL) { GLog::LeverException(EXF_0040, GSession::Libelle(LIB_PRS_NOMINVALIDE), true, false); $formulaire = false; } $retour = true; if ($formulaire === true) { $mPresentation->AjouterJointure(COL_VERSION, COL_ID, 0, NULL, SQL_RIGHT_JOIN); $mPresentation->AjouterColInsertionMaxExt(1, COL_VERSION, COL_ID); $retour = $mPresentation->Ajouter(); } if ($formulaire === false || $retour === false) { GLog::LeverException(EXF_0041, GSession::Libelle(LIB_PRS_PRESNONCREEE), true, false); } else { GSession::PresentationModif($mPresentation->Id()); } } else { $ongletContexte = GContexte::LireVariablePost($nomContexte, 'ongletContexte'); $ancienOngletContexte = GContexte::LireVariableSession($nomContexte, 'ongletContexte'); // Si on a changé d'onglet ou que l'on recharge toute la page. if ($ancienOngletContexte !== $ongletContexte) { GContexte::DesactiverContexte($ancienOngletContexte); GContexte::EcrireVariableSession($nomContexte, 'ongletContexte', $ongletContexte); GContexte::AjouterContexte($ongletContexte, true, false); } else { GContexte::ChargerContexte($ancienOngletContexte); } }
public function AjouterListeSel(SListe &$sListe, $label = '') { $sListe->Triable($this->typeLiaison, '', '', ''); $elem = new SElement($this->prefixIdClass . INPUTLISTEDB_SEL . $this->niveau); $elem->AjouterClasse(INPUTLISTEDB_SEL . $this->niveau); $elem->AddClass(INPUTLISTEDB_JQ_SEL); if ($label === '') { $label = GSession::Libelle(LIB_FOR_SEL, true, true); } $input = new SInputLabel($this->prefixIdClass, $label, $sListe, INPUTLABELPLACE_HAUT, false, true, $this->niveau, true, false); $elem->Attach($input); $this->AttacherCellule(1, 2, $elem); }
$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))); } }
$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); } }
require_once PATH_METIER . 'mTypePresentationModule.php'; $groupe = GSession::Groupe(COL_ID); if ($groupe !== NULL && GDroit::ADroitPopErreur(FONC_PRS_CREERMODIFIER) === true) { $presentationModif = GSession::PresentationModif(); if ($presentationModif != NULL) { // Récupération du nom de fichier que l'on va utiliser pour la sauvegarde. $mPresentationModule = new MPresentationModule(); $mPresentationModule->TypePresentationModule($module); $mTypePresentationModule = $mPresentationModule->TypePresentationModule(); $mTypePresentationModule->AjouterColSelection(COL_NOMFICHIER); $mTypePresentationModule->Charger(); $nomFichier = $mTypePresentationModule->NomFichier(); $cheminCss = GCss::GetCheminFichier($presentationModif); $cheminJs = GJs::GetCheminFichier($presentationModif); if ($cheminCss !== '' && $cheminJs !== '' && $nomFichier !== '') { $varPost = GContexte::LirePost(NULL); // Sauvegarde du Css. GCss::SauvegarderFichierCss($nomFichier, $presentationModif, $varPost); // Sauvegarde du JS. GJs::SauvegarderFichierJs($nomFichier, $presentationModif, $varPost); // Sauvegarde en base. $mPresentationModule->Presentation($presentationModif); $mPresentationModule->RessourceCSS($cheminCss . $nomFichier . '.css'); $mPresentationModule->RessourceJS($cheminJs . $nomFichier . '.js'); $mPresentationModule->ModifierSiExistantAjouterSinon(); } } else { GLog::LeverException(EXF_0060, GSession::Libelle(LIB_PRS_PRESMODIFVIDE), true, false); GLog::LeverException(EXF_0061, GSession::Libelle(LIB_PRS_PRESNONSAUV), true, false); } }
public function AjouterInputButtonAnnuler($ligne, $colonne, $libelle = '') { if ($libelle === '') { $libelle = GSession::Libelle(LIB_FOR_ANNULER); } $bouton = $this->AjouterInputButton($ligne, $colonne, '', $libelle, '', '', '$(this).trigger', false, true); $bouton->AjouterParamRetour('inputNewFormFermer'); return $bouton; }
$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 PATH_METIER . 'mListeLangues.php'; $mListeLangues = new MListeLangues(false); $mListeLangues->AjouterColSelection(COL_ID); $mListeLangues->AjouterColSelection(COL_LIBELLE); $mListeLangues->AjouterColOrdre(COL_LIBELLE); GReferentiel::AjouterReferentiel(COL_LANGUE, $mListeLangues, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); if ($dejaCharge === false) { $selectLangue = new SForm('sellan', 1, 1); $selectLangue->SetCadreInputs(1, 1, 1, 1); $select = $selectLangue->AjouterInputSelect(1, 1, GSession::Libelle(LIB_CON_LANGUE), '', true, GContexte::FormaterVariable($nomContexte, 'langue')); $select->AjouterElementsFromListe(COL_LANGUE, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', GSession::Langue(COL_ID)); GContexte::AjouterContenu(CADRE_INFO_LANGUE, $selectLangue); } else { GReferentiel::GetDifferentielReferentielForSelect(COL_LANGUE, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); }
<?php require_once 'cst.php'; require_once INC_GSESSION; require_once INC_SFORM; require_once PATH_METIER . 'mListeCommunautes.php'; $mListeCommunautes = new MListeCommunautes(false); $mListeCommunautes->AjouterColSelection(COL_ID); $mListeCommunautes->AjouterColSelection(COL_LIBELLE); $mListeCommunautes->AjouterColOrdre(COL_LIBELLE); GReferentiel::AjouterReferentiel(COL_COMMUNAUTE, $mListeCommunautes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE))); if ($dejaCharge === false) { $selectCommunaute = new SForm('selcom', 1, 1); $selectCommunaute->SetCadreInputs(1, 1, 1, 1); $select = $selectCommunaute->AjouterInputSelect(1, 1, GSession::Libelle(LIB_CON_COMMUNAUTE), '', true, GContexte::FormaterVariable($nomContexte, 'communaute')); $select->AjouterElementsFromListe(COL_COMMUNAUTE, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', GSession::Communaute(COL_ID)); GContexte::AjouterContenu(CADRE_INFO_COMMUNAUTE, $selectCommunaute); } else { GReferentiel::GetDifferentielReferentielForSelect(COL_COMMUNAUTE, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); }
$mGroupe->Jeu()->Libelle($mJeu->Libelle()); } $mListeGroupes->AjouterElement($mGroupe); } if ($dejaCharge === false) { $rechargeFonc = AJAXFONC_CHARGERREFERENTIELCONTEXTE; $rechargeParam = 'contexte=' . $nomContexte; $changeFonc = AJAXFONC_MODIFIERDANSCONTEXTE; $changeParam = 'cf=' . GSession::NumCheckFormulaire() . '&contexte=' . $nomContexte; GReferentiel::AjouterReferentiel(COL_JEU, $mListeJeux, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::AjouterReferentiel(COL_GROUPE, $mListeGroupes, array(COL_ID, COL_NOM, COL_DESCRIPTION, COL_JEU), true); $selectGroupe = new SForm(PIC_LOC, 1, 2, false, false); $selectGroupe->SetCadreInputs(1, 1, 1, 2); $select = $selectGroupe->AjouterInputSelect(1, 1, GSession::Libelle(LIB_CON_JEU), INPUTSELECT_TYPE_FIND, true, GContexte::FormaterVariable($nomContexte, COL_JEU), '', '', $nomContexte . COL_JEU, '', '', $rechargeFonc, $rechargeParam, $changeFonc, $changeParam); $select->AjouterElementsFromListe(COL_JEU, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', $jeuId); $select = $selectGroupe->AjouterInputSelect(1, 2, GSession::Libelle(LIB_CON_GROUPE), INPUTSELECT_TYPE_FIND, true, GContexte::FormaterVariable($nomContexte, COL_GROUPE), '', '', $nomContexte . COL_GROUPE, '', '', $rechargeFonc, $rechargeParam, $changeFonc, $changeParam); $select->AjouterReference(COL_GROUPE); $select->AjouterCategorie(0, 'Groupes généraux'); $mTypeGroupe = new MTypeGroupe(TYPEGROUPE_COMMUNAUTE); $mTypeGroupe->AjouterColSelection(COL_LIBELLE); $mTypeGroupe->Charger(); $select->AjouterElement(-1, $mTypeGroupe->Libelle(), '', GSession::Groupe(COL_TYPEGROUPE) === TYPEGROUPE_COMMUNAUTE, false); if (GSession::Jeu(COL_ID) != NULL) { $mTypeGroupe = new MTypeGroupe(TYPEGROUPE_JEU); $mTypeGroupe->AjouterColSelection(COL_LIBELLE); $mTypeGroupe->Charger(); $select->AjouterElement(-2, $mTypeGroupe->Libelle(), '', GSession::Groupe(COL_TYPEGROUPE) === TYPEGROUPE_JEU, false); } if ($mJeu != NULL && $mGroupe != NULL) { $select->AjouterCategorie($mJeu->Id(), $mJeu->Libelle()); $select->AjouterElement($mGroupe->Id(), $mGroupe->Nom(), $mGroupe->Description(), true, false);
<?php require_once 'cst.php'; require_once INC_SCADRE; require_once INC_SCLASSEUR; if (GDroit::ADroitPopErreur(DROIT_ADMIN) === true) { $classeurAdministration = new SClasseur(PIC_ADM, 'admin', true, true); $cadreAdministration = new SCadre(PIC_ADM, GSession::Libelle(LIB_ADM_ADMINISTRATION), $classeurAdministration, true, false); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $cadreAdministration); GContexte::AjouterOnglet('admin', TABLE_VERSION, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_VERSION, false, GContexte::IsContexteExiste(CONT_VERSION, true)); GContexte::AjouterOnglet('admin', TABLE_MONNAIE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_MONNAIE, false, GContexte::IsContexteExiste(CONT_MONNAIE, true)); GContexte::AjouterOnglet('admin', TABLE_COMMUNAUTE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_COMMUNAUTE, false, GContexte::IsContexteExiste(CONT_COMMUNAUTE, true)); GContexte::AjouterOnglet('admin', TABLE_LANGUE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_LANGUE, false, GContexte::IsContexteExiste(CONT_LANGUE, true)); GContexte::AjouterOnglet('admin', TABLE_TYPELIBELLE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_TYPELIBELLE, false, GContexte::IsContexteExiste(CONT_TYPELIBELLE, true)); GContexte::AjouterOnglet('admin', TABLE_LIBELLELIBRE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_LIBELLELIBRE, false, GContexte::IsContexteExiste(CONT_LIBELLELIBRE, true)); GContexte::AjouterOnglet('admin', TABLE_LIBELLETEXTELIBRE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_LIBELLETEXTELIBRE, false, GContexte::IsContexteExiste(CONT_LIBELLETEXTELIBRE, true)); GContexte::AjouterOnglet('admin', TABLE_TYPEPRESENTATIONMODULE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_TYPEPRESENTATIONMODULE, false, GContexte::IsContexteExiste(CONT_TYPEPRESENTATIONMODULE, true)); GContexte::AjouterOnglet('admin', TABLE_MENU, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_MENU, false, GContexte::IsContexteExiste(CONT_MENU, true)); GContexte::AjouterOnglet('admin', TABLE_CONTEXTE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_CONTEXTE, false, GContexte::IsContexteExiste(CONT_CONTEXTE, true)); GContexte::AjouterOnglet('admin', TABLE_FONCTIONNALITE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_FONCTIONNALITE, false, GContexte::IsContexteExiste(CONT_FONCTIONNALITE, true)); GContexte::AjouterOnglet('admin', TABLE_SUPERGRADE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_SUPERGRADE, false, GContexte::IsContexteExiste(CONT_SUPERGRADE, true)); //GContexte::AjouterOnglet('admin', TABLE_GRADECOMMUNAUTEJEU, '', 'AjouterAuContexte', 'contexte='.CONT_ADMINISTRATION.'&'.GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte').'='.CONT_GRADECOMMUNAUTEJEU, false, GContexte::IsContexteExiste(CONT_GRADECOMMUNAUTEJEU, true)); //GContexte::AjouterOnglet('admin', TABLE_GRADEJEU, '', 'AjouterAuContexte', 'contexte='.CONT_ADMINISTRATION.'&'.GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte').'='.CONT_GRADEJEU, false, GContexte::IsContexteExiste(CONT_GRADEJEU, true)); //GContexte::AjouterOnglet('admin', TABLE_GRADECOMMUNAUTE, '', 'AjouterAuContexte', 'contexte='.CONT_ADMINISTRATION.'&'.GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte').'='.CONT_GRADECOMMUNAUTE, false, GContexte::IsContexteExiste(CONT_GRADECOMMUNAUTE, true)); GContexte::AjouterOnglet('admin', TABLE_GRADEGLOBAL, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_GRADEGLOBAL, false, GContexte::IsContexteExiste(CONT_GRADEGLOBAL, true)); GContexte::AjouterOnglet('admin', TABLE_TYPEJEU, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_TYPEJEU, false, GContexte::IsContexteExiste(CONT_TYPEJEU, true)); GContexte::AjouterOnglet('admin', TABLE_ETATRECRUTEMENT, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_ETATRECRUTEMENT, false, GContexte::IsContexteExiste(CONT_ETATRECRUTEMENT, true)); GContexte::AjouterOnglet('admin', TABLE_TYPEGROUPE, '', 'AjouterAuContexte', 'contexte=' . CONT_ADMINISTRATION . '&' . GContexte::FormaterVariable(CONT_ADMINISTRATION, 'ongletContexte') . '=' . CONT_TYPEGROUPE, false, GContexte::IsContexteExiste(CONT_TYPEGROUPE, 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) { GContexte::AjouterOnglet('pres', $mObjet->Libelle(), '', AJAXFONC_AJOUTERAUCONTEXTE, 'contexte=' . CONT_PRESENTATION . '&' . GContexte::FormaterVariable(CONT_PRESENTATION, 'ongletContexte') . '=' . CONT_PRESENTATIONMODULE . '_' . $mObjet->Id(), false, GContexte::IsContexteExiste(CONT_PRESENTATIONMODULE . '_' . $mObjet->Id(), true)); } $org->AttacherCellule(1, 1, $elemInfo); $org->AttacherCellule(2, 1, new SSeparateur($prefixIdClass)); $org->AttacherCellule(3, 1, $elemInfoPresActive); $org->AttacherCellule(4, 1, $elemPresActive); $org->AttacherCellule(5, 1, new SSeparateur($prefixIdClass)); $org->AttacherCellule(6, 1, $elemInfoPresModif); $org->AttacherCellule(7, 1, $elemPresModif); $org->AttacherCellule(8, 1, $classeurPres); $cadre = new SCadre($prefixIdClass, GSession::Libelle(LIB_PRS_PRESENTATION), $org, true, false); $palette = new SPalette($prefixIdClass, GSession::Libelle(LIB_PRS_PALETTE)); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $palette); $div = new SBalise(BAL_DIV); $div->Attach($palette); $div->Attach($cadre); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $div); } else { GReferentiel::GetDifferentielReferentielForSelect(COL_PRESENTATION . 'active', COL_ID, COL_NOM, ''); //, GSession::PresentationActive()); GReferentiel::GetDifferentielReferentielForSelect(COL_PRESENTATION . 'modif', COL_ID, COL_NOM, ''); //, GSession::PresentationModif()); } }
protected function ConstruireElemConsultationContenu(&$element) { $cListeCssSousElements = new CListeCssSousElements($this->prefixIdClass, 'CssSousElements', $this->contexte, -1); $cListeCssSousElements->SetListeParente($this); $niveau = $cListeCssSousElements->Niveau(); $premierPlan = $this->GetElemChampValeurConsultation($element, 'premierPlan'); $secondPlan = $this->GetElemChampValeurConsultation($element, 'secondPlan'); $cadre = $this->GetElemChampValeurConsultation($element, 'cadre'); $texte = $this->GetElemChampValeurConsultation($element, 'texte'); $classe = $this->GetElemChampValeurConsultation($element, COL_CLASSE); $classeTab = $classe . '_tab'; if ($secondPlan !== true) { $classeTab = $classe; } // Premier Plan. if ($premierPlan === true) { $org1 = new SOrganiseur(2, 1, true, true); $org2 = new SOrganiseur(1, 4, true, true); // Couleur du fond. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BACKGROUNDCOLOR); $color = new SInputColor($this->prefixIdClass, COLOR_TYPE_LISTE, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BACKGROUNDCOLOR), $valeur); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_PPCOULEURFOND, true, true), $color, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 1, $inputLabel); // Image de fond. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BACKGROUNDIMAGE); $valeur = substr($valeur, 4, strlen($valeur) - 1); $img = new SInputImage($this->prefixIdClass, INPUTFILE_TYPE_LISTEIMAGE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BACKGROUNDIMAGE), '', GSession::Groupe(COL_ID), '', '', TYPEFICHIER_IMAGEGROUPE, $this->contexte, $niveau); GReferentiel::AjouterReferentielFichiers('images', GCss::GetCheminFichiersImages(), REF_FICHIERSEXTENSIONS_IMAGES); $img->AjouterElementsFromListe('images', false, $valeur); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_PPIMAGE, true, true), $img, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 2, $inputLabel); // Répétition de l'image de fond. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BACKGROUNDREPEAT); $select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BACKGROUNDREPEAT), '', '', '', '', '', '', '', '', '', $niveau); $select->AjouterElement('repeat', 'repeat', '', $valeur === 'repeat'); $select->AjouterElement('repeat-x', 'repeat-x', '', $valeur === 'repeat-x'); $select->AjouterElement('repeat-y', 'repeat-y', '', $valeur === 'repeat-y'); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_PPREPETITION, true, true), $select, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 3, $inputLabel); // Transparence. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_OPACITY); if ($valeur === '') { $valeur = '100'; } $text = new SInputText($this->prefixIdClass, INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_OPACITY), $valeur, 0, 0, 3, false, '%', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 100, $niveau); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_PPTRANSPARENCE, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 4, $inputLabel); $org1->AttacherCellule(1, 1, $org2); $cListeCssSousElements->AjouterElement(GSession::Libelle(LIB_PRS_SEPREMIERPLAN, true, true), $org1); } /*****************************************************/ // Second Plan. if ($secondPlan === true) { $org1 = new SOrganiseur(2, 1, true, true); $org2 = new SOrganiseur(1, 4, true, true); // Couleur du fond. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classe, CSSATT_BACKGROUNDCOLOR); $color = new SInputColor($this->prefixIdClass, COLOR_TYPE_LISTE, GContexte::FormaterVariable($this->contexte, $classe . '][' . CSSATT_BACKGROUNDCOLOR), $valeur); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_PPCOULEURFOND, true, true), $color, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 1, $inputLabel); // Image de fond. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classe, CSSATT_BACKGROUNDIMAGE); $valeur = substr($valeur, 4, strlen($valeur) - 1); $img = new SInputImage($this->prefixIdClass, INPUTFILE_TYPE_LISTEIMAGE, false, GContexte::FormaterVariable($this->contexte, $classe . '][' . CSSATT_BACKGROUNDIMAGE), '', GSession::Groupe(COL_ID), '', '', TYPEFICHIER_IMAGEGROUPE, $this->contexte, $niveau); GReferentiel::AjouterReferentielFichiers('images', GCss::GetCheminFichiersImages(), REF_FICHIERSEXTENSIONS_IMAGES); $img->AjouterElementsFromListe('images', false, $valeur); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_PPIMAGE, true, true), $img, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 2, $inputLabel); // Répétition de l'image de fond. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classe, CSSATT_BACKGROUNDREPEAT); $select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classe . '][' . CSSATT_BACKGROUNDREPEAT), '', '', '', '', '', '', '', '', '', $niveau); $select->AjouterElement('repeat', 'repeat', '', $valeur === 'repeat'); $select->AjouterElement('repeat-x', 'repeat-x', '', $valeur === 'repeat-x'); $select->AjouterElement('repeat-y', 'repeat-y', '', $valeur === 'repeat-y'); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_PPREPETITION, true, true), $select, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 3, $inputLabel); // Transparence. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classe, CSSATT_OPACITY); if ($valeur === '') { $valeur = '100'; } $text = new SInputText($this->prefixIdClass, INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classe . '][' . CSSATT_OPACITY), $valeur, 0, 0, 3, false, '%', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 100, $niveau); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_PPTRANSPARENCE, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 4, $inputLabel); $org1->AttacherCellule(1, 1, $org2); $cListeCssSousElements->AjouterElement(GSession::Libelle(LIB_PRS_SESECONDPLAN, true, true), $org1); } /*****************************************************/ // Cadre. if ($cadre === true) { $org1 = new SOrganiseur(2, 1, true, true); $org2 = new SOrganiseur(2, 1, true, true); $org1->AttacherCellule(1, 1, $org2); $org3 = new SOrganiseur(4, 1, true, true); $org1->AttacherCellule(2, 1, $org3); // Marge intérieure. $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_CMARGEINT, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true, true); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_PADDINGTOP); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CHAUT), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_PADDINGTOP), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_PADDINGLEFT); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CGAUCHE), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_PADDINGLEFT), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_PADDINGBOTTOM); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CBAS), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_PADDINGBOTTOM), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_PADDINGRIGHT); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CDROIT), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_PADDINGRIGHT), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $org2->AttacherCellule(1, 1, $inputLabel); //Marge extérieure. $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_CMARGEEXT, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true, true); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_MARGINTOP); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CHAUT), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_MARGINTOP), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_MARGINLEFT); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CGAUCHE), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_MARGINLEFT), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_MARGINBOTTOM); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CBAS), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_MARGINBOTTOM), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_MARGINRIGHT); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CDROIT), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_MARGINRIGHT), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $org2->AttacherCellule(2, 1, $inputLabel); //Bord haut. $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_CBORDHAUT, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true, true); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERTOPCOLOR); $inputLabel->AjouterInputColor(GSession::Libelle(LIB_PRS_TCOULEUR), COLOR_TYPE_LISTE, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERTOPCOLOR), $valeur); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERTOPWIDTH); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CEPAISSEUR), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERTOPWIDTH), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERTOPSTYLE); $select = $inputLabel->AjouterInputSelect(GSession::Libelle(LIB_PRS_TSTYLE), INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERTOPSTYLE)); $select->AjouterElement('none', 'none', '', $valeur === 'none'); $select->AjouterElement('dotted', 'dotted', '', $valeur === 'dotted'); $select->AjouterElement('dashed', 'dashed', '', $valeur === 'dashed'); $select->AjouterElement('solid', 'solid', '', $valeur === 'solid'); $select->AjouterElement('double', 'double', '', $valeur === 'double'); $select->AjouterElement('groove', 'groove', '', $valeur === 'groove'); $select->AjouterElement('ridge', 'ridge', '', $valeur === 'ridge'); $select->AjouterElement('inset', 'inset', '', $valeur === 'inset'); $select->AjouterElement('outset', 'outset', '', $valeur === 'outset'); $org3->AttacherCellule(1, 1, $inputLabel); //Bord gauche. $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_CBORDGAUCHE, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true, true); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERLEFTCOLOR); $inputLabel->AjouterInputColor(GSession::Libelle(LIB_PRS_TCOULEUR), COLOR_TYPE_LISTE, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERLEFTCOLOR), $valeur); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERLEFTWIDTH); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CEPAISSEUR), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERLEFTWIDTH), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERLEFTSTYLE); $select = $inputLabel->AjouterInputSelect(GSession::Libelle(LIB_PRS_TSTYLE), INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERLEFTSTYLE)); $select->AjouterElement('none', 'none', '', $valeur === 'none'); $select->AjouterElement('dotted', 'dotted', '', $valeur === 'dotted'); $select->AjouterElement('dashed', 'dashed', '', $valeur === 'dashed'); $select->AjouterElement('solid', 'solid', '', $valeur === 'solid'); $select->AjouterElement('double', 'double', '', $valeur === 'double'); $select->AjouterElement('groove', 'groove', '', $valeur === 'groove'); $select->AjouterElement('ridge', 'ridge', '', $valeur === 'ridge'); $select->AjouterElement('inset', 'inset', '', $valeur === 'inset'); $select->AjouterElement('outset', 'outset', '', $valeur === 'outset'); $org3->AttacherCellule(2, 1, $inputLabel); //Bord bas. $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_CBORDBAS, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true, true); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERBOTTOMCOLOR); $inputLabel->AjouterInputColor(GSession::Libelle(LIB_PRS_TCOULEUR), COLOR_TYPE_LISTE, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERBOTTOMCOLOR), $valeur); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERBOTTOMWIDTH); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CEPAISSEUR), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERBOTTOMWIDTH), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERBOTTOMSTYLE); $select = $inputLabel->AjouterInputSelect(GSession::Libelle(LIB_PRS_TSTYLE), INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERBOTTOMSTYLE)); $select->AjouterElement('none', 'none', '', $valeur === 'none'); $select->AjouterElement('dotted', 'dotted', '', $valeur === 'dotted'); $select->AjouterElement('dashed', 'dashed', '', $valeur === 'dashed'); $select->AjouterElement('solid', 'solid', '', $valeur === 'solid'); $select->AjouterElement('double', 'double', '', $valeur === 'double'); $select->AjouterElement('groove', 'groove', '', $valeur === 'groove'); $select->AjouterElement('ridge', 'ridge', '', $valeur === 'ridge'); $select->AjouterElement('inset', 'inset', '', $valeur === 'inset'); $select->AjouterElement('outset', 'outset', '', $valeur === 'outset'); $org3->AttacherCellule(3, 1, $inputLabel); //Bord droit. $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_CBORDDROIT, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true, true); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERRIGHTCOLOR); $inputLabel->AjouterInputColor(GSession::Libelle(LIB_PRS_TCOULEUR), COLOR_TYPE_LISTE, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERRIGHTCOLOR), $valeur); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERRIGHTWIDTH); $inputLabel->AjouterInputText(GSession::Libelle(LIB_PRS_CEPAISSEUR), INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERRIGHTWIDTH), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 30); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_BORDERRIGHTSTYLE); $select = $inputLabel->AjouterInputSelect(GSession::Libelle(LIB_PRS_TSTYLE), INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_BORDERRIGHTSTYLE)); $select->AjouterElement('none', 'none', '', $valeur === 'none'); $select->AjouterElement('dotted', 'dotted', '', $valeur === 'dotted'); $select->AjouterElement('dashed', 'dashed', '', $valeur === 'dashed'); $select->AjouterElement('solid', 'solid', '', $valeur === 'solid'); $select->AjouterElement('double', 'double', '', $valeur === 'double'); $select->AjouterElement('groove', 'groove', '', $valeur === 'groove'); $select->AjouterElement('ridge', 'ridge', '', $valeur === 'ridge'); $select->AjouterElement('inset', 'inset', '', $valeur === 'inset'); $select->AjouterElement('outset', 'outset', '', $valeur === 'outset'); $org3->AttacherCellule(4, 1, $inputLabel); $cListeCssSousElements->AjouterElement(GSession::Libelle(LIB_PRS_SECADRE, true, true), $org1); } /*****************************************************/ // Alignement. //$cListeCssSousElements->AjouterElement(GSession::Libelle(LIB_PRS_SEALIGNEMENT, true, true), 'gnu testa'); /*****************************************************/ // Texte. if ($texte === true) { $org1 = new SOrganiseur(2, 1, true, true); $org2 = new SOrganiseur(1, 4, true, true); // Couleur. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_COLOR); $color = new SInputColor($this->prefixIdClass, COLOR_TYPE_LISTE, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_COLOR), $valeur); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_TCOULEUR, true, true), $color, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 1, $inputLabel); // Police. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_FONTFAMILY); $select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_FONTFAMILY), '', '', '', '', '', '', '', '', '', $niveau); $select->AjouterElement('Arial sans serif', 'Arial', '', $valeur === 'Arial sans serif'); $select->AjouterElement('Helvetica sans serif', 'Helvetica', '', $valeur === 'Helvetica sans serif'); $select->AjouterElement('MS sans serif', 'MS', '', $valeur === 'MS sans serif'); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_TPOLICE, true, true), $select, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 2, $inputLabel); // Taille. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_FONTSIZE); $text = new SInputText($this->prefixIdClass, INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_FONTSIZE), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 40, $niveau); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_TTAILLE, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 3, $inputLabel); // Indentation. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_TEXTINDENT); $text = new SInputText($this->prefixIdClass, INPUTTEXT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_TEXTINDENT), str_replace('px', '', $valeur), 0, 2, 2, false, 'px', '', '', INPUTTEXT_REGEXP_DECIMAL_FV, 0, 40, $niveau); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_TINDENTATION, true, true), $text, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org2->AttacherCellule(1, 4, $inputLabel); $org1->AttacherCellule(1, 1, $org2); // Style. $org3 = new SOrganiseur(1, 4, true, true); $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_FONTSTYLE); $select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_FONTSTYLE), '', '', '', '', '', '', '', '', '', $niveau); $select->AjouterElement('normal', 'normal', '', $valeur === 'normal'); $select->AjouterElement('italic', 'italique', '', $valeur === 'italic'); $select->AjouterElement('oblique', 'oblique', '', $valeur === 'oblique'); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_TSTYLE, true, true), $select, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org3->AttacherCellule(1, 1, $inputLabel); // Poids. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_FONTWEIGHT); $select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_FONTWEIGHT), '', '', '', '', '', '', '', '', '', $niveau); $select->AjouterElement('lighter', 'léger', '', $valeur === 'lighter'); $select->AjouterElement('normal', 'normal', '', $valeur === 'normal'); $select->AjouterElement('bold', 'gras', '', $valeur === 'bold'); $select->AjouterElement('bolder', 'très gras', '', $valeur === 'bolder'); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_TPOIDS, true, true), $select, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org3->AttacherCellule(1, 2, $inputLabel); // Décoration. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_TEXTDECORATION); $select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_TEXTDECORATION), '', '', '', '', '', '', '', '', '', $niveau); $select->AjouterElement('underline', 'souligné', '', $valeur === 'underline'); $select->AjouterElement('overline', 'surligné', '', $valeur === 'overline'); $select->AjouterElement('line-through', 'barré', '', $valeur === 'line-through'); $select->AjouterElement('none', 'aucune', '', $valeur === 'none'); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_TDECORATION, true, true), $select, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org3->AttacherCellule(1, 3, $inputLabel); // Casse. $valeur = GCss::GetValeurAttributCss($this->nomFichier, $this->presentation, $classeTab, CSSATT_FONTVARIANT); $select = new SInputSelect($this->prefixIdClass, INPUTSELECT_TYPE_LISTE, false, GContexte::FormaterVariable($this->contexte, $classeTab . '][' . CSSATT_FONTVARIANT), '', '', '', '', '', '', '', '', '', $niveau); $select->AjouterElement('normal', 'normal', '', $valeur === 'normal'); $select->AjouterElement('small-caps', 'petites capitales', '', $valeur === 'small-caps'); $inputLabel = new SInputLabel($this->prefixIdClass, GSession::Libelle(LIB_PRS_TCASSE, true, true), $select, INPUTLABELPLACE_GAUCHE, false, false, $niveau, true, true); $org3->AttacherCellule(1, 4, $inputLabel); $org1->AttacherCellule(2, 1, $org3); $cListeCssSousElements->AjouterElement(GSession::Libelle(LIB_PRS_SETEXTE, true, true), $org1); } return $cListeCssSousElements; }
private function WriteText() { if (is_int($this->texte)) { return GSession::Libelle($this->texte); } return $this->texte; }
GSession::PresentationModif($presModif); GReponse::AjouterElementClasseurRechargement('pres'); // A faire: // - Rechargement des onglets ou pas? } } else { if ($presActive !== '') { require_once PATH_METIER . 'mPresentationGroupe.php'; require_once PATH_METIER . 'mPresentation.php'; require_once PATH_METIER . 'mGroupe.php'; $anciennePresActive = GSession::PresentationActive(); // Suppression de l'ancienne présentation pour le groupe. $mPresentationGroupe = new MPresentationGroupe($anciennePresActive, $groupe); $retour = $mPresentationGroupe->Supprimer(); if ($retour !== false) { // Ajout de la nouvelle présentation pour le groupe. $mPresentationGroupe->Presentation($presActive); $retour = $mPresentationGroupe->Ajouter(); if ($retour !== false) { GSession::PresentationActive($presActive, true); } } if ($retour === false) { GLog::LeverException(EXF_0050, GSession::Libelle(LIB_PRS_PRESACTNONMODIF), true, false); GLog::LeverException(EXF_0050, 'Erreur lors de la tentative de modification de la présentation active.'); } // A faire: // - Rechargement du css. } } }
<?php require_once 'cst.php'; require_once INC_GSESSION; require_once INC_SFORM; require_once PATH_METIER . 'mJoueur.php'; $codeActivation = GContexte::LireVariablePost($nomContexte, 'codeActivation'); $mJoueur = new MJoueur(GSession::Joueur(COL_ID)); $mJoueur->AjouterColSelection(COL_CODEACTIVATION); $compteActive = false; if ($mJoueur->Charger() !== false) { if ($mJoueur->CodeActivation() !== $codeActivation) { GLog::LeverException(EXF_0030, GSession::Libelle(LIB_ACT_CODEACTIVATIONFAUX), true, false); } else { $mJoueur->Actif(true); $compteActive = $mJoueur->Modifier(); } } if ($compteActive === false) { GLog::LeverException(EXF_0031, GSession::Libelle(LIB_ACT_ACTIVCOMPTEERREUR), true, false); } else { GContexte::SetContexte(CONT_AIDE, true); } $pasDeRechargement = true;
$select = $form->AjouterInputSelect(2, 1, GSession::Libelle(LIB_JEU_TYPEJEU), '', true, GContexte::FormaterVariable($nomContexte, COL_TYPEJEU), GSession::Libelle(LIB_JEU_TYPEJEUINFO), GSession::Libelle(LIB_JEU_TYPEJEUERREUR), $nomContexte . COL_TYPEJEU); $select->AjouterElementsFromListe(COL_TYPEJEU, COL_ID, array(COL_LIBELLE, COL_LIBELLE), array(COL_DESCRIPTION, COL_LIBELLE)); $form->AjouterInputCheckbox(3, 1, GSession::Libelle(LIB_JEU_NECBOSS), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITEBOSS), GSession::Libelle(LIB_JEU_NECBOSSINFO)); $form->AjouterInputCheckbox(4, 1, GSession::Libelle(LIB_JEU_NECCLASSE), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITECLASSE), GSession::Libelle(LIB_JEU_NECCLASSEINFO)); $form->AjouterInputCheckbox(5, 1, GSession::Libelle(LIB_JEU_NECMETIER), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITEMETIER), GSession::Libelle(LIB_JEU_NECMETIERINFO)); $form->AjouterInputCheckbox(6, 1, GSession::Libelle(LIB_JEU_NECNIVEAU), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITENIVEAU), GSession::Libelle(LIB_JEU_NECNIVEAUINFO)); $form->AjouterInputText(6, 2, GSession::Libelle(LIB_JEU_NIVEAUMAX), '', false, GContexte::FormaterVariable($nomContexte, COL_NIVEAUMAX), '', 1, 5, 5, false, '', GSession::Libelle(LIB_JEU_NIVEAUMAXINFO), '', INPUTTEXT_REGEXP_DECIMAL_FV); $form->AjouterInputCheckbox(7, 1, GSession::Libelle(LIB_JEU_NECOBJET), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITEOBJET), GSession::Libelle(LIB_JEU_NECOBJETINFO)); $form->AjouterInputCheckbox(8, 1, GSession::Libelle(LIB_JEU_NECROLE), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITEROLE), GSession::Libelle(LIB_JEU_NECROLEINFO)); $form->AjouterInputCheckbox(9, 1, GSession::Libelle(LIB_JEU_NECSERVEUR), '', false, GContexte::FormaterVariable($nomContexte, COL_NECESSITESERVEUR), GSession::Libelle(LIB_JEU_NECSERVEURINFO)); $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), '', true, GContexte::FormaterVariable($nomContexte, COL_TYPEGROUPE), GSession::Libelle(LIB_JEU_TYPESGROUPESINFO), GSession::Libelle(LIB_JEU_TYPESGROUPESERREUR)); $liste->AjouterListe($cListeJeuTypesGroupes); $form->SetCadreBoutons(3, 1, 1, 1); $form->AjouterInputButtonAjouterAuContexte(1, 1, $nomContexte, true, GSession::Libelle(LIB_JEU_CREERJEU)); $org->AttacherCellule(2, 1, $form); // Cadre contenant le formulaire et son explication. $cadre = new SCadre(PIC_NJEU, GSession::Libelle(LIB_JEU_CREATIONJEU), $org, 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))); } }
<?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);
$mListe->AjouterColSelection(COL_DESCRIPTION); $mListe->AjouterColSelection(COL_HISTOIRE); $mListe->AjouterColSelection(COL_JEU); $numJointure = $mListe->AjouterJointure(COL_JEU, COL_ID); $numJointure = $mListe->AjouterJointure(COL_LIBELLE, COL_ID, $numJointure); $mListe->AjouterColSelectionPourJointure($numJointure, COL_LIBELLE, COL_JEU . COL_LIBELLE); $mListe->AjouterFiltreEgalPourJointure($numJointure, COL_LANGUE, GSession::Langue(COL_ID)); $mListe->AjouterColSelection(COL_SERVEUR); $numJointure = $mListe->AjouterJointure(COL_SERVEUR, COL_ID); $numJointure = $mListe->AjouterJointure(COL_LIBELLE, COL_ID, $numJointure); $mListe->AjouterColSelectionPourJointure($numJointure, COL_LIBELLE, COL_SERVEUR . COL_LIBELLE); $mListe->AjouterFiltreEgalPourJointure($numJointure, COL_LANGUE, GSession::Langue(COL_ID)); $mListe->AjouterColSelection(COL_COMMUNAUTE); $numJointure = $mListe->AjouterJointure(COL_COMMUNAUTE, COL_ID); $numJointure = $mListe->AjouterJointure(COL_LIBELLE, COL_ID, $numJointure); $mListe->AjouterColSelectionPourJointure($numJointure, COL_LIBELLE, COL_COMMUNAUTE . COL_LIBELLE); $mListe->AjouterFiltreEgalPourJointure($numJointure, COL_LANGUE, GSession::Langue(COL_ID)); $mListe->AjouterColSelection(COL_TYPEGROUPE); $numJointure = $mListe->AjouterJointure(COL_TYPEGROUPE, COL_ID); $numJointure = $mListe->AjouterJointure(COL_LIBELLE, COL_ID, $numJointure); $mListe->AjouterColSelectionPourJointure($numJointure, COL_LIBELLE, COL_TYPEGROUPE . COL_LIBELLE); $mListe->AjouterFiltreEgalPourJointure($numJointure, COL_LANGUE, GSession::Langue(COL_ID)); $mListe->AjouterColOrdre(COL_NOM); $cListe->InjecterListeObjetsMetiers($mListe); if ($dejaCharge === false) { $cadre = new SCadre($prefixIdClass, GSession::Libelle(LIB_GPE_LISTEGROUPESJOUEUR), $cListe, true, false); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $cadre); } else { GContexte::AjouterListe($cListe); } }
$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); $vue->AttacherCellule(4, 1, $cadre); $cListeCssParties->AjouterElement(GSession::Libelle(LIB_PRS_PRESGEN, false, true), $vue); /*********************************************/ $form = new SForm($prefixIdClass, 2, 1, true, false); $form->SetCadreInputs(1, 1, 1, 1); $form->AjouterInput(1, 1, '', $cListeCssParties, false); $form->SetCadreBoutons(2, 1, 1, 1); $form->AjouterInputButtonModifierDansContexte(1, 1, $nomContexte, false, GSession::Libelle(LIB_PRS_SAUVEGARDER)); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $form); $mListePresentationsModules = new mListePresentationsModules(); $mListePresentationsModules->AjouterColSelection(COL_RESSOURCEJS); $mListePresentationsModules->AjouterFiltreEgal(COL_PRESENTATION, $presentationModif); $numJointure = $mListePresentationsModules->AjouterJointure(COL_TYPEPRESENTATIONMODULE, COL_ID, 0, SQL_RIGHT_JOIN); $mListePresentationsModules->AjouterColSelectionPourJointure($numJointure, COL_ID); $mListePresentationsModules->AjouterFiltreEgalPourJointure($numJointure, COL_ACTIF, true); $mListePresentationsModules->Charger(); foreach ($mListePresentationsModules->GetListe() as $mPresentationModule) { if ($mPresentationModule->RessourceJS() != NULL) { GReponse::AjouterElementJS($mPresentationModule->TypePresentationModule()->Id(), PATH_SERVER_HTTP . $mPresentationModule->RessourceJS(), true); } else { GReponse::AjouterElementJS($mPresentationModule->TypePresentationModule()->Id(), '', true); } }
require_once 'cst.php'; require_once INC_GSESSION; require_once PATH_METIER . 'mJoueur.php'; $login = GContexte::LireVariablePost($nomContexte, 'login'); $motDePasse = GContexte::LireVariablePost($nomContexte, 'motDePasse'); $mJoueur = new MJoueur(NULL, $login, $motDePasse); $formulaireValide = true; // On vérifie qu'un compte existe pour cette adresse email. $mJoueur->ChargerFromLoginEtMotDePasse(); if ($mJoueur->Id() === NULL || $mJoueur->Supprime() === true) { GLog::LeverException(EXF_0020, GSession::Libelle(LIB_CON_COMPTENONEXISTANT), true, false); $formulaireValide = false; } else { if ($mJoueur->Banni() === true) { GLog::LeverException(EXF_0021, GSession::Libelle(LIB_CON_COMPTEBANNI), true, false); $formulaireValide = false; } } if ($formulaireValide === true) { GSession::Joueur(COL_ID, $mJoueur->Id()); GSession::Joueur(COL_PSEUDO, $mJoueur->Pseudo()); GSession::Joueur(COL_SUPERADMIN, $mJoueur->SuperAdmin()); // On vérifie si le compte a été activé ou non. if ($mJoueur->Actif() === false) { GContexte::SetContexte(CONT_ACTIVATION); } else { GContexte::SetContexte(CONT_ADMINISTRATION, false); } } else { GContexte::SupprimerContexte(CONT_CONNEXION);
<?php require_once 'cst.php'; require_once INC_SCADRE; require_once INC_SSEPARATEUR; if ($dejaCharge === false) { $prefixIdClass = PIC_AID; $orgCadre = new SOrganiseur(3, 1, true); $elemGlossaire = new SElement($prefixIdClass . CLASSTEXTE_INFO); $elemGlossaire->AjouterClasse(CLASSTEXTE_INFO); $elemGlossaire->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_AID_GLOSSAIRE, false, true))); $cadreGlossaire = new SCadre($prefixIdClass, GSession::Libelle(LIB_AID_GLOSSAIRE), $elemGlossaire, true, false); $org = new SOrganiseur(2, 1, true); $elemRejoindreGroupe = new SElement($prefixIdClass . CLASSTEXTE_INFO); $elemRejoindreGroupe->AjouterClasse(CLASSTEXTE_INFO); $elemRejoindreGroupe->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_AID_REJGPE1, false, true))); $org->AttacherCellule(1, 1, $elemRejoindreGroupe); $elemRejoindreGroupe = new SElement($prefixIdClass . CLASSTEXTE_INFO); $elemRejoindreGroupe->AjouterClasse(CLASSTEXTE_INFO); $elemRejoindreGroupe->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_AID_REJGPE2, false, true))); $org->AttacherCellule(2, 1, $elemRejoindreGroupe); $cadreRejoindreGroupe = new SCadre($prefixIdClass, GSession::Libelle(LIB_AID_REJGPE), $org, true, false); $elemCreerGroupe = new SElement($prefixIdClass . CLASSTEXTE_INFO); $elemCreerGroupe->AjouterClasse(CLASSTEXTE_INFO); $elemCreerGroupe->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_AID_CREERGPE, false, true))); $cadreCreerGroupe = new SCadre($prefixIdClass, GSession::Libelle(LIB_AID_CREGPE), $elemCreerGroupe, true, false); $orgCadre->AttacherCellule(1, 1, $cadreGlossaire); $orgCadre->AttacherCellule(2, 1, $cadreRejoindreGroupe); $orgCadre->AttacherCellule(3, 1, $cadreCreerGroupe); GContexte::AjouterContenu(CADRE_CONTENU_CONTENU, $orgCadre); }