-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
20 lines (19 loc) · 711 Bytes
/
index.php
File metadata and controls
20 lines (19 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
require_once './autoload.php';
$home = new HomeController();
$pages = ['home','edit-flight','allreservations','reservemulti','allflights','register','addflight','search', 'admin','dashboard', 'myreservations', 'login', 'np', 'logout', 'reserve', 'add', 'update','cancel', 'delete-flight'];
if (isset($_GET['page'])) {
if (in_array($_GET['page'], $pages)) {
$page = $_GET['page'];
if ($page == "admin" || $page == 'admin/dashboard') {
$admin = new AdminController();
$admin->index($page);
} else {
$home->index($page);
}
} else {
include('views/includes/404.php');
}
} else {
$home->index('home');
}