htaccess to block access to the logs by default, only log warnings simple config check to see if that folder is writable warning if changeNoFee is used warning if setLocked is used warning if changeAdmin is used warning if when logging in that IP is different than saved IP info if a login fails with bad user or password warning if a user is locked via failed logins info if an update/etc fails with bad pin warning if a user is locked via failed pins info when a pin request is sent warning when a pin request email doesn't send warning when trying to request pin reset and incorrect password info when a twofactor token sent warning if twofactor email doesn't send warning when a user tries to request multiple of the same type of token info when a twofactor token is deleted warning if a twofactor token fails to delete warning when an invalid change password token is used info on successful account update warning when reset password is called and IP doesn't match saved IP, info otherwise warning if isAuthenticated falls through and kills a session
75 lines
2.8 KiB
PHP
75 lines
2.8 KiB
PHP
<?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;
|
|
|
|
// SHA/Scrypt check
|
|
if (empty($config['algorithm']) || $config['algorithm'] == 'scrypt') {
|
|
$config['target_bits'] = 16;
|
|
} else {
|
|
$config['target_bits'] = 32;
|
|
}
|
|
|
|
// Default classes
|
|
require_once(CLASS_DIR . '/debug.class.php');
|
|
require_once(INCLUDE_DIR . '/lib/KLogger.php');
|
|
if ($config['logging']['enabled']) {
|
|
$log = new KLogger($config['logging']['path']."/".$config['logging']['file'], $config['logging']['level']);
|
|
}
|
|
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 two first
|
|
require_once(CLASS_DIR . '/base.class.php');
|
|
require_once(CLASS_DIR . '/setting.class.php');
|
|
|
|
// We need this one in here to properly set our theme
|
|
require_once(INCLUDE_DIR . '/lib/Mobile_Detect.php');
|
|
|
|
// Detect device
|
|
if ($detect->isMobile() && $setting->getValue('website_mobile_theme')) {
|
|
// Set to mobile theme
|
|
$setting->getValue('website_mobile_theme') ? $theme = $setting->getValue('website_mobile_theme') : $theme = 'mobile';
|
|
} else {
|
|
// Use configured theme, fallback to default theme
|
|
$setting->getValue('website_theme') ? $theme = $setting->getValue('website_theme') : $theme = 'mpos';
|
|
}
|
|
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(INCLUDE_DIR . '/lib/Michelf/Markdown.php');
|
|
require_once(INCLUDE_DIR . '/lib/scrypt.php');
|
|
|
|
?>
|