Ejemplo n.º 1
0
     $mListeJeux->AjouterElement($mJeu);
 }
 GReferentiel::AjouterReferentiel(COL_JEU, $mListeJeux, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true);
 $mListeServeurs = new MListeServeurs();
 $mListeServeurs->AjouterColSelection(COL_ID);
 $mListeServeurs->AjouterColSelection(COL_LIBELLE);
 $mListeServeurs->AjouterColOrdre(COL_LIBELLE);
 $mListeServeurs->AjouterFiltreEgal(COL_JEU, $jeuId);
 $mListeServeurs->AjouterFiltreDifferent(COL_SUPPRIME, true);
 GReferentiel::AjouterReferentiel(COL_SERVEUR, $mListeServeurs, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), $dejaCharge);
 $mListeTypesGroupes = new MListeTypesGroupes();
 $mListeTypesGroupes->AjouterColSelection(COL_ID);
 $mListeTypesGroupes->AjouterColSelection(COL_LIBELLE);
 $mListeTypesGroupes->AjouterColOrdre(COL_LIBELLE);
 $mListeTypesGroupes->AjouterFiltreEgal(COL_JEU, $jeuId);
 GReferentiel::AjouterReferentiel(COL_TYPEGROUPE, $mListeTypesGroupes, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), $dejaCharge);
 $org = new SOrganiseur(2, 1, true);
 $elem = new SElement($prefixIdClass . CLASSTEXTE_INFO);
 $elem->AjouterClasse(CLASSTEXTE_INFO);
 $elem->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_GPE_NOUVGPEDESC, false, true)));
 $org->AttacherCellule(1, 1, $elem);
 // Construction du formulaire.
 $form = new SForm($prefixIdClass, 2, 1);
 $form->SetCadreInputs(1, 1, 5, 6);
 $form->FusionnerCelluleCadre(1, 1, 1, 1);
 $form->FusionnerCelluleCadre(1, 3, 0, 3);
 $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);
            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;
    }
}
Ejemplo n.º 3
0
<?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));
}
Ejemplo n.º 4
0
<?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));
}
        if ($valeur != NULL) {
            $mListe->Charger(20);
        }
        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_GROUPE:
        $valeur = GSession::LirePost('valeur');
        if ($valeur !== GSession::Groupe(COL_NOM)) {
            $jeuId = GSession::Jeu(COL_ID);
            $mListe = new MListeGroupes();
            $mListe->AjouterColSelection(COL_ID);
            $mListe->AjouterColSelection(COL_NOM);
            $mListe->AjouterColSelection(COL_DESCRIPTION);
            $mListe->AjouterColSelection(COL_JEU);
            $mListe->AjouterFiltreLike(COL_NOM, '%' . $valeur . '%');
            if ($jeuId != NULL) {
                $mListe->AjouterFiltreEgal(COL_JEU, $jeuId);
            }
            $numJointure = $mListe->AjouterJointure(COL_JEU, COL_ID);
            $numJointure = $mListe->AjouterJointure(COL_LIBELLE, COL_ID, $numJointure);
            $mListe->AjouterColSelectionPourJointure($numJointure, COL_LIBELLE);
            $mListe->AjouterColOrdre(COL_NOM);
            if ($valeur != NULL) {
                $mListe->Charger(20);
            }
            GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_ID, COL_NOM, COL_DESCRIPTION, COL_JEU), true);
            GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_ID, COL_NOM, COL_DESCRIPTION, NULL, COL_JEU, array(COL_JEU, COL_LIBELLE, COL_LIBELLE));
        }
        break;
}
Ejemplo n.º 6
0
require_once INC_SSEPARATEUR;
require_once INC_SPALETTE;
require_once PATH_COMPOSANTS . 'cListeGroupes.php';
$groupe = GSession::Groupe(COL_ID);
if ($groupe !== NULL && GDroit::ADroitPopErreur(FONC_PRS_CREERMODIFIER) === true) {
    $prefixIdClass = PIC_PRES;
    $mListePresentationsActives = new MListePresentations();
    $mListePresentationsActives->AjouterColSelection(COL_ID);
    $mListePresentationsActives->AjouterColSelection(COL_NOM);
    $mListePresentationsActives->AjouterFiltreEgal(COL_CREATEURGROUPE, GSession::Groupe(COL_ID));
    GReferentiel::AjouterReferentiel(COL_PRESENTATION . 'active', $mListePresentationsActives, array(COL_ID, COL_NOM));
    $mListePresentationsModif = new MListePresentations();
    $mListePresentationsModif->AjouterColSelection(COL_ID);
    $mListePresentationsModif->AjouterColSelection(COL_NOM);
    $mListePresentationsModif->AjouterFiltreEgal(COL_CREATEURGROUPE, GSession::Groupe(COL_ID));
    GReferentiel::AjouterReferentiel(COL_PRESENTATION . 'modif', $mListePresentationsModif, array(COL_ID, COL_NOM));
    if ($dejaCharge === false) {
        $org = new SOrganiseur(8, 1, true);
        $elemInfo = new SElement($prefixIdClass . CLASSTEXTE_INFO);
        $elemInfo->AjouterClasse(CLASSTEXTE_INFO);
        $elemInfo->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_PRS_DESCRIPTION, false, true)));
        $elemInfoPresActive = new SElement($prefixIdClass . CLASSTEXTE_INFO);
        $elemInfoPresActive->AjouterClasse(CLASSTEXTE_INFO);
        $elemInfoPresActive->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_PRS_PRESACTIVE, false, true)));
        $elemInfoPresModif = new SElement($prefixIdClass . CLASSTEXTE_INFO);
        $elemInfoPresModif->AjouterClasse(CLASSTEXTE_INFO);
        $elemInfoPresModif->SetText(GTexte::FormaterTexteSimple(GSession::Libelle(LIBTEXT_PRS_PRESMODIF, false, true)));
        //$rechargeFonc = AJAXFONC_CHARGERREFERENTIELCONTEXTE;
        //$rechargeParam = 'contexte='.$nomContexte;
        $changeFonc = AJAXFONC_MODIFIERDANSCONTEXTE;
        $changeParam = 'cf=' . GSession::NumCheckFormulaire() . '&contexte=' . $nomContexte;
