From 0aa067b783ec3ba374380b82612eb876634c78f8 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 1 Apr 2021 13:27:08 +0300 Subject: Made index.php a router and added the basis of landing view and controller --- src/views/landing.php | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/views/landing.php (limited to 'src/views/landing.php') diff --git a/src/views/landing.php b/src/views/landing.php new file mode 100644 index 0000000..06e32a5 --- /dev/null +++ b/src/views/landing.php @@ -0,0 +1,7 @@ +

Landing page!

+ +id} {$job->title}
"; + } +?> -- cgit v1.3.1-26-gb76a From 56a5223e14f798e2c875c4347faecc4e2e9730fc Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 3 Apr 2021 09:31:25 +0300 Subject: Implemented job offer form creating a new job offer in the database; Fixed insertIntoDB method of JobOffer; Added a link to JobOffer page in landing page --- src/controllers/CreateOfferController.php | 15 ++++++++++----- src/models/JobOffer.php | 2 +- src/views/create-offer.php | 6 +++++- src/views/landing.php | 2 ++ 4 files changed, 18 insertions(+), 7 deletions(-) (limited to 'src/views/landing.php') diff --git a/src/controllers/CreateOfferController.php b/src/controllers/CreateOfferController.php index d510978..a223463 100644 --- a/src/controllers/CreateOfferController.php +++ b/src/controllers/CreateOfferController.php @@ -1,16 +1,21 @@ insertValue(self::TABLE_NAME, $jb->title, $jb->description, $jb->company, $jb->salary); + self::$DB->insertValue(self::TABLE_NAME, $jb->title, $jb->description, $jb->companyId, $jb->salary); } /* Read */ diff --git a/src/views/create-offer.php b/src/views/create-offer.php index 2bdeeaf..9162c90 100644 --- a/src/views/create-offer.php +++ b/src/views/create-offer.php @@ -9,7 +9,11 @@

diff --git a/src/views/landing.php b/src/views/landing.php index 06e32a5..e6477ee 100644 --- a/src/views/landing.php +++ b/src/views/landing.php @@ -5,3 +5,5 @@ echo "{$job->id} {$job->title}
"; } ?> + +Create a new Job Offer -- cgit v1.3.1-26-gb76a From 3d40b19a379b7cd013283e623f773b760b281bdd Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 3 Apr 2021 10:02:39 +0300 Subject: Added cross page links --- src/views/create-offer.php | 3 +-- src/views/dashboard-login.php | 1 + src/views/landing.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/views/landing.php') diff --git a/src/views/create-offer.php b/src/views/create-offer.php index 9162c90..19f2186 100644 --- a/src/views/create-offer.php +++ b/src/views/create-offer.php @@ -1,5 +1,3 @@ -

Works

-
@@ -21,3 +19,4 @@
+< Back diff --git a/src/views/dashboard-login.php b/src/views/dashboard-login.php index 1431b4f..a4cefe7 100644 --- a/src/views/dashboard-login.php +++ b/src/views/dashboard-login.php @@ -10,3 +10,4 @@ +< Back diff --git a/src/views/landing.php b/src/views/landing.php index e6477ee..d794d93 100644 --- a/src/views/landing.php +++ b/src/views/landing.php @@ -7,3 +7,4 @@ ?> Create a new Job Offer +Dashboard -- cgit v1.3.1-26-gb76a From 1180687f951cbb0ebf1b2fd9e22df5b2a20fea9b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 3 Apr 2021 11:34:24 +0300 Subject: Made job offers show all info --- src/controllers/DashboardController.php | 6 ++++++ src/controllers/LandingController.php | 6 ++++++ src/views/dashboard.php | 2 +- src/views/landing.php | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/views/landing.php') diff --git a/src/controllers/DashboardController.php b/src/controllers/DashboardController.php index 5bd26d4..548f60b 100644 --- a/src/controllers/DashboardController.php +++ b/src/controllers/DashboardController.php @@ -1,11 +1,17 @@ id] = $company->name; + } include "views/dashboard.php"; } diff --git a/src/controllers/LandingController.php b/src/controllers/LandingController.php index aa28505..ffa8644 100644 --- a/src/controllers/LandingController.php +++ b/src/controllers/LandingController.php @@ -1,10 +1,16 @@ id] = $company->name; + } include "views/landing.php"; } } diff --git a/src/views/dashboard.php b/src/views/dashboard.php index 2312419..9060317 100644 --- a/src/views/dashboard.php +++ b/src/views/dashboard.php @@ -1,6 +1,6 @@ id} {$job->title} + echo "{$job->id} {$job->title} {$job->description} " . self::$companies[$job->companyId] . " {$job->salary}
id}\"> diff --git a/src/views/landing.php b/src/views/landing.php index d794d93..1bd679c 100644 --- a/src/views/landing.php +++ b/src/views/landing.php @@ -2,7 +2,7 @@ id} {$job->title}
"; + echo "{$job->title} {$job->description} " . self::$companies[$job->companyId] . " {$job->salary}
"; } ?> -- cgit v1.3.1-26-gb76a From fff8c08ad7f3845eb32671292392cbf08bb738c9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 3 Apr 2021 11:40:22 +0300 Subject: Removed test message from landing page view --- src/views/landing.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/views/landing.php') diff --git a/src/views/landing.php b/src/views/landing.php index 1bd679c..6124f90 100644 --- a/src/views/landing.php +++ b/src/views/landing.php @@ -1,5 +1,3 @@ -

Landing page!

- title} {$job->description} " . self::$companies[$job->companyId] . " {$job->salary}
"; -- cgit v1.3.1-26-gb76a