From 1856de8c22af1a762961547f042891d5b6f9455c Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 3 Apr 2021 10:36:27 +0300 Subject: Added skeleton of edit offer and implemented edit and delete buttons in dashboard offers --- src/controllers/DashboardLoginController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/controllers/DashboardLoginController.php') 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 -- cgit v1.3.1-23-gd82d