forked from DarkstarProject/XiWeb
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
55 lines (44 loc) · 1.44 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
//Check if the config.php file has already been created.
//If so, include it, otherwise display an error message
if (file_exists('config.php')) {
include_once('config.php');
} else {
$_SESSION['errors']['general'] = $lang['error']['config'];
}
//If the system is installed, proceed
//'INSTALLED' is defined in the config.php file
//If the system is not installed, navigate to the install page
if (defined('INSTALLED')) {
//includes.php
include_once('includes/includes.php');
include_once('includes/functions.php');
} else {
// If the config file exists, but the system is not installed, throw an error and redirect to the install directory
$_SESSION['errors']['install'] = $lang['error']['install']['not_installed'];
header("Location: install/index.php");
}
$newsTitles = [];
$newsSummaries = [];
if($newsShow1){
$newsTitles[] = $newsTitle1;
$newsSummaries[] = $newsSummary1;
}
if($newsShow2){
$newsTitles[] = $newsTitle2;
$newsSummaries[] = $newsSummary2;
}
if($newsShow3){
$newsTitles[] = $newsTitle3;
$newsSummaries[] = $newsSummary3;
}
if(sizeof($newsTitles) > 0) {
$newsCountColSize = 12 / sizeof($newsTitles);
}
//These php files generate the html content to display
include_once('themes/'.$theme.'/views/header.php');
include_once('themes/'.$theme.'/views/navbar.php');
include_once('themes/'.$theme.'/views/index.php');
include_once('themes/'.$theme.'/views/footer.php');
echo $output;
?>