-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
39 lines (32 loc) · 795 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
<?php
const SITE_URL = "http://darkoux.com/";
const SITE_ROOT = __DIR__;
$projects = array(
'citizenshipper',
'giftconnect',
'buzzit',
'fast',
'ourhouse',
'p28',
'soundmap'
);
$bodyClass = "page-landing";
if(array_key_exists('project', $_GET)) {
$project = $_GET['project'];
if(! in_array($project, $projects)) {
header("Location: " . SITE_URL);
die();
}
$bodyClass = "page-project project-{$project}";
}
require_once('views/header.php');
if(isset($project)) {
require_once(SITE_ROOT . "/views/project-header.php");
require_once(SITE_ROOT . "/projects/{$project}/content.php");
require_once(SITE_ROOT . "/views/outro.php");
}
else {
require_once(SITE_ROOT . "/views/landing.php");
require_once(SITE_ROOT . "/views/outro.php");
}
require_once('views/footer.php');