Ejemplo n.º 7
0
        $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);
    }
    $selectGroupe->SetCadreBoutonsCache(1, 2);
    GContexte::AjouterContenu(CADRE_INFO_GROUPE, $selectGroupe);
} else {
    if (GSession::Groupe('change') == 1) {
        GReferentiel::AjouterReferentiel(COL_JEU, $mListeJeux, array(COL_ID, array(COL_LIBELLE, COL_LIBELLE)), true);
        GReferentiel::GetDifferentielReferentielForSelect(COL_JEU, COL_ID, array(COL_LIBELLE, COL_LIBELLE), '', $jeuId);
        $typeGroupe = GSession::Groupe(COL_TYPEGROUPE);
        if ($typeGroupe == TYPEGROUPE_COMMUNAUTE) {
            GReponse::AjouterElementSelect(COL_GROUPE);
            GReponse::AjouterElementSelectSelection(-1);
        } else {
            if ($typeGroupe == TYPEGROUPE_JEU) {
                GReponse::AjouterElementSelect(COL_GROUPE);
                GReponse::AjouterElementSelectSelection(-2);
            } else {
                GReferentiel::AjouterReferentiel(COL_GROUPE, $mListeGroupes, array(COL_ID, COL_NOM, COL_DESCRIPTION, COL_JEU), true);
                GReferentiel::GetDifferentielReferentielForSelect(COL_GROUPE, COL_ID, COL_NOM, COL_DESCRIPTION, $groupeId, COL_JEU, array(COL_JEU, COL_LIBELLE, COL_LIBELLE));
            }
        }
        GSession::Groupe('change', NULL, true);
    }
}
Ejemplo n.º 8
0
 protected function AjouterReferentielElement($element, $nom, MListeObjetsMetiers $mListe, $sauveCols = NULL, $dejaCharge = false)
 {
     $nomRef = $this->NomFormate($nom);
     $id = $element[LISTE_ELEMENT_ID];
     if (!array_key_exists($id, $this->referentielsElements)) {
         $this->referentielsElements[$id] = array();
     }
     $this->referentielsElements[$id][$nomRef] = true;
     GReferentiel::AjouterReferentiel($this->NomRefFormate($nomRef) . '_' . $id, $mListe, $sauveCols, $dejaCharge);
 }
<?php

require_once 'cst.php';
require_once PATH_METIER . 'mListeJoueurs.php';
if (GDroit::ADroitPopErreur(DROIT_ADMIN) === true) {
    switch (GReferentiel::NomReferentielGeneral($nomReferentiel)) {
        case 'GradesGlobauxAdmin' . COL_ICONE:
            GReferentiel::AjouterReferentielFichiers($nomReferentiel, PATH_IMAGES . 'Grade/', REF_FICHIERSEXTENSIONS_IMAGES);
            GReferentiel::GetDifferentielReferentielFichiersForSelect($nomReferentiel);
            break;
        case 'GradesGlobauxAdmin' . COL_JOUEUR . COL_PSEUDO:
            $valeur = GSession::LirePost('valeur');
            $mListe = new MListeJoueurs();
            $mListe->AjouterColSelection(COL_PSEUDO);
            $mListe->AjouterColOrdre(COL_PSEUDO);
            $mListe->AjouterFiltreLike(COL_PSEUDO, '%' . $valeur . '%');
            if ($valeur != NULL) {
                $mListe->Charger(20);
            }
            GReferentiel::AjouterReferentiel($nomReferentiel, $mListe, array(COL_PSEUDO), true);
            GReferentiel::GetDifferentielReferentielForSelect($nomReferentiel, COL_PSEUDO, COL_PSEUDO);
            break;
    }
}