php if defined BTS_CMS die Hacker Go out include ENGINE_DIR configs si

 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
<?php
/*=================================== |
=====================================*/
if(!defined('BTS_CMS')) {
die("Hacker? Go out!");
}
@include(ENGINE_DIR.'configs/site.config.php');
if ($config['cms_url'] == "") {
$config['cms_url'] = explode("index.php", $_SERVER['PHP_SELF']);
$config['cms_url'] = reset($config['cms_url']);
$config['cms_url'] = "http://".$_SERVER['HTTP_HOST'].$config['cms_url'];
}
require_once(ENGINE_DIR.'classes/mysql.class.php');
require_once(ENGINE_DIR.'configs/db.config.php');
require_once(ENGINE_DIR.'modules/functions.engine.php');
$phptimer = new phptimer;
$phptimer->go();
hacker_kill();
//pseudo cron job
$cron = false;
if ($cron) {
include_once(ENGINE_DIR.'/modules/cron.engine.php');
$cron = new cron;
$cron->check();
}
$header_tags = array (
'title' => $config['site_title'],
'description' => $config['site_description'],
'keywords' => $config['site_keywords']
);
//tpls
require_once(ENGINE_DIR.'classes/template.class.php');
$tpl = new Template_Class;
$tpl->dir = ROOT_DIR.'frontend/themes/'.$config['cms_theme'].'/tpls/';
define('TEMPLATE_DIR', $tpl->dir);
//cms default modules
if ($config['cms_disabled'] == 'true') {
include_once(ENGINE_DIR.'modules/disabled.php');
}
require_once ROOT_DIR.'/backend/engine.php';
//user added modules
?>