forked from OmniHost/CoreCMS
/
index.php
38 lines (31 loc) · 825 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
<?php
define('NS', 'front');
define('VERSION', '1.2.0');
error_reporting(E_ALL);
if (!is_file('config.php')) {
header("location: install/");
exit;
}
require('config.php');
if (!defined('DIR_APPLICATION')) {
header('Location: install/index.php');
exit;
}
require(DIR_SYSTEM . 'startup.php');
require_once(DIR_ROOT . 'system/Core/Core.php');
$core = new \Core\Core($config);
$core->load->library('customer');
$core->customer = new Customer();
$currency = new \Core\Currency();
$core->currency = $currency;
if(is_file(DIR_VENDOR . 'autoload.php')){
require(DIR_VENDOR . 'autoload.php');
}
if(BASE_REQUEST_TYPE == 'cli'){
$core->dispatch_cli();
}else{
$core->addPreAction('common/maintenance');
$core->addPreAction('common/seo_url');
$core->addPreAction('common/home/marketing');
$core->dispatch();
}