-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
41 lines (38 loc) · 977 Bytes
/
index.php
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
35
36
37
38
39
40
41
<!DOCTYPE html>
<!--
/*
* Student Info: Name=Avanika M Darji, ID=16387
* Subject: CS526(B)_HW5_Spring_2016
* Author: AvanikaDarji
* Filename: index.php
* Date and Time: Mar 20, 2016 10:12:52 AM
* Project Name: Avanika_16387_CS526B_HW5
*/
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
include_once "models/PageData.php";
$pageData = new PageData();
$pageData->title = "Restaurant";
$pageData->addCSS('css/layout.css');
$pageData->addCSS('css/navigation.css');
//connect to database
include_once "db/dbcontext.php";
$db = DBContext::getDB();
$pageData->navigation = include_once "views/navigation_front.php";
$navigationIsClicked = isset($_GET["controller"]);
if ($navigationIsClicked) {
$controller = $_GET["controller"];
} else {
$controller = "guest";
}
$pageData->content = include_once "controllers/$controller/index.php";
include_once "views/page.php";
?>
</body>
</html>