forked from MPOS/php-mpos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoloader.inc.php
85 lines (75 loc) · 3.34 KB
/
autoloader.inc.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
(SECURITY == "*)WT#&YHfd" && SECHASH_CHECK) ? die("public/index.php -> Set a new SECURITY value to continue") : 0;
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
// Default classes
require_once(INCLUDE_DIR . '/lib/KLogger.php');
require_once(CLASS_DIR . '/logger.class.php');
require_once(CLASS_DIR . '/debug.class.php');
if ($config['mysql_filter']) {
require_once(CLASS_DIR . '/strict.class.php');
}
require_once(INCLUDE_DIR . '/database.inc.php');
require_once(INCLUDE_DIR . '/config/memcache_keys.inc.php');
require_once(INCLUDE_DIR . '/config/error_codes.inc.php');
// We need to load these first
require_once(CLASS_DIR . '/base.class.php');
require_once(CLASS_DIR . '/coins/coin_base.class.php');
require_once(CLASS_DIR . '/coin_address.class.php');
require_once(CLASS_DIR . '/setting.class.php');
require_once(INCLUDE_DIR . '/version.inc.php');
if (PHP_OS == 'WINNT') require_once(CLASS_DIR . '/memcached.class.php');
// Now decide on which coin class to load and instantiate
if (file_exists(CLASS_DIR . '/coins/coin_' . $config['algorithm'] . '.class.php')) {
require_once(CLASS_DIR . '/coins/coin_' . $config['algorithm'] . '.class.php');
$coin = new Coin();
$coin->setConfig($config);
} else {
die('Unable to load your coins class definition for ' . $config['algorithm']);
}
// Swiftmailer
require_once(INCLUDE_DIR . '/lib/swiftmailer/swift_required.php');
// Detect device
require_once(INCLUDE_DIR . '/lib/Mobile_Detect.php');
$detect = new Mobile_Detect;
if ($detect->isMobile()) {
$theme = $setting->getValue('website_mobile_theme', 'bootstrap');
} else if ( PHP_SAPI == 'cli') {
// Create a new compile folder just for crons
// We call mail templates directly anyway
$theme = 'cron';
} else {
// Use configured theme, fallback to default theme
$theme = $setting->getValue('website_theme', 'bootstrap');
}
define('THEME', $theme);
//Required for Smarty
require_once(CLASS_DIR . '/template.class.php');
// Load smarty now that we have our theme defined
require_once(INCLUDE_DIR . '/smarty.inc.php');
// Load everything else in proper order
require_once(CLASS_DIR . '/mail.class.php');
require_once(CLASS_DIR . '/tokentype.class.php');
require_once(CLASS_DIR . '/token.class.php');
require_once(CLASS_DIR . '/payout.class.php');
require_once(CLASS_DIR . '/block.class.php');
// We require the block class to properly grab the round ID
require_once(CLASS_DIR . '/statscache.class.php');
require_once(CLASS_DIR . '/bitcoin.class.php');
require_once(CLASS_DIR . '/bitcoinwrapper.class.php');
require_once(CLASS_DIR . '/monitoring.class.php');
require_once(CLASS_DIR . '/notification.class.php');
require_once(CLASS_DIR . '/user.class.php');
require_once(CLASS_DIR . '/csrftoken.class.php');
require_once(CLASS_DIR . '/invitation.class.php');
require_once(CLASS_DIR . '/share.class.php');
require_once(CLASS_DIR . '/worker.class.php');
require_once(CLASS_DIR . '/statistics.class.php');
require_once(CLASS_DIR . '/transaction.class.php');
require_once(CLASS_DIR . '/roundstats.class.php');
require_once(CLASS_DIR . '/news.class.php');
require_once(CLASS_DIR . '/api.class.php');
require_once(CLASS_DIR . '/usersettings.class.php');
require_once(CLASS_DIR . '/ipushnotification.interface.php');
require_once(CLASS_DIR . '/pushnotification.class.php');
require_once(INCLUDE_DIR . '/lib/Michelf/Markdown.php');
require_once(INCLUDE_DIR . '/lib/scrypt.php');