blob: 548f60b696e56e0a53e5296238f6691b063d0227 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
include_once('controllers/BaseController.php');
include_once('models/JobOffer.php');
include_once('models/Company.php');
include_once('controllers/EditOfferController.php');
class DashboardController extends BaseController {
public static $companies = array();
public static function get() {
$jobs = JobOffer::getAllFromDB();
foreach(Company::getAllFromDB() as $company) {
self::$companies[$company->id] = $company->name;
}
include "views/dashboard.php";
}
public static function post() {
switch($_POST['_method']) {
case "get":
EditOfferController::get();
break;
case "put":
EditOfferController::put();
break;
case "delete":
EditOfferController::delete();
break;
}
}
}
|