-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
53 lines (46 loc) · 1.08 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
<?php
//
define('IN_SYSTEM',true);
require_once(dirname(__FILE__).'/engine/config.php');
require_once(ROOT_DIR.'/engine/classes/Engine.class.php');
$oEngine = Engine::getInstance();
$tstart = $oEngine->timer();
$Func = new Functions;
$Db = new Db;
$Tpl = new Tpl;
$Db->dbConnect();
$Func->userLogin();
if ($_REQUEST['get'])
{
$get = trim($_REQUEST['get']);
$getPage = explode('/', $get);
}
if ($_REQUEST['get'])
{
if(file_exists(ROOT_DIR."/pages/".$getPage[0].".html"))
{
$Module = $getPage[0];
require_once ROOT_DIR."/pages/".$getPage[0].".html";
}
elseif(file_exists(ROOT_DIR."/engine/modules/".$getPage[0].".php"))
{
$Module = $getPage[0];
require_once(ROOT_DIR."/engine/modules/".$getPage[0].".php");
}
elseif(file_exists(ROOT_DIR."/engine/modules/urls.php"))
{
$Module = 'urls';
require_once(ROOT_DIR."/engine/modules/urls.php");
}
else
{
$Module = '404';
require_once(ROOT_DIR."/pages/404.html");
}
}
else
{
$Module = 'main';
require_once(ROOT_DIR."/pages/main.html");
}
$oEngine->Unload();