-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·45 lines (36 loc) · 1.36 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
<?php
// Load in basic functions
require_once('functions/functions.inc');
// Divert to public page if no session is available
if(empty($_REQUEST['Function'])) {
goSite('/index.php?Function=public');
} else {
$pubtest = str_split($_REQUEST['Function'], 6);
if($pubtest[0] == "public") {
$noheader=TRUE; // public pages don't need statusbars or logmenus
} elseif (empty($_SESSION['username'])) {
// if no username is set and we are not calling a public page, redirect for login needs
goSite('/index.php?Function=public');
}
}
// Pre-header process <process_preheader>
if (is_file($FUNCTIONDIR . '/pre/' . $_REQUEST['Function'] . '.inc')) {
require($FUNCTIONDIR . '/pre/' . $_REQUEST['Function'] . '.inc');
}
// Header <process_header>
require($PAGESDIR . '/base/header_start.inc');
if (is_file($PAGESDIR . '/head/' . $_REQUEST['Function'] . '.inc')) {
require($PAGESDIR . '/head/' . $_REQUEST['Function'] . '.inc');
}
require($PAGESDIR . '/base/header_end.inc');
// Page Body <process_body>
require($PAGESDIR . '/base/body_begin.inc');
if (empty($noheader) && empty($_REQUEST['NoHeader'])) {
require($PAGESDIR . '/base/statusbar.inc');
require($PAGESDIR . '/base/menubar.inc');
}
require($PAGESDIR . '/body/' . $_REQUEST['Function'] . '.inc');
// footer <process_footer>
require($PAGESDIR . '/base/footer.inc');
require($PAGESDIR . '/base/body_end.inc');
?>