Пример #1
0
 public static function getPdogsb()
 {
     if (Pdogsb::$monPdogsb == null) {
         Pdogsb::$monPdogsb = new Pdogsb();
     }
     return Pdogsb::$monPdogsb;
 }
Пример #2
0
 public static function testerLaConnx($login, $mdp)
 {
     $login = Pdogsb::$monPdo->quote($login);
     $mdp = Pdogsb::$monPdo->quote($mdp);
     $req = "SELECT Rid,pwd,concat_ws ('',prenom,nom) as login FROM RESPONSABLE where concat_ws ('',prenom,nom) = " . $login . " and pwd =" . $mdp;
     $res = Pdogsb::$monPdo->query($req);
     $laLigne = $res->fetch();
     if ($laLigne == false) {
         return null;
     }
     if (count($laLigne == 1)) {
         $rid = $laLigne['Rid'];
         $tamere = Pdogsb::getunResponsables($rid);
         $_SESSION['utilisateur'] = $tamere['prenom'] . ' ' . $tamere['nom'];
         $_SESSION['admin'] = $tamere['admin'];
         $_SESSION['idpole'] = $tamere['idpole'];
         $_SESSION['pole'] = $tamere['libelle'];
         return 1;
     } else {
         return null;
     }
 }
Пример #3
0
<?php 
session_start();
//require_once("util/fonctions.inc.php");
//echo CSS file :
echo "<link rel='stylesheet' type='text/css' href='util/style.css' media='all'/> ";
require_once "util/class-pdogsb.php";
include "vues/v_base.php";
if (!isset($_REQUEST['uc'])) {
    $uc = 'accueil';
} else {
    $uc = $_REQUEST['uc'];
}
$pdo = Pdogsb::getPdogsb();
?>
<body>
<?php 
switch ($uc) {
    case 'accueil':
        include "vues/v_accueil.php";
        break;
    case 'voirProduits':
        include "controleur/c_voirProduits.php";
        break;
    case 'seconnecter':
        include "controleur/c_general.php";
        break;
}
//include("vues/v_pied.php") ;
?>