From 3c2d4d5932250205c771f58109ab9038b917ba45 Mon Sep 17 00:00:00 2001 From: Noe GARNIER Date: Mon, 28 Nov 2022 10:19:03 +0100 Subject: [PATCH] =?UTF-8?q?Test=20de=20d=C3=A9ploiment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WEB/Controller/FrontController.php | 36 ++++++++---------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/WEB/Controller/FrontController.php b/WEB/Controller/FrontController.php index c4baf3d4..8870beaf 100644 --- a/WEB/Controller/FrontController.php +++ b/WEB/Controller/FrontController.php @@ -1,33 +1,15 @@ getMessage(); - // require ($rep . $vues['erreur']); - // } - // } - private Connection $con; - function __construct() { - try{ - global $dsn, $rep, $vues, $error; - echo "FrontController"; - $this->con=new Connection ($dsn); - echo "FCconection"; - $action=$_REQUEST['action']; - switch($action) { - case NULL: - require ($rep.$vues['main']); - break; - } + function __construct() + { + global $rep, $vues, $error; + session_start(); + // $role=$_SESSION['role']; + // $action=$_REQUEST['action']; + echo "frontController"; + try { + new UserController(); } catch (Exception $e) { $error = $e->getMessage(); require ($rep . $vues['erreur']);