CSY2028-assignment-2/jobs/controllers/Admin.php

28 lines
830 B
PHP
Raw Normal View History

2023-01-23 18:34:00 +00:00
<?php
namespace jobs\controllers;
class Admin {
private $jobsTable;
private $catsTable;
private $appsTable;
private $usersTable;
private $vars = [];
public function __construct(\CSY2028\DatabaseTable $jobsTable, \CSY2028\DatabaseTable $catsTable, \CSY2028\DatabaseTable $appsTable, \CSY2028\DatabaseTable $usersTable) {
$this->jobsTable = $jobsTable;
$this->catsTable = $catsTable;
$this->appsTable = $appsTable;
$this->usersTable = $usersTable;
$this->vars['cats'] = $this->catsTable->findAll();
2023-01-23 18:45:00 +00:00
$this->vars['response'] = '';
2023-01-23 18:34:00 +00:00
}
public function home() {
2023-01-25 13:22:20 +00:00
return ['template' => 'login.html.php',
2023-01-23 18:34:00 +00:00
'title' => 'Jo\'s Jobs- Login',
'vars' => $this->vars];
}
public function homeSubmit() {
2023-01-25 13:41:24 +00:00
2023-01-23 18:34:00 +00:00
}
}