forked from fansoro/fansoro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
53 lines (43 loc) · 1.12 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 the path to the root directory (without trailing slash).
*/
define('ROOT_DIR', __DIR__);
/**
* Define the path to the content directory (without trailing slash).
*/
define('CONTENT_PATH', ROOT_DIR .'/content');
/**
* Define the path to the libraries directory (without trailing slash).
*/
define('LIBRARIES_PATH', ROOT_DIR .'/libraries');
/**
* Define the path to the themes directory (without trailing slash).
*/
define('THEMES_PATH', ROOT_DIR .'/themes');
/**
* Define the path to the plugins directory (without trailing slash).
*/
define('PLUGINS_PATH', ROOT_DIR .'/plugins');
/**
* Load Morfy
*/
require LIBRARIES_PATH . '/Morfy/Morfy.php';
/**
* First check for installer then go
*/
if (file_exists('install.php')) {
if (isset($_GET['install']) && $_GET['install'] == 'done') {
// Try to delete install file if not DELETE MANUALLY !!!
@unlink('install.php');
// Redirect to main page
header('location: index.php');
} else {
include 'install.php';
}
} else {
/**
* Run Morfy Application
*/
Morfy::factory()->run('config.php');
}