forked from csi-rait/decrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
42 lines (34 loc) · 900 Bytes
/
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
<?php
/*
* Bludit
* https://www.bludit.com
* Author Diego Najar
* Bludit is opensource software licensed under the MIT license.
*/
// Check if Bludit is installed
if (!file_exists('bl-content/databases/site.php')) {
$base = dirname($_SERVER['SCRIPT_NAME']);
$base = rtrim($base, '/');
$base = rtrim($base, '\\'); // Workaround for Windows Servers
header('Location:'.$base.'/install.php');
exit('<a href="./install.php">Install Bludit first.</a>');
}
// Load time init
$loadTime = microtime(true);
// Security constant
define('BLUDIT', true);
// Directory separator
define('DS', DIRECTORY_SEPARATOR);
// PHP paths for init
define('PATH_ROOT', __DIR__.DS);
define('PATH_BOOT', PATH_ROOT.'bl-kernel'.DS.'boot'.DS);
// Init
require(PATH_BOOT.'init.php');
// Admin area
if ($url->whereAmI()==='admin') {
require(PATH_BOOT.'admin.php');
}
// Site
else {
require(PATH_BOOT.'site.php');
}