From 68808a388a61c7a778494739fe0150651a09ea66 Mon Sep 17 00:00:00 2001
From: Syndamia
Date: Sat, 3 Apr 2021 09:58:18 +0300
Subject: Implemented a simple login page for (admin) dashboard and skeleton of
dashboard controller and view
---
src/controllers/DashboardLoginController.php | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 src/controllers/DashboardLoginController.php
(limited to 'src/controllers/DashboardLoginController.php')
diff --git a/src/controllers/DashboardLoginController.php b/src/controllers/DashboardLoginController.php
new file mode 100644
index 0000000..8c1cc67
--- /dev/null
+++ b/src/controllers/DashboardLoginController.php
@@ -0,0 +1,24 @@
+
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/DashboardController.php | 14 ++++++++++++++
src/controllers/DashboardLoginController.php | 8 ++++++--
src/controllers/EditOfferController.php | 5 +++++
src/views/dashboard.php | 17 ++++++++++++++++-
src/views/edit-offer.php | 1 +
5 files changed, 42 insertions(+), 3 deletions(-)
create mode 100644 src/controllers/EditOfferController.php
create mode 100644 src/views/edit-offer.php
(limited to 'src/controllers/DashboardLoginController.php')
diff --git a/src/controllers/DashboardController.php b/src/controllers/DashboardController.php
index 84beb14..7c01efa 100644
--- a/src/controllers/DashboardController.php
+++ b/src/controllers/DashboardController.php
@@ -1,8 +1,22 @@
Dashboard works!
+id} {$job->title}
+
+
+
";
+ }
+?>
diff --git a/src/views/edit-offer.php b/src/views/edit-offer.php
new file mode 100644
index 0000000..957fc3d
--- /dev/null
+++ b/src/views/edit-offer.php
@@ -0,0 +1 @@
+Works!
--
cgit v1.3.1-23-gd82d
From 6068d95e6d7159f67df7f4a427795ee15eafde98 Mon Sep 17 00:00:00 2001
From: Syndamia
Date: Sat, 3 Apr 2021 11:02:31 +0300
Subject: Updated dashboard login controller to have a nicer way to redirect to
dashboard controller
---
src/controllers/DashboardLoginController.php | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
(limited to 'src/controllers/DashboardLoginController.php')
diff --git a/src/controllers/DashboardLoginController.php b/src/controllers/DashboardLoginController.php
index eb6f323..775b96f 100644
--- a/src/controllers/DashboardLoginController.php
+++ b/src/controllers/DashboardLoginController.php
@@ -15,10 +15,8 @@ class DashboardLoginController extends BaseController {
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
- DashboardController::invoke();
+ DashboardController::get();
}
else {
self::$message = "Bad credentials!";
--
cgit v1.3.1-23-gd82d
From 9362d6fdfd566f3cc611a02437c6dbdce4f0504b Mon Sep 17 00:00:00 2001
From: Syndamia
Date: Sat, 3 Apr 2021 11:07:46 +0300
Subject: Added a link to dashboard in edit offer view and enabled login screen
in dashboard
---
src/controllers/DashboardLoginController.php | 3 +--
src/views/edit-offer.php | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/controllers/DashboardLoginController.php')
diff --git a/src/controllers/DashboardLoginController.php b/src/controllers/DashboardLoginController.php
index 775b96f..fe2009b 100644
--- a/src/controllers/DashboardLoginController.php
+++ b/src/controllers/DashboardLoginController.php
@@ -6,8 +6,7 @@ class DashboardLoginController extends BaseController {
private static $message;
public static function get() {
- // include "views/dashboard-login.php";
- DashboardController::invoke();
+ include "views/dashboard-login.php";
}
public static function post() {
diff --git a/src/views/edit-offer.php b/src/views/edit-offer.php
index b9fb464..a6d699e 100644
--- a/src/views/edit-offer.php
+++ b/src/views/edit-offer.php
@@ -22,3 +22,4 @@
+< Back to Dashboard
--
cgit v1.3.1-23-gd82d