public function ListeMenusFonctionnalites($liste = NULL) { $oldId = NULL; if ($this->mListeMenusFonctionnalites !== NULL) { $oldId = $this->mListeMenusFonctionnalites->GetFiltreValeur(0, COL_MENU); } if ($this->Id() === NULL && $liste === NULL) { if ($this->mListeMenusFonctionnalites !== NULL && $this->Id() !== $oldId) { unset($this->mListeMenusFonctionnalites); } } else { if ($this->mListeMenusFonctionnalites === NULL || $this->Id() !== $oldId) { if ($this->mListeMenusFonctionnalites === NULL || $oldId !== NULL) { $this->mListeMenusFonctionnalites = new MListeMenusFonctionnalites(); $numJointureFonc = $this->mListeMenusFonctionnalites->AjouterJointure(COL_FONCTIONNALITE, COL_ID); $this->mListeMenusFonctionnalites->AjouterColSelectionPourJointure($numJointureFonc, COL_ID); $numJointure = $this->mListeMenusFonctionnalites->AjouterJointure(COL_LIBELLE, COL_ID, $numJointureFonc); $this->mListeMenusFonctionnalites->AjouterColSelectionPourJointure($numJointure, COL_LIBELLE, COL_LIBELLE . COL_LIBELLE); $this->mListeMenusFonctionnalites->AjouterColOrdrePourJointure($numJointure, COL_LIBELLE); $this->mListeMenusFonctionnalites->AjouterFiltreEgalPourJointure($numJointure, COL_LANGUE, GSession::Langue(COL_ID)); $numJointure = $this->mListeMenusFonctionnalites->AjouterJointure(COL_DESCRIPTION, COL_ID, $numJointureFonc); $this->mListeMenusFonctionnalites->AjouterColSelectionPourJointure($numJointure, COL_LIBELLE, COL_DESCRIPTION . COL_LIBELLE); $this->mListeMenusFonctionnalites->AjouterFiltreEgalPourJointure($numJointure, COL_LANGUE, GSession::Langue(COL_ID)); } $this->mListeMenusFonctionnalites->AjouterFiltreEgal(COL_MENU, $this->Id()); } } if ($this->mListeMenusFonctionnalites !== NULL && $liste !== NULL) { $this->mListeMenusFonctionnalites->SetListeFromTableau($liste, array(array(COL_ID, COL_FONCTIONNALITE), array(array(COL_LIBELLE, array(COL_FONCTIONNALITE, COL_LIBELLE, COL_LIBELLE))))); } return $this->mListeMenusFonctionnalites; }
public function Modifier() { $retour = false; $colCond = $this->bufferColCond; if ($this->Id() !== NULL || $colCond !== NULL) { if ($colCond === NULL) { $this->AjouterColCondition(COL_ID); $this->AjouterColCondition(COL_LANGUE); } if ($this->Langue()->Id() === NULL) { $this->Langue()->Id(GSession::Langue(COL_ID)); } $this->LangueOriginelle()->Id($this->Langue()->Id()); // On ne modifie le libellé que pour notre langue. $retour = parent::Modifier(); if ($retour !== false) { // On modifie le libellé pour toutes les autres langues qui ont comme langue d'origine notre langue. $mListeLibelles = new MListeLibellesLibres(); $mListeLibelles->AjouterColModification(COL_LIBELLE, $this->Libelle()); $mListeLibelles->AjouterColModification(COL_TYPELIBELLE, $this->TypeLibelle()->Id()); $mListeLibelles->AjouterFiltreEgal(COL_ID, $this->Id()); $mListeLibelles->AjouterFiltreEgal(COL_LANGUEORIGINELLE, $this->Langue()->Id()); $retour = $mListeLibelles->Modifier(); } } return $retour; }
public function Ajouter() { // Ouverture de la transaction si on ne l'ai pas déjà. $retour = parent::Ajouter(); if ($retour !== false) { // On copie les libellés pour la nouvelle langue. $mListeLibelles = new MListeLibelles(); $mListeLibelles->AjouterJointure(COL_LANGUE, COL_ID, 0, SQL_CROSS_JOIN); $mListeLibelles->AjouterColInsertionExt(0, COL_ID, COL_ID); $mListeLibelles->AjouterColInsertionExt(0, COL_LIBELLE, COL_LIBELLE); $mListeLibelles->AjouterColInsertionExt(0, COL_TYPELIBELLE, COL_TYPELIBELLE); $mListeLibelles->AjouterColInsertionExt(0, COL_LANGUEORIGINELLE, COL_LANGUEORIGINELLE); $mListeLibelles->AjouterColInsertionExt(1, COL_LANGUE, COL_ID); $mListeLibelles->AjouterFiltreEgal(COL_LANGUE, GSession::Langue(COL_ID)); $mListeLibelles->AjouterFiltreEgalPourJointure(1, COL_ID, $this->Id()); $mListeLibelles->Ajouter(); $mListeLibelles = new MListeLibellesLibres(); $mListeLibelles->AjouterJointure(COL_LANGUE, COL_ID, 0, SQL_CROSS_JOIN); $mListeLibelles->AjouterColInsertionExt(0, COL_ID, COL_ID); $mListeLibelles->AjouterColInsertionExt(0, COL_LIBELLE, COL_LIBELLE); $mListeLibelles->AjouterColInsertionExt(0, COL_TYPELIBELLE, COL_TYPELIBELLE); $mListeLibelles->AjouterColInsertionExt(0, COL_LANGUEORIGINELLE, COL_LANGUEORIGINELLE); $mListeLibelles->AjouterColInsertionExt(1, COL_LANGUE, COL_ID); $mListeLibelles->AjouterFiltreEgal(COL_LANGUE, GSession::Langue(COL_ID)); $mListeLibelles->AjouterFiltreEgalPourJointure(1, COL_ID, $this->Id()); $mListeLibelles->Ajouter(); $mListeLibelles = new MListeLibellesTextes(); $mListeLibelles->AjouterJointure(COL_LANGUE, COL_ID, 0, SQL_CROSS_JOIN); $mListeLibelles->AjouterColInsertionExt(0, COL_ID, COL_ID); $mListeLibelles->AjouterColInsertionExt(0, COL_LIBELLE, COL_LIBELLE); $mListeLibelles->AjouterColInsertionExt(0, COL_TYPELIBELLE, COL_TYPELIBELLE); $mListeLibelles->AjouterColInsertionExt(0, COL_LANGUEORIGINELLE, COL_LANGUEORIGINELLE); $mListeLibelles->AjouterColInsertionExt(1, COL_LANGUE, COL_ID); $mListeLibelles->AjouterFiltreEgal(COL_LANGUE, GSession::Langue(COL_ID)); $mListeLibelles->AjouterFiltreEgalPourJointure(1, COL_ID, $this->Id()); $mListeLibelles->Ajouter(); $mListeLibelles = new MListeLibellesTextesLibres(); $mListeLibelles->AjouterJointure(COL_LANGUE, COL_ID, 0, SQL_CROSS_JOIN); $mListeLibelles->AjouterColInsertionExt(0, COL_ID, COL_ID); $mListeLibelles->AjouterColInsertionExt(0, COL_LIBELLE, COL_LIBELLE); $mListeLibelles->AjouterColInsertionExt(0, COL_TYPELIBELLE, COL_TYPELIBELLE); $mListeLibelles->AjouterColInsertionExt(0, COL_LANGUEORIGINELLE, COL_LANGUEORIGINELLE); $mListeLibelles->AjouterColInsertionExt(1, COL_LANGUE, COL_ID); $mListeLibelles->AjouterFiltreEgal(COL_LANGUE, GSession::Langue(COL_ID)); $mListeLibelles->AjouterFiltreEgalPourJointure(1, COL_ID, $this->Id()); $mListeLibelles->Ajouter(); } return $retour; }
public function __construct($date = '', $fuseauEntree = FH_SERVEUR, $fuseauSortie = FH_SQL) { // Maintenant. if ($date == DATE_NOW) { $this->valide = true; $this->now = true; } else { $this->valide = false; $this->now = false; $this->ResetDate(); if ($this->ParserDate($date)) { $this->VerifierDate(); } } $this->langue = GSession::Langue(COL_ID); $this->FuseauEntree($fuseauEntree); $this->FuseauSortie($fuseauSortie); }
public function AjouterBaseColSelection($bObjetBase, $col, $as) { switch ($this->GetChampComportement($col)) { case COL_LIBELLE: $bObjetBase->AjouterJointure(COL_LIBELLE, $this->LibelleObj()->GetObjetBase(), COL_ID); $bObjetBase->AjouterColSelect(COL_ID, $this->LibelleObj()->GetAsCol($col)); $bObjetBase->AjouterColSelect(COL_LIBELLE, $this->LibelleObj()->GetAsCol($col)); $bObjetBase->AjouterColWhere(COL_LANGUE, GSession::Langue(COL_ID)); break; default: $bObjetBase->AjouterColSelect($col, $this->GetAsCol($col)); } self::$numChamp++; }
$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); } }
<?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)); }
public function Modifier() { $langueId = GSession::Langue(COL_ID); $mLibelle = NULL; // On ne modifie le libellé que pour notre langue. if ($this->Libelle() !== NULL && $langueId !== NULL) { $mLibelle = $this->AjouterJointure(COL_LIBELLE, COL_ID); if ($mLibelle->Langue()->Id() !== NULL) { $langueId = $mLibelle->Langue()->Id(); } $mLibelle->LangueOriginelle()->Id($langueId); $mLibelle->AjouterColModification(COL_LIBELLE); $mLibelle->AjouterColModification(COL_LANGUEORIGINELLE); $mLibelle->AjouterColCondition(COL_LANGUE, $langueId); $mLibelle->ModifierSurJointure(true); } $retour = parent::Modifier(); if ($retour !== false && $mLibelle !== NULL && $langueId !== NULL) { // On modifie le libellé pour toutes les autres langues qui ont comme langue d'origine notre langue. $mListeLibelles = new MListeLibelles(); $mListeLibelles->AjouterColModification(COL_LIBELLE, $mLibelle->Libelle()); $mListeLibelles->AjouterFiltreEgal(COL_ID, $mLibelle->Id()); $mListeLibelles->AjouterFiltreEgal(COL_LANGUEORIGINELLE, $langueId); $mListeLibelles->AjouterFiltreDifferent(COL_LANGUE, $langueId); $retour = $mListeLibelles->Modifier(); } return $retour; }
<?php require_once 'cst.php'; require_once INC_GSESSION; require_once PATH_METIER . 'mJoueur.php'; require_once INC_GLOCALISATION; $utc = intval(GSession::LirePost('utc')); $fuseauHoraire = GLocalisation::FuseauHoraire($utc); $langueId = GSession::Langue(COL_ID); $communauteId = GSession::Communaute(COL_ID); $login = GContexte::LireVariablePost($nomContexte, 'login'); $motDePasse = GContexte::LireVariablePost($nomContexte, 'motDePasse'); $pseudo = GContexte::LireVariablePost($nomContexte, 'pseudo'); //$nom = GContexte::LireVariablePost($nomContexte, 'prenom'); //$prenom = GContexte::LireVariablePost($nomContexte, 'nom'); $annee = GContexte::LireVariablePost($nomContexte, 'annee'); $mois = GContexte::LireVariablePost($nomContexte, 'mois'); $jour = GContexte::LireVariablePost($nomContexte, 'jour'); if (strlen($mois) == 1) { $mois = '0' . $mois; } if (strlen($jour) == 1) { $jour = '0' . $jour; } if (strlen($annee) == 2) { if (intval($annee) <= 20) { $annee = '20' . $annee; } else { $annee = '19' . $annee; } }
public static function Libelle($id, $memoriser = false, $chargementImmediat = false) { if (array_key_exists($id, self::$listeLibMem)) { return self::$listeLibMem[$id]; } $libelle = ''; if ($memoriser === true || $chargementImmediat === true) { // Si l'id est supérieur à 20000 alors on à un libellé texte, sinon c'est un libellé normal à 255 caractères. if (intval($id) >= 200000) { $mLibelleTexteLibre = new MLibelleTexteLibre($id); $mLibelleTexteLibre->Langue(GSession::Langue(COL_ID)); $mLibelleTexteLibre->Charger(); $libelle = $mLibelleTexteLibre->Libelle(); } else { $mLibelleLibre = new MLibelleLibre($id); $mLibelleLibre->Langue(GSession::Langue(COL_ID)); $mLibelleLibre->Charger(); $libelle = $mLibelleLibre->Libelle(); } if ($memoriser === true) { self::$listeLibMem[$id] = $libelle; } return $libelle; } if (self::$libCharges === false) { // Si l'id est supérieur à 20000 alors on à un libellé texte, sinon c'est un libellé normal à 255 caractères. if (intval($id) >= 200000) { self::$listeLibText->AjouterElementAvecId($id); } else { self::$listeLib->AjouterElementAvecId($id); } return intval($id); } else { // Si l'id est supérieur à 20000 alors on à un libellé texte, sinon c'est un libellé normal à 255 caractères. if (intval($id) >= 200000) { $mLibelleTexteLibre = self::$listeLibText->GetElementById($id); if ($mLibelleTexteLibre !== NULL) { return $mLibelleTexteLibre->Libelle(); } } else { $mLibelleLibre = self::$listeLib->GetElementById($id); if ($mLibelleLibre !== NULL) { return $mLibelleLibre->Libelle(); } } GLog::LeverException(EXG_0061, 'GSession::Libelle, le libellé n\'a pas été chargé pour l\'id [' . $id . '].'); return ''; } }
public function AjouterBaseColSelection($bObjetBase, $col, $as) { if ($col === COL_DESCRIPTION) { $bObjetBase->AjouterJointure(COL_DESCRIPTION, $this->LibelleObj()->GetObjetBase(), COL_ID); $bObjetBase->AjouterColSelect(COL_ID, COL_DESCRIPTION . COL_ID); $bObjetBase->AjouterColSelect(COL_LIBELLE, COL_DESCRIPTION . COL_LIBELLE); $bObjetBase->AjouterColWhere(COL_LANGUE, GSession::Langue(COL_ID)); } else { parent::AjouterBaseColSelection($bObjetBase, $col, $as); } }
public function LangueOriginelle($id = -1, $libelle = NULL, $icone = NULL, $communauteId = NULL) { return $this->ValeurObjetVerifiee(COL_LANGUEORIGINELLE, 'MLangue', GSession::Langue(COL_ID), true, $id, $libelle, $icone, $communauteId); }