Ejemplo n.º 1
0
 /**
  * Fonction statique qui crée l'unique instance de la clASse
  * Appel : $instancePdoGsb = PdoGsb::getPdoGsb();
  * @return l'unique objet de la clASse PdoGsb
  */
 public static function getPdoGsb()
 {
     if (self::$monPdoGsb == null) {
         self::$monPdoGsb = new PdoGsb();
     }
     return self::$monPdoGsb;
 }
Ejemplo n.º 2
0
 /**
  * Fonction statique qui crée l'unique instance de la classe
  * Appel : $instancePdoGsb = PdoGsb::getPdoGsb();
  * @return l'unique objet de la classe PdoGsb
  */
 public static function getPdoGsb()
 {
     if (PdoGsb::$monPdoGsb == null) {
         PdoGsb::$monPdoGsb = new PdoGsb();
     }
     return PdoGsb::$monPdoGsb;
 }
Ejemplo n.º 3
0
 public function validerconnexionAction()
 {
     $session = $this->get('request')->getSession();
     $request = $this->get('request');
     $login = $request->request->get('login');
     $mdp = $request->request->get('mdp');
     $pdo = PdoGsb::getPdoGsb();
     $visiteur = $pdo->getInfosVisiteur($login, $mdp);
     if (!is_array($visiteur)) {
         return $this->render('PgGsbFraisBundle:Home:connexion.html.twig', array('message' => 'Erreur de login ou de mot de passe '));
     } else {
         $session->set('id', $visiteur['id']);
         $session->set('nom', $visiteur['nom']);
         $session->set('prenom', $visiteur['prenom']);
         return $this->render('PgGsbFraisBundle:Home:accueil.html.twig');
     }
 }
<?php

require_once "include/class.pdoamis.inc.php";
$pdo = new PdoGsb();
$action = $_REQUEST['action'];
switch ($action) {
    case 'validerMajMontantCotisation':
        $montant = $_REQUEST['montant'];
        $pdo->majCotisation($montant);
        include "vue/v_form_cotisation.php";
        break;
    case 'afficher':
        $listeAction = $pdo->getAllAction();
        include "vue/v_Tableau_des_actions.php";
        break;
    case 'choixlist':
        $idAction = $_POST['list'];
        $action = $pdo->getAction($idAction);
        $listeAction = $pdo->getAllAction();
        include "vue/v_Tableau_des_actions.php";
        break;
}
Ejemplo n.º 5
0
<?php

require_once "include/class.pdogsb.inc.php";
$pdo1 = PdoGsb::getPdoGsb();
$titi = $_REQUEST['titi'];
$lesLignes = $pdo1->getInfos($titi);
foreach ($lesLignes as $key) {
    $nom = $key['nom'];
    echo "<option>" . $nom . "</option>";
}
Ejemplo n.º 6
0
<?php

