diff --git a/WEB/Config/Config.php b/WEB/Config/Config.php
index f5dbc5d7..e2ae2e14 100644
--- a/WEB/Config/Config.php
+++ b/WEB/Config/Config.php
@@ -18,6 +18,7 @@ $vues['signUp'] = 'View/src/pages/LogSign/SignUp.php';
$vues['test'] = 'View/src/pages/FirstTests/FirstTest1.html';
$vues['next'] = 'View/src/pages/FirstTests/FirstTest';
$vues['admin'] = 'View/src/pages/Admin/Admin.php';
+$vues['enigmeMultiManager'] = 'View/src/pages/Admin/EnigmeMultiManager.php';
// Enigme
$vues['enigme'] = 'View/src/pages/Enigme/Palindrome.html';
$vues['enigmePage'] = 'View/src/pages/Enigme/EnigmePage.php';
diff --git a/WEB/Controller/AdminController.php b/WEB/Controller/AdminController.php
index 8e200053..38464c22 100644
--- a/WEB/Controller/AdminController.php
+++ b/WEB/Controller/AdminController.php
@@ -60,6 +60,9 @@ class AdminController extends UserController
case "addNewEnigme":
$this->addNewEnigme();
break;
+ case "goToEnigmeMultiManager":
+ $this->goToEnigmeMultiManager();
+ break;
default:
$error = "Action non valide";
require($rep . $vues['erreur']);
@@ -76,8 +79,24 @@ class AdminController extends UserController
function goToAdmin()
{
- global $rep, $vues;
- require($rep . $vues['admin']);
+ try{
+ global $rep, $vues;
+ require($rep . $vues['admin']);
+ } catch (Exception $e) {
+ $error = $e->getMessage();
+ require($rep . $vues['erreur']);
+ }
+ }
+
+ public function goToEnigmeMultiManager()
+ {
+ try {
+ global $rep, $vues;
+ require($rep . $vues['enigmeMultiManager']);
+ } catch (Exception $e) {
+ $error = $e->getMessage();
+ require($rep . $vues['erreur']);
+ }
}
function addNewEnigme()
diff --git a/WEB/Controller/FrontController.php b/WEB/Controller/FrontController.php
index daebbcb8..0e75c25f 100644
--- a/WEB/Controller/FrontController.php
+++ b/WEB/Controller/FrontController.php
@@ -14,6 +14,8 @@ class FrontController
$role = "visitor";
}
// Check if action exists
+ //echo "FrontConroller : action = " . $_REQUEST['action'] . "
";
+ //echo "role = " . $role . "
";
$action = $nettoyage->clean($_REQUEST['action']);
if ($role == "user") {
if ($action == NULL) {
@@ -23,6 +25,7 @@ class FrontController
$error = "Action non valide " . $action;
require($rep . $view['erreur']);
} else {
+ //echo "action user valide";
$_REQUEST['action'] = $action;
new UserController();
}
@@ -35,10 +38,12 @@ class FrontController
$error = "Action non valide " . $action;
require($rep . $view['erreur']);
} else {
+ //echo "action admin valide";
$_REQUEST['action'] = $action;
new AdminController();
}
} else {
+ //echo "action visiteur";
$_REQUEST['action'] = $action;
new VisitorController();
}