|
|
|
@ -56,6 +56,7 @@ class FrontControleur
|
|
|
|
|
|
|
|
|
|
$id = array();
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
$twig->render("accueil.html",[]);
|
|
|
|
|
|
|
|
|
|
if (!$match) {
|
|
|
|
@ -76,9 +77,8 @@ class FrontControleur
|
|
|
|
|
if ($controller == "MembreControleur") {
|
|
|
|
|
if ($_SESSION["role"] != "Membre" && $_SESSION["role"] != "Admin") {
|
|
|
|
|
|
|
|
|
|
echo $twig->render("connection.html",['msg' => 'Vous devez vous connecter pour effectuer cette action']);
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
echo $twig->render("connection.html", ['msg' => 'Vous devez vous connecter pour effectuer cette action']);
|
|
|
|
|
} else {
|
|
|
|
|
$controller = "MembreControleur";
|
|
|
|
|
$controller = $namespace . $controller;
|
|
|
|
|
//echo "controller : ".$controller;
|
|
|
|
@ -94,16 +94,14 @@ class FrontControleur
|
|
|
|
|
global $twig;
|
|
|
|
|
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
} else {
|
|
|
|
|
$controller = "AdminControleur";
|
|
|
|
|
$controller = $namespace . $controller;
|
|
|
|
|
$controller = new $controller();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($controller == "UtilisateurControleur")
|
|
|
|
|
{
|
|
|
|
|
if ($controller == "UtilisateurControleur") {
|
|
|
|
|
$controller = $namespace . $controller;
|
|
|
|
|
$controller = new $controller();
|
|
|
|
|
}
|
|
|
|
@ -124,5 +122,14 @@ class FrontControleur
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch(Error $e)
|
|
|
|
|
{
|
|
|
|
|
$dVueErreur = ['Erreur : Action inconnue'];
|
|
|
|
|
|
|
|
|
|
echo $twig->render('erreur.html', ['dVueErreur' => $dVueErreur]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|