Exemplo n.º 1
0
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
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
    $setting->getValue('website_theme') ? $theme = $setting->getValue('website_theme') : ($theme = 'bootstrap');
}
define('THEME', $theme);