<?
bbbcbegjff( );
cdafdhigae( );
if (bccgfidbjh( 'ini_set' )) {
bfefeaahhe( 'mssql.min_message_severity', 17 );
bfefeaahhe( 'session.cookie_httponly', 1 );
}
cdicbdfbcf( 'BASEDIR', gddddedgb( chhiehddac( __FILE__ ) ) . DIRECTORY_SEPARATOR );
cdicbdfbcf( 'DS', DIRECTORY_SEPARATOR );
if (cgdbfjcgjc( BASEDIR . 'sql_connection.php' )) {
require_once( BASEDIR . 'sql_connection.php' );
require_once( BASEDIR . 'inc' . DS . 'inc.constants.php' );
require_once( BASEDIR . 'classes' . DS . 'autoload.class.php' );
if (cfaefeddah( 'ENVIRONMENT' )) {
switch (ENVIRONMENT) {
case 'development': {
dhhgehdaab( E_ALL );
break;
}
case 'production': {
dhhgehdaab( 0 );
break;
}
default: {
exit( 'The application environment is not set correctly.' );
}
}
}
autoloader::init( );
biiifcfedg( array( 'dmnexception', 'handleException' ) );
$ss = new secure( );
$db = new database( );
$auth = new auth( );
$oSmarty = new Smarty( );
$validate = new validate( );
$helper = new helper( array( 'smarty' => $oSmarty, 'auth' => $auth ) );
if ($ss->isIPBanned( )) {
eefdfccaa( 'HTTP/1.1 403 Forbidden' );
exit( );
}
if ($db->loadXmlConfig( 'main|con_check' ) == 1) {
if (isset( $_SESSION['name'] )) {
if (( !$auth->isAdmin( ) && !$auth->isGM( ) )) {
if (!$validate->check_status( $_SESSION['name'] )) {
$auth->logoutUser( );
eefdfccaa( 'Location: ' . $db->loadConfig( 'base_url' ) );
}
}
}
}
if ($db->loadXmlConfig( 'main|check_resets' ) == 1) {
if (isset( $_SESSION['name'] )) {
if (( !$auth->isAdmin( ) && !$auth->isGM( ) )) {
if (!$validate->check_resets( $_SESSION['name'] )) {
$auth->logoutUser( );
eefdfccaa( 'Location: ' . $db->loadConfig( 'base_url' ) );
}
}
}
}
$helper->assignSmartyVars( );
if (( empty( $_GET['action'] ) && empty( $_POST['action'] ) )) {
$action = (isset( $_SESSION['name'] ) ? 'user/mmoserver' : 'public/index');
}
else {
$action = (isset( $_POST['action'] ) ? $_POST['action'] : $_GET['action']);
}
$action = bdchbhfacd( '/', bheghhdhhh( dcbhcfdehi( dgdefjecah( '/[^0-9a-z\_\-\/]/i', '', $action ) ) ) );
if (!empty( $action[0] )) {
switch ($action[0]) {
case 'public': {
if (!empty( $action[1] )) {
if (cgdbfjcgjc( BASEDIR . 'pages' . DS . $action[1] . '.php' )) {
require_once( BASEDIR . 'pages' . DS . $action[1] . '.php' );
}
else {
exception;
throw new ( 'Page not found.' );
}
}
else {
require_once( BASEDIR . 'pages' . DS . 'index.php' );
}
break;
}
case 'user': {
if ($auth->isLoggedIn( )) {
if (!empty( $action[1] )) {
if (cgdbfjcgjc( BASEDIR . 'pages' . DS . 'account' . DS . $action[1] . '.php' )) {
require_once( BASEDIR . 'pages' . DS . 'account' . DS . $action[1] . '.php' );
}
else {
exception;
throw new ( 'Page not found.' );
}
}
else {
require_once( BASEDIR . 'pages' . DS . 'account' . DS . 'xtremetop.php' );
}
}
else {
$oSmarty->assign( 'message', array( 'type' => 'error', 'messages' => 'You are not logged in. Please login.' ) );
require_once( BASEDIR . 'pages' . DS . 'index.php' );
}
break;
}
case ADMIN_DIR: {
if (( $auth->isLoggedIn( ) && $auth->isAdmin( ) )) {
if (!empty( $action[1] )) {
if (cgdbfjcgjc( BASEDIR . 'pages' . DS . ADMIN_DIR . DS . $action[1] . '.php' )) {
require_once( BASEDIR . 'pages' . DS . ADMIN_DIR . DS . $action[1] . '.php' );
}
else {
exception;
throw new ( 'Page not found.' );
}
}
else {
require_once( BASEDIR . 'pages' . DS . ADMIN_DIR . DS . 'index.php' );
}
}
else {
if (!$auth->isAdmin( )) {
$oSmarty->assign( 'message', array( 'type' => 'error', 'messages' => 'You don\'t have rights to access this page.' ) );
}
if (!$auth->isLoggedIn( )) {
$oSmarty->assign( 'message', array( 'type' => 'error', 'messages' => 'You are not logged in. Please login.' ) );
}
require_once( BASEDIR . 'pages' . DS . 'index.php' );
}
break;
}
default: {
exception;
throw new ( 'Page not found.' );
break;
}
}
}
else {
exception;
throw new ( 'Page not found.' );
}
if (DEBUG == true) {
$config['connection']['end'] = dbhhjcagib( true );
$config['connection']['elapsed'] = dbhhjcagib( true ) - START;
echo '<table width="100%"><tr><td>';
dBug;
new $db->Queries( )( );
echo '</td></tr><tr><td>';
dBug;
new ( $config );
echo '</td></tr>';
if (( cgfabbeaii( $_GET ) && 0 < gbfbiehia( $_GET ) )) {
echo '<tr><td>';
dBug;
new ( $_GET );
echo '</td></tr>';
}
if (( cgfabbeaii( $_POST ) && 0 < gbfbiehia( $_POST ) )) {
echo '<tr><td>';
dBug;
new ( $_POST );
echo '</td></tr>';
}
if (( cgfabbeaii( $_SESSION ) && 0 < gbfbiehia( $_SESSION ) )) {
echo '<tr><td>';
dBug;
new ( $_SESSION );
echo '</td></tr>';
}
if (( cgfabbeaii( $_COOKIE ) && 0 < gbfbiehia( $_COOKIE ) )) {
echo '<tr><td>';
dBug;
new ( $_COOKIE );
echo '</td></tr>';
}
echo '</table>';
}
}
else {
cdicbdfbcf( 'DmNMuSite', 1 );
require_once( BASEDIR . 'classes' . DS . 'dmnexception.class.php' );
require_once( BASEDIR . 'classes' . DS . 'install.class.php' );
install;
new ( );
}
dcbdcajcce( );
bbeceghfij( );
echo ' ';
?>