<?php 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 {
} } } else { $auto = GSession::LirePost('auto'); // Cas du rechargement automatique. if ($auto !== NULL && $auto !== '') { GContexte::ChargerContextes(true); } else { $contexte = GSession::LirePost('contexte'); // Cas du rechargement de tous les contextes. if ($contexte === NULL || $contexte === '') { GContexte::ChargerContextes(); } else { $page = GContexte::LireVariablePost($contexte, 'page'); $etage = GContexte::LireVariablePost($contexte, 'etage'); $contenu = GContexte::LireVariablePost($contexte, 'contenu'); // Cas du changement de page pour une liste. if ($contexte !== NULL && $page !== NULL && $page !== '') { SListe::SetChangementPage($page); } else { if ($contexte !== NULL && $etage !== NULL && $etage !== '') { SListe::SetChargementEtage($etage); } else { if ($contexte !== NULL && $contenu !== NULL && $contenu !== '') { SListe::SetChargementContenu($contenu); } } } GContexte::ChargerContexte($contexte); } }
<?php require_once 'cst.php'; require_once INC_GSESSION; require_once INC_SCADRE; require_once INC_SCLASSEUR; if (GDroit::ADroitPopErreur(DROIT_ADMIN) === true) { $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); } }
GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); break; case 'Groupes' . COL_SERVEUR . ',' . COL_ID: $jeu = GContexte::LireVariablePost($nomContexte, COL_JEU . ',' . COL_ID); $mListe = new MListeServeurs(); if ($jeu !== NULL) { $mListe->AjouterColSelection(COL_ID); $mListe->AjouterColSelection(COL_LIBELLE); $mListe->AjouterColOrdre(COL_LIBELLE); $mListe->AjouterFiltreEgal(COL_JEU, $jeu); $mListe->Charger(); } GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); break; case 'Groupes' . COL_TYPEGROUPE . ',' . COL_ID: $jeu = GContexte::LireVariablePost($nomContexte, COL_JEU . ',' . COL_ID); $mListe = new MListeTypesGroupes(); if ($jeu !== NULL) { $mListe->AjouterColSelection(COL_ID); $mListe->AjouterColSelection(COL_LIBELLE); $mListe->AjouterColOrdre(COL_LIBELLE); $mListe->AjouterFiltreEgal(COL_JEU, $jeu); $mListe->Charger(); } GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); break; } }
GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); break; case COL_SERVEUR: $jeu = GContexte::LireVariablePost($nomContexte, COL_JEU); $mListe = new MListeServeurs(); if ($jeu !== NULL) { $mListe->AjouterColSelection(COL_ID); $mListe->AjouterColSelection(COL_LIBELLE); $mListe->AjouterColOrdre(COL_LIBELLE); $mListe->AjouterFiltreEgal(COL_JEU, $jeu); $mListe->Charger(); } GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); break; case COL_TYPEGROUPE: $jeu = GContexte::LireVariablePost($nomContexte, COL_JEU); $mListe = new MListeTypesGroupes(); if ($jeu !== NULL) { $mListe->AjouterColSelection(COL_ID); $mListe->AjouterColSelection(COL_LIBELLE); $mListe->AjouterColOrdre(COL_LIBELLE); $mListe->AjouterFiltreEgal(COL_JEU, $jeu); $mListe->Charger(); } GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true); GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, array(COL_LIBELLE, COL_LIBELLE)); break; } }
<?php require_once 'cst.php'; require_once PATH_METIER . 'mMenu.php'; require_once PATH_METIER . 'mContexte.php'; require_once PATH_METIER . 'mMenuContexte.php'; // Chargement spécifique lors d'un get. if (GSession::IsRequeteGet() === true) { // TO DO.. } else { $menuId = GContexte::LireVariablePost($nomContexte, COL_ID, false); if ($menuId === NULL) { $menuId = GContexte::LireVariableSession($nomContexte, COL_ID, false); } if ($menuId !== NULL) { $mMenu = new MMenu($menuId); $mListeMenusContextes = $mMenu->ListeMenusContextes(); $mListeMenusContextes->Charger(); $listeMenusContextes = $mListeMenusContextes->GetListe(); if (count($listeMenusContextes) === 0) { GContexte::SetContexte(CONT_VIDE); } else { GContexte::ResetContextes(); foreach ($listeMenusContextes as $mMenuContexte) { $nom = $mMenuContexte->Contexte()->Nom(); $rechargement = true; switch ($nom) { case CONT_ADMINISTRATION: $rechargement = false; break; }
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; } } $dateNaissance = NULL; if (strlen($annee) === 4 && strlen($mois) === 2 && strlen($jour) === 2) {
<?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;