and | // | Dan Wilson who built this patch for the Debian package. | // +--------------------------------------------------------------------------+ if (!isset($coming_from_common)) { exit; } // Gets the default font sizes PMA_setFontSizes(); // timestamp for login timeout $current_time = time(); // Uses faster mcrypt library if available // (Note: mcrypt.lib.php needs $cookie_path and $is_https) // TODO: try to load mcrypt? if (function_exists('mcrypt_encrypt')) { require_once('./libraries/mcrypt.lib.php'); } else { require_once('./libraries/blowfish.php'); } /** * Sorts available languages by their true names * * @param array the array to be sorted * @param mixed a required parameter * * @return the sorted array * * @access private */ function PMA_cookie_cmp(&$a, $b) { return (strcmp($a[1], $b[1])); } // end of the 'PMA_cmp()' function /** * 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 $right_font_family, $font_size, $font_bigger; global $cfg, $available_languages; global $lang, $server, $convcharset; global $conn_error; // 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']; } else if (!empty($_COOKIE) && isset($_COOKIE['pma_cookie_servername-' . $server])) { $default_server = $_COOKIE['pma_cookie_servername-' . $server]; } if (isset($default_server) && get_magic_quotes_gpc()) { $default_server = stripslashes($default_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']); require_once('./libraries/select_theme.lib.php'); // 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'); ?>