Test
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Noé GARNIER 2 years ago
parent e21197a0d0
commit d4b3947a20

@ -1,7 +1,7 @@
<?php <?php
class FrontController class FrontController
{ {
function __construct($con) function __construct()
{ {
global $rep, $vues, $error; global $rep, $vues, $error;
session_start(); session_start();
@ -9,7 +9,7 @@ class FrontController
// $action=$_REQUEST['action']; // $action=$_REQUEST['action'];
echo "frontController"; echo "frontController";
try { try {
new UserController($con); new UserController();
} catch (Exception $e) { } catch (Exception $e) {
$error = $e->getMessage(); $error = $e->getMessage();
require ($rep . $vues['erreur']); require ($rep . $vues['erreur']);

@ -4,11 +4,11 @@ class UserController
{ {
private Connection $con; private Connection $con;
function __construct($con) { function __construct() {
try{ try{
echo "UserController"; echo "UserController";
global $dsn, $rep, $vues, $error; global $dsn, $rep, $vues, $error;
$this->con=$con; $this->con=new Connection($dsn);
echo "USconection"; echo "USconection";
$action=$_REQUEST['action']; $action=$_REQUEST['action'];
switch($action) { switch($action) {

@ -72,7 +72,6 @@ class UtilisateurGateway
} }
public function getEstAdminByEmail(string $email) : bool{ public function getEstAdminByEmail(string $email) : bool{
global $error;
$query = "SELECT estAdmin FROM Utilisateur WHERE email=:email"; $query = "SELECT estAdmin FROM Utilisateur WHERE email=:email";
$this->con->executeQuery($query, array( $this->con->executeQuery($query, array(
':email' => array($email,PDO::PARAM_STR) ':email' => array($email,PDO::PARAM_STR)

@ -18,9 +18,9 @@ Autoload::charger();
// } // }
echo "test"; echo "test";
$con = new Connection($dsn); $db = new Connection($dsn);
echo "test2"; echo "test2";
$control = new FrontController($con); $control = new FrontController();
//session_regenerate_id(true); //session_regenerate_id(true);
// session_unset(); // session_unset();

Loading…
Cancel
Save