-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.php
executable file
·61 lines (45 loc) · 2.03 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
<?php
session_start();
define ('_ACM_VALID', 1);
require './classes/config.class.php';
if(!file_exists('./config.php')) {
echo('<div style="font-size: 20px; background-color: #FFF; color:#000;"><strong><center><br />Warning: The config file doesn\'t exist. Please create a config.php based on (config.sample.php) before start ACM on your live server.<br /><br /></center></strong></div>');
exit();
}
require './config.php';
require './libs/Smarty.class.php';
require './libs/PHPMailer.php';
require './libs/SMTP.php';
require './classes/system.class.php';
require './classes/mysql.class.php';
require './classes/email.class.php';
require './classes/core.class.php';
require './classes/account.class.php';
require './classes/world.class.php';
require './classes/character.class.php';
header("Content-Type: text/html; charset=".CONFIG::g()->core_iso_type);
if(file_exists('./install.php')) {
echo('<div style="font-size: 20px; background-color: #FFF; color:#000;"><strong><center><br />Warning: The install file can be seen. Please delete install.php before start ACM on your live server.<br /><br /></center></strong></div>');
exit();
}
if(SID != '') {
SmartyObject::getInstance()->assign('session_id', '?'.SID);
DEBUG::add(LANG::i18n('_cookie_prob'));
}
$action = (!empty($_GET['action'])) ? $_GET['action'] : 'index';
$action = (!empty($_POST['action'])) ? $_POST['action'] : $action;
$action = htmlentities($action);
$action = htmlspecialchars($action);
//------------------------------------------------------------------
// Display
//------------------------------------------------------------------
SmartyObject::getInstance()->assign('vm_title', LANG::i18n('_title'));
SmartyObject::getInstance()->assign('vm_title_page', LANG::i18n('_title_page'));
SmartyObject::getInstance()->assign('vm_charset_type', CONFIG::g()->core_iso_type);
$core = new CORE();
if(method_exists($core, $action))
$core->$action();
else
$core->index();
SmartyObject::getInstance()->display();
?>