forked from psathas4/dragon-eye-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·102 lines (81 loc) · 3.26 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
/* ****************************************************************** /
-----------------------------------------------------------
- -
- ######################################################### -
- Dragon Eye CMS System -
- Visit www.DragonEyeCMS.com system in order to report BUGS -
- For contact, send an email at michael9ufo@yahoo.co.uk -
- Note* This is an open-source project (free for anyone) -
- In order to use it you must only keep our copyright -
- ######################################################### -
- -
- Best regards, -
- Michael9ufo -
-----------------------------------------------------------
/* ***************************************************************** */
// Define the constant which we'll need later to check if a webpage it's not accessed from other sides.
define('DragonEye', 'V.1.7');
// Define website location
define('CMS_DIR', dirname(__FILE__));
// Define user IP Address
define('USER_IP', $_SERVER['REMOTE_ADDR']);
session_start();
session_name('DragonEyeCMS');
function sep_path($path)
{
// Replace every " / " and/or " \ " of a path with default directory separator
return preg_replace('/[\/\\\]/', DIRECTORY_SEPARATOR, $path);
}
// Here we load all we need in order to make website work.
@require_once(sep_path(CMS_DIR.'/libraries/main.class.inc'));
@require_once(sep_path(CMS_DIR.'/libraries/anti-flood.class.inc'));
@require_once(sep_path(CMS_DIR.'/libraries/exceptions.class.inc'));
@require_once(sep_path(CMS_DIR.'/libraries/configurations.class.inc'));
@require_once(sep_path(CMS_DIR.'/libraries/D64Code.class.inc'));
// Load Anti-Flood config file
Configs::load('flood');
// Load main config file
Configs::load('main');
// Load DB Settings config file
Configs::load('connection');
// Load Template config file
Configs::load('template');
// Load DB Structure config file
Configs::load('db_structure');
// Load DB Queryes
Configs::load('db_queryes');
// Load Access levels config file
Configs::load('access_levels');
// Load Statistics config file
Configs::load('statistics');
// Load Vote System config file
Configs::load('vote_system');
// Load Donate System config file
Configs::load('donate_system');
// Load Shop config file
Configs::load('shop');
if(!$GLOBALS['CONFIG_DEV_DEBUG'])
{
error_reporting(0);
@ini_set(‘display_errors’, 0);
}
@require_once(sep_path(CMS_DIR.'/libraries/language.class.inc'));
@require_once(sep_path(CMS_DIR.'/libraries/template.class.inc'));
@require_once(sep_path(CMS_DIR.'/libraries/account.class.inc'));
@require_once(sep_path(CMS_DIR.'/libraries/content.class.inc'));
@require_once(sep_path(CMS_DIR.'/libraries/mail.class.inc'));
try
{
// Instantiate Main class
$main = new Main(isset($_GET['page']) ? $_GET['page'] : $GLOBALS['CONFIG_DEFAULT_PAGE']);
// Now we are just loading the web page
$main->load();
// After page loaded, we must unload it (close mysql/mssql connections etc)
unset($main);
}
catch (Dragon_Eye_Exception $e)
{
echo $e->errorMSG();
return false;
}