/** * 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; }
/** * 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; }
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; }
<?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>"; }
<?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'];
<?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'))); }
<?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; }
<?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; }
public function _destruct() { PdoGsb::$monPdo = null; }
<?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; }
<?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"; }
<?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':
function loginExists($Login) { $pdo = PdoGsb::getPdoGsb(); $logarray = $pdo->getLogin($Login); if ($logarray != Null) { return true; } else { return false; } }