diff options
Added skeleton of edit offer and implemented edit and delete buttons in dashboard offers
1 files changed, 6 insertions, 2 deletions
| -rw-r--r-- | src/controllers/DashboardLoginController.php | 8 |
diff --git a/src/controllers/DashboardLoginController.php b/src/controllers/DashboardLoginController.php index 8c1cc67..eb6f323 100644 --- a/src/controllers/DashboardLoginController.php +++ b/src/controllers/DashboardLoginController.php @@ -6,11 +6,15 @@ class DashboardLoginController extends BaseController { private static $message; public static function get() { - include "views/dashboard-login.php"; + // include "views/dashboard-login.php"; + DashboardController::invoke(); } public static function post() { - if ($_POST['username'] == "admin" && $_POST['password'] == "admin") { + if (isset($_POST['_method'])) { + DashboardController::invoke(); + } + else if ($_POST['username'] == "admin" && $_POST['password'] == "admin") { // Probably a bad practice, but couldn't find if it is $_SERVER['REQUEST_METHOD'] = "GET"; // Load normal dashboard |
