function login() { global $auth, $authentication_type; if (!is_object($auth)) { return false; } if (!empty($GLOBALS['__POST']['username']) || !empty($_SESSION['credentials_' . $authentication_type])) { if (!empty($GLOBALS['__POST']['username'])) { $username = $GLOBALS['__POST']['username']; $password = $GLOBALS['__POST']['password']; } else { $username = $_SESSION['credentials_' . $authentication_type]['username']; $password = $_SESSION['credentials_' . $authentication_type]['password']; } $res = $auth->onAuthenticate(array('username' => $username, 'password' => $password)); if (!PEAR::isError($res) && $res !== false) { if (@$GLOBALS['__POST']['action'] == 'login' && ext_isXHR()) { session_write_close(); ext_Result::sendResult('login', true, ext_Lang::msg('actlogin_success')); } return true; } else { if ($authentication_type == 'extplorer') { // Second attempt to authenticate, since we've switched password hashing algorithm // now we fall back to md5 hashing. $password = md5((string) $GLOBALS['__POST']['password']); $res = $auth->onAuthenticate(array('username' => $username, 'password' => $password)); if (!PEAR::isError($res) && $res !== false) { if (@$GLOBALS['__POST']['action'] == 'login' && ext_isXHR()) { session_write_close(); ext_Result::sendResult('login', true, ext_Lang::msg('actlogin_success')); } return true; } } if (ext_isXHR()) { $errmsg = PEAR::isError($res) ? $res->getMessage() : ext_Lang::msg('actlogin_failure'); ext_Result::sendResult('login', false, $errmsg); } return false; } } if (ext_isXHR() && $GLOBALS['action'] != 'login') { echo '<script type="text/javascript>document.location="' . _EXT_URL . '/index.php";</script>'; exit; } session_write_close(); session_id(generate_session_id()); session_start(); // Ask for Login $GLOBALS['mainframe']->setPageTitle(ext_Lang::msg('actlogin')); $GLOBALS['mainframe']->addcustomheadtag(' <script type="text/javascript" src="scripts/extjs3/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="scripts/extjs3/ext-all.js"></script> <script type="text/javascript" src="' . $GLOBALS['script_name'] . '?option=com_extplorer&action=include_javascript&file=functions.js"></script> <link rel="stylesheet" href="' . _EXT_URL . '/scripts/extjs3/resources/css/ext-all.css" /> <link rel="stylesheet" href="scripts/extjs3/resources/css/xtheme-blue.css" />'); ?> <div style="width: 400px;" id="formContainer"> <div id="ext_logo" style="text-align:center;"> <a href="http://extplorer.net" target="_blank"> <img src="<?php echo _EXT_URL; ?> /images/eXtplorer-horizontal2.png" align="middle" alt="eXtplorer Logo" style="border:none;" /> </a> </div> <noscript> <div style="width:400px;text-align:center;"> <h1>eXtplorer Login</h1> <p style="color:red;">Oh, Javascript is disabled!</p> <p>Find out <a target="_blank" href="https://www.google.com/adsense/support/bin/answer.py?hl=en&answer=12654">how you can enable Javascript in your browser.</a> </p> </div> </noscript> <div id="adminForm"></div> </div> <script type="text/javascript"> Ext.onReady( function() { var simple = new Ext.FormPanel(<?php $auth->onShowLoginForm(); ?> ); Ext.get( 'formContainer').center(); Ext.get( 'formContainer').setTop(100); simple.getForm().findField('username').focus(); Ext.EventManager.onWindowResize( function() { Ext.get( 'formContainer').center();Ext.get( 'formContainer').setTop(100); } ); }); </script><?php define('_LOGIN_REQUIRED', 1); }
} else { $sha1_md5lloader = "null"; } $md5_lwjql = $md5_lwjql_util = $md5_jinput = "null"; } else { $md5_lwjql = md5_file("../files/clients/{$client}/bin/lwjgl.jar"); $md5_lwjql_util = md5_file("../files/clients/{$client}/bin/lwjgl_util.jar"); $md5_jinput = md5_file("../files/clients/{$client}/bin/jinput.jar"); $md5_ass = $md5_lib = $sha1_md5forge = $sha1_md5lloader = "null"; } $uuid = md5($getLogin); // md5($getLogin); $sha1_md5zip = sha1($md5_zip); $sha1_pass = sha1($realPass); $sha1_version = sha1($version); $seskey = generate_session_id(); $last_version = "false"; if (strtolower($appHash) == strtolower($md5_program)) { $last_version = "true"; } echo $sha1_md5zip . "<::>" . $md5_jar . "<::>" . $md5_lwjql . "<::>" . $md5_lwjql_util . "<::>" . $md5_jinput . "<::>" . "<br>" . $sha1_version . "<::>" . $sha1_pass . "<::>" . Guard::encrypt(JGuard::stir_string($seskey), $HideAESKey) . "<::>" . $last_version . "<::>" . "<br>"; $mods = array(); get_mods_list(null, $mods); if (count($mods) == 0) { $mods[] = "nomods"; } echo implode("<:f:>", $mods) . "<::>null<::>" . get_image_url("skin") . "<::>" . get_image_url("cloak") . "<::>"; if ($version_compare != (0 | 1)) { $coremods = array(); get_coremods_list(null, $coremods); if (count($coremods) == 0) {