and | // | Dan Wilson who built this patch for the Debian package. | // +--------------------------------------------------------------------------+ if (!isset($coming_from_common)) { exit; } // timestamp for login timeout $current_time = time(); // Uses faster mcrypt library if available if (function_exists('mcrypt_encrypt') || PMA_dl('mcrypt')) { require_once './libraries/mcrypt.lib.php'; } else { require_once './libraries/blowfish.php'; // for main.php: define('PMA_WARN_FOR_MCRYPT',1); } /** * Displays authentication form * * @global string the font face to use * @global string the default font size to use * @global string the big font size to use * @global array the list of servers settings * @global array the list of available translations * @global string the current language * @global integer the current server id * @global string the currect charset for MySQL * @global array the array of cookie variables if register_globals is * off * * @return boolean always true (no return indeed) * * @access public */ function PMA_auth() { global $cfg, $lang, $server, $convcharset, $conn_error; /* Perform logout to custom URL */ if (!empty($_REQUEST['old_usr']) && !empty($GLOBALS['cfg']['Server']['LogoutURL'])) { PMA_sendHeaderLocation($GLOBALS['cfg']['Server']['LogoutURL']); exit; } // Tries to get the username from cookie whatever are the values of the // 'register_globals' and the 'variables_order' directives if last login // should be recalled, else skip the IE autocomplete feature. if ($cfg['LoginCookieRecall'] && !empty($GLOBALS['cfg']['blowfish_secret'])) { // username // do not try to use pma_cookie_username as it was encoded differently // in previous versions and would produce an undefined offset in blowfish if (!empty($_COOKIE) && isset($_COOKIE['pma_cookie_username-' . $server])) { $default_user = $_COOKIE['pma_cookie_username-' . $server]; } $decrypted_user = isset($default_user) ? PMA_blowfish_decrypt($default_user, $GLOBALS['cfg']['blowfish_secret']) : ''; if (!empty($decrypted_user)) { $pos = strrpos($decrypted_user, ':'); $default_user = substr($decrypted_user, 0, $pos); } else { $default_user = ''; } // server name if (!empty($GLOBALS['pma_cookie_servername'])) { $default_server = $GLOBALS['pma_cookie_servername']; } elseif (!empty($_COOKIE) && isset($_COOKIE['pma_cookie_servername-' . $server])) { $default_server = $_COOKIE['pma_cookie_servername-' . $server]; } $autocomplete = ''; } else { $default_user = ''; $autocomplete = ' autocomplete="off"'; } $cell_align = ($GLOBALS['text_dir'] == 'ltr') ? 'left' : 'right'; // Defines the charset to be used header('Content-Type: text/html; charset=' . $GLOBALS['charset']); // Defines the "item" image depending on text direction $item_img = $GLOBALS['pmaThemeImage'] . 'item_ltr.png'; /* HTML header */ $page_title = 'phpMyAdmin ' . PMA_VERSION; require './libraries/header_meta_style.inc.php'; ?>