-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
37 lines (27 loc) · 1.05 KB
/
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
<?php
/*
* This is the front page.
*
* We load all modules and build the skeleton of the site.
*
* The boolean true passed to PostLoader and NavGenerator indicate, that we need <nav /> and <main /> tags. We won't need them to update the content, as we will be accessing them using querySelector in js/admin.js.
*
* @package simpleCMS
*
*/
require_once('./view/Header.php');
require_once('./view/PostLoader.php');
require_once('./view/NavGenerator.php');
require_once('./modules/AdminPanelVerifier.php');
require_once('./view/Footer.php');
date_default_timezone_set('UTC');
if (!file_exists('./content/comments.xml') || !file_exists('./content/blog.txt')) { //Create the content files if we don't have them
require_once('./modules/Init.php');
Init::start();
}
$postLoader = new PostLoader(true);
echo Header::build();
echo NavGenerator::generateNav($postLoader->headlines,true);
echo $postLoader->mainContent;
AdminPanelVerifier::verify(); //Check if Admin mode was invoked
echo Footer::build($postLoader->wholefile);