|
|
|
@ -4,7 +4,7 @@ class FrontController
|
|
|
|
|
function __construct()
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
global $error, $view, $rep;
|
|
|
|
|
global $error, $vues, $rep;
|
|
|
|
|
$nettoyage = new Nettoyage();
|
|
|
|
|
session_start();
|
|
|
|
|
// Check role permissions
|
|
|
|
@ -23,9 +23,7 @@ class FrontController
|
|
|
|
|
new UserController();
|
|
|
|
|
} else if (method_exists('UserController', $action) == false) {
|
|
|
|
|
$error = "Action non valide " . $action;
|
|
|
|
|
var_dump($action);
|
|
|
|
|
var_dump($view);
|
|
|
|
|
require($rep . $view['erreur']);
|
|
|
|
|
require($rep . $vues['erreur']);
|
|
|
|
|
} else {
|
|
|
|
|
//echo "action user valide";
|
|
|
|
|
$_REQUEST['action'] = $action;
|
|
|
|
@ -38,7 +36,7 @@ class FrontController
|
|
|
|
|
new AdminController();
|
|
|
|
|
} else if (method_exists('AdminController', $action) == false) {
|
|
|
|
|
$error = "Action non valide" . $action;
|
|
|
|
|
require($rep . $view['erreur']);
|
|
|
|
|
require($rep . $vues['erreur']);
|
|
|
|
|
} else {
|
|
|
|
|
//echo "action admin valide";
|
|
|
|
|
$_REQUEST['action'] = $action;
|
|
|
|
@ -51,7 +49,7 @@ class FrontController
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception $e) {
|
|
|
|
|
$error = $e->getMessage();
|
|
|
|
|
require($rep . $view['erreur']);
|
|
|
|
|
require($rep . $vues['erreur']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|