-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
40 lines (40 loc) · 903 Bytes
/
index.php
File metadata and controls
40 lines (40 loc) · 903 Bytes
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
<?php
// start the session if not already
if (!session_id()){
session_start();
}
// gets the page name from the url
$pageName = "";
if (is_null($_GET["pageName"]))
$pageName = "index";
else
$pageName = $_GET["pageName"];
$_SESSION['CURR_PAGE'] = $pageName;
// this sets the inclues path to here
include_once __DIR__ . "/Shared/page.php";
include_once __DIR__ . "/$pageName/page.php";
echo
"<html>
<head>";
if (!empty($SHARED['HTML_includes']))
echo $SHARED['HTML_includes'];
if (!empty($SHARED['JS']))
echo $SHARED['JS'];
if (!empty($SHARED['CSS']))
echo $SHARED['CSS'];
if (!empty($CONTENT['HEAD']))
echo $CONTENT['HEAD'];
echo
"</head>
<body>";
if (!empty($SHARED['HTML_topbar']))
echo $SHARED['HTML_topbar'];
echo "<div id='content' class='container'>";
if(!empty($CONTENT['BODY']))
echo $CONTENT['BODY'];
echo "</div>";
echo dispSidebar($CONTENT);
echo
" </body>
</html>";
?>