Summary Files Commits Branches @commit @diff @stats
path: root / src / index.php
blob: 676cd56f86e09600cb877bcf8d7181f501999597 (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
32
33
34
<?php require "document-top.php"; ?>

<?php
include_once("controllers/LandingController.php");
include_once("controllers/CreateOfferController.php");
include_once("controllers/DashboardLoginController.php");

/* The landing page practically acts as our page router.
 * All request get redirected to here (look at the devrix-job-board.conf) 
 * Thanks https://www.taniarascia.com/the-simplest-php-router/
 */

$request = $_SERVER['REQUEST_URI'];

switch ($request) {
	case "":
	case "/":
		LandingController::invoke();
		break;
	case "/CreateOffer":
	case "/CreateOffer/":
		CreateOfferController::invoke();
		break;
	case "/Dashboard":
	case "/Dashboard/":
		DashboardLoginController::invoke();
		break;
	default:
		http_response_code(404);
		break;
}
?>

<?php require "document-bot.php"; ?>