diff --git a/Controllers/ManageUserController.php b/Controllers/ManageUserController.php index b0d3512..26f7947 100644 --- a/Controllers/ManageUserController.php +++ b/Controllers/ManageUserController.php @@ -13,13 +13,23 @@ final class ManageUserController } } + private function getOrDie($DICT, $key) + { + if (isset($DICT[$key])) return $DICT[$key]; + else die("Key $key not present"); + } + public function defaultAction(Array $A_urlParams = null, Array $A_postParams = null) { self::admin_or_die(); + + return View::show("manageUser/default"); } public function searchAction(Array $A_urlParams = null, Array $A_postParams = null) { - + self::admin_or_die(); + $S_search = self::getOrDie($_POST, "search"); + echo "Terme de recherche choisi: $S_search"; } } diff --git a/Views/manageUser/default.php b/Views/manageUser/default.php new file mode 100644 index 0000000..b46b186 --- /dev/null +++ b/Views/manageUser/default.php @@ -0,0 +1,7 @@ +
Default view
+ +Please search :
+ diff --git a/Views/manageruser/default.php b/Views/manageruser/default.php deleted file mode 100644 index c7fa839..0000000 --- a/Views/manageruser/default.php +++ /dev/null @@ -1,4 +0,0 @@ -Default view
- -Please search :
- \ No newline at end of file