include "../modele/modele.php";
$instancePdoGsb = PdoGsb::getPdoGsb();
if (isset($_POST['numVisiteur']) && isset($_POST['Mois'])) {
    $id = $_POST['numVisiteur'];
    $mois = $_POST['Mois'];
    $tabFiche = $instancePdoGsb->getLesFraisForfait($id, $mois);
    $tabFicheHF = $instancePdoGsb->getLesFraisHorsForfait($id, $mois);
    $nbJustificatifsHF = $instancePdoGsb->getNbjustificatifs($id, $mois);
    ?>


    <table class="listeLegere" border="1"> 
            <tbody>
                <tr>
<?php 
    foreach ($tabFiche as $ligneFraisForfait) {
        ?>
        <th><?php 
        echo $ligneFraisForfait['libelle'];
    }
    ?>
 
    </tr>
    <tr>
<?php 
    foreach ($tabFiche as $ligneFraisForfait) {
        ?>
        <td><input type="text" value="<?php 
        echo $ligneFraisForfait['quantite'];
Ejemplo n.º 7
0
<?php

require_once "include/fct.inc.php";
require_once "include/class.pdogsb.inc.php";
include "vues/v_entete.php";
session_start();
$pdo = PdoGsb::getPdoGsb();
$estConnecte = estConnecte();
if (!isset($_REQUEST['uc']) || !$estConnecte) {
    $_REQUEST['uc'] = 'connexion';
}
$uc = $_REQUEST['uc'];
switch ($uc) {
    case 'connexion':
        include "controleurs/c_connexion.php";
        break;
    case 'gererFrais':
        include "controleurs/c_gererFrais.php";
        break;
    case 'etatFrais':
        include "controleurs/c_etatFrais.php";
        break;
}
include "vues/v_pied.php";
?>

 /**
  * @covers PdoGsb::getLesInfosFicheFrais
  */
 public function testGetLesInfosFicheFrais()
 {
     $gsb = \PdoGsb::getPdoGsb();
     $this->assertNull($gsb->getLesInfosFicheFrais('', '')[0]);
     $this->assertEquals('14', count($gsb->getLesInfosFicheFrais('a17', '201001')));
 }
Ejemplo n.º 9
0
<?php

require_once "./include/class.pdoamis.inc.php";
$pdo = new PdoGsb();
$action = $_REQUEST['action'];
switch ($action) {
    case 'afficher':
        $lesAmis = $pdo->pdo_getAllAmis();
        $lesCommisions = $pdo->pdo_getAllCommission();
        include './vue/v_creation_action.php';
        break;
    case 'ajouter_action':
        $ajouter = $pdo->action_cree($_POST['listePers'], $_POST['selectCommissions'], $_POST['NOMACTION'], $_POST['DATEDEBUT'], $_POST['DUREE'], $_POST['FONDS']);
        break;
}
Ejemplo n.º 10
0
<?php

$action = $_REQUEST['action'];
switch ($action) {
    case 'Afficher':
        include 'include/class.pdoamis.inc.php';
        $pdo = new PdoGsb();
        $chef = $pdo->getChefAction(1);
        $listeParticipant = $pdo->getParticipantAction(1);
        include "vue/v_InscriptionAmisAction.php";
        break;
    case "Ajouter":
        include 'include/class.pdoamis.inc.php';
        $pdo = new PdoGsb();
        if (isset($_POST['ajouter'])) {
            $participation = $pdo->getParticipation($_POST['numAction'], $_POST['listePers']);
            if ($participation) {
                echo utf8_decode('Cet ami participe déjà à l"action');
            } else {
                $pdo->insertParticipation($_POST['numAction'], $_POST['listePers']);
            }
        }
        // changer les '1' par $_POST['quelque chose'] voir avec nabil
        $chef = $pdo->getChefAction(1);
        $listeParticipant = $pdo->getParticipantAction(1);
        include "vue/v_InscriptionAmisAction.php";
        break;
}
Ejemplo n.º 11
0
 public function _destruct()
 {
     PdoGsb::$monPdo = null;
 }
Ejemplo n.º 12
0
<?php

require_once "include/class.pdoamis.inc.php";
$pdo = new PdoGsb();
$action = $_REQUEST['action'];
switch ($action) {
    case 'saisie':
        include "vue/v_form_cotisation.php";
        break;
    case 'MAJ':
        $montant = $_POST['montant'];
        echo $montant;
        $pdo->majCotisation($montant);
        break;
}
Ejemplo n.º 13
0
<?php

require_once "include/class.pdoamis.inc.php";
//
//require("./vue/v_supAction");
$pdo = new PdoGsb();
$action = $_REQUEST['action'];
switch ($action) {
    case 'afficherListeAction':
        require "./vue/v_liste_action.php";
        break;
    case 'suppressionAction':
        break;
    case 'suppr':
        $id = $_GET['id'];
        $pdo->pdo_sup_action($id);
        $listeAction = $pdo->pdo_get_allAction();
        include "vue/v_supAction.php";
        break;
    case 'afficher':
        $listeAction = $pdo->pdo_get_allAction();
        include "vue/v_supAction.php";
}
Ejemplo n.º 14
0
<?php

$pdo = new PdoGsb();
$action = $_REQUEST['action'];
switch ($action) {
    case 'listeAmis':
        $lesAmis = $pdo->pdo_getListeAmis();
        include "vue/v_listeAmis.php";
        break;
    case 'informations':
        $num = $_GET['NUMAMIS'];
        $nom = $_GET['NOMAMIS'];
        $prenom = $_GET['PRENOMAMIS'];
        $tel_fix = $_GET['TELEPHONEFIXEAMIS'];
        $tel = $_GET['TELEPHONEPORTAMIS'];
        $email = $_GET['EMAILAMIS'];
        $rue = $_GET['NUMRUEAMIS'];
        $adresse = $_GET['ADRESSEAMIS'];
        $ville = $_GET['VILLEAMIS'];
        $cp = $_GET['CPAMIS'];
        $date_entree_club = $_GET['DATEENTREECLUBAMIS'];
        include "vue/v_modification_amis.php";
        break;
    case 'suppression':
        $num = $_GET['NUMAMIS'];
        $Amis = $pdo->pdo_suppr_amis($num);
        //echo 'suppresion effectué';
        $lesAmis = $pdo->pdo_getListeAmis();
        include "vue/v_listeAmis.php";
        break;
    case 'modification':
Ejemplo n.º 15
0
function loginExists($Login)
{
    $pdo = PdoGsb::getPdoGsb();
    $logarray = $pdo->getLogin($Login);
    if ($logarray != Null) {
        return true;
    } else {
        return false;
    }
}