-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
64 lines (50 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
56
57
58
59
60
61
62
63
64
<?php
/**
* Created by PhpStorm.
* User: xacam
* Date: 12/03/15
* Time: 15:57
*/
require_once('system/classes/ApplicationEngine.php');
require_once('system/classes/DatabaseEngine.php');
//require_once('system/classes/FunctionEngine.php');
$appEngine = new ApplicationEngine();
$dbEngine = new DatabaseEngine();
$requestURI = explode('/',$_SERVER['REQUEST_URI']);
$pageLink = $requestURI[1];
if ($pageLink == 'service'){
$displayType = 'service';
$includeFileName = 'webService';
}else{
$displayType = 'page';
$includeFileName = 'main';
}
$pageHeaderNeed = false;
$pageMenuNeed = false;
$pageFooterNeed = false;
if ($pageLink == '' || $pageLink == 'main'){
$includeFileName = 'main';
$pageHeaderNeed = true;
$pageMenuNeed = true;
$pageFooterNeed = true;
}
if ($pageLink == 'reports'){
$includeFileName = 'reports';
$pageHeaderNeed = true;
$pageMenuNeed = true;
$pageFooterNeed = true;
}
if ($pageHeaderNeed == true){
require_once($appEngine->pageBasePath . 'header.php');
}
if ($pageMenuNeed == true){
require_once($appEngine->pageBasePath . 'menu.php');
}
if ($displayType == 'service'){
require_once($appEngine->serviceBasePath . $includeFileName . '.php');
}else{
require_once($appEngine->pageBasePath . $includeFileName . '.php');
}
if ($pageFooterNeed == true){
require_once($appEngine->pageBasePath . 'footer.php');
}