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']);