-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
46 lines (40 loc) · 943 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
42
43
44
45
46
<?php
session_start();
include "includes/config.php";
include "includes/db.php";
define('INCLUDED_BY_MAIN', true); //Do not allow files to be accessed unless included.
$db = db::build($config['db']);
if ($config['debug']['enabled'] == true) {
error_reporting(E_ALL);
} else {
error_reporting(0);
}
if (!isset($_GET['page'])) {
$pageInclude = "partials/home.php";
} elseif (isset($_GET['page'])) {
switch($_GET['page']) {
default:
$pageInclude = "partials/home.php";
}
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title><?php print $config['site']['title']; ?></title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</head>
<body id="container">
<div>
<p>
<?php
include $pageInclude;
?>
</p>
</div>
<div id="footer">
<center>© <?php print date('Y'); ?> OpenPot - All rights reserved</center>
</div>
</body>
</html>