minor syntax corrections

This commit is contained in:
Joshua Perry 2023-01-25 17:14:23 +00:00
parent f7493cac33
commit ddd3b719fe
12 changed files with 22 additions and 12 deletions

View File

@ -48,4 +48,5 @@ class EntryPoint {
$title = $page['title']; $title = $page['title'];
require '../templates/layout.html.php'; require '../templates/layout.html.php';
} }
} }
?>

View File

@ -4,4 +4,5 @@ interface Routes {
public function getController($controllerName, $functionName); public function getController($controllerName, $functionName);
public function getDefaultRoute(); public function getDefaultRoute();
public function checkLogin($route); public function checkLogin($route);
} }
?>

View File

@ -18,4 +18,5 @@ class Job {
public function getCat() { public function getCat() {
return $this->catsTable->find('id', $this->categoryId)[0]; return $this->catsTable->find('id', $this->categoryId)[0];
} }
} }
?>

View File

@ -5,4 +5,5 @@ class User {
public $username; public $username;
public $password; public $password;
public $userType; public $userType;
} }
?>

View File

@ -62,4 +62,5 @@ class Routes implements \CSY2028\Routes {
'vars' => ['cats' => $cats->findAll()] 'vars' => ['cats' => $cats->findAll()]
]; ];
} }
} }
?>

View File

@ -72,7 +72,7 @@ class Portal {
'vars' => $this->vars]; 'vars' => $this->vars];
} }
public function edit() { public function edit() { //TODO: finish this function
if (isset($_GET['job_id'])) { if (isset($_GET['job_id'])) {
$this->vars['job'] = $this->jobsTable->find("id", $_GET['jod_id']); $this->vars['job'] = $this->jobsTable->find("id", $_GET['jod_id']);
} }
@ -80,4 +80,7 @@ class Portal {
$this->vars['cat'] = $this->catsTable->find("id", $_GET['cat_id']); $this->vars['cat'] = $this->catsTable->find("id", $_GET['cat_id']);
} }
} }
}
//TODO: add functions for adding jobs and categories
}
?>

View File

@ -70,4 +70,5 @@ class User {
'title' => 'Jo\'s Jobs- Logged Out', 'title' => 'Jo\'s Jobs- Logged Out',
'vars' => $this->vars]; 'vars' => $this->vars];
} }
} }
?>

View File

@ -24,3 +24,4 @@ header("Pragma: no-cache");
header('content-length: ' . strlen($contents)); header('content-length: ' . strlen($contents));
echo $contents; echo $contents;
?>

View File

@ -3,6 +3,6 @@
<p>Welcome to Jo's Jobs, we're a recruitment agency based in Northampton. We offer a range of different office jobs. Get in touch if you'd like to list a job with us.</a></p> <p>Welcome to Jo's Jobs, we're a recruitment agency based in Northampton. We offer a range of different office jobs. Get in touch if you'd like to list a job with us.</a></p>
<h2>Select the type of job you are looking for:</h2> <h2>Select the type of job you are looking for:</h2>
<ul> <ul>
<?php require "nav.html.php";?> <?=require "nav.html.php"?>
</ul> </ul>
</main> </main>

View File

@ -1,7 +1,7 @@
<main class="sidebar"> <main class="sidebar">
<section class="left"> <section class="left">
<ul> <ul>
<?php require 'nav.html.php';?> <?=require 'nav.html.php'?>
</ul> </ul>
</section> </section>

View File

@ -1,7 +1,7 @@
<main class = "sidebar"> <main class = "sidebar">
<section class="left"> <section class="left">
<ul> <ul>
<?php require 'nav.html.php';?> <?=require 'nav.html.php'?>
</ul> </ul>
</section> </section>

View File

@ -2,6 +2,6 @@
<p>Welcome to Jo's Jobs, we're a recruitment agency based in Northampton. We offer a range of different office jobs. Get in touch if you'd like to list a job with us.</a></p> <p>Welcome to Jo's Jobs, we're a recruitment agency based in Northampton. We offer a range of different office jobs. Get in touch if you'd like to list a job with us.</a></p>
<h2>Select the type of job you are looking for:</h2> <h2>Select the type of job you are looking for:</h2>
<ul> <ul>
<?php require 'nav.html.php';?> <?=require 'nav.html.php'?>
</ul> </ul>
</main> </main>