phpMyAdmin - администрирование СУБД MySQL // /* $Id: index.php,v 2.14 2004/10/19 17:23:09 nijel Exp $ */ // vim: expandtab sw=4 ts=4 sts=4: /** * Gets core libraries and defines some variables */ require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); /** * Includes the ThemeManager if it hasn't been included yet */ require_once('./libraries/select_theme.lib.php'); /** * Saves collation_connection (coming from main.php) in a cookie */ // (from grab_globals) if (isset($collation_connection)) { if (!isset($pma_uri_parts)) { $pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']); $cookie_path = substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/')); $is_https = (isset($pma_uri_parts['scheme']) && $pma_uri_parts['scheme'] == 'https') ? 1 : 0; } setcookie('pma_collation_connection', $collation_connection, time() + 60*60*24*30, $cookie_path, '', $is_https); } // Gets the default font sizes PMA_setFontSizes(); // Gets the host name // loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+ if (empty($HTTP_HOST)) { if (!empty($_ENV) && isset($_ENV['HTTP_HOST'])) { $HTTP_HOST = $_ENV['HTTP_HOST']; } else if (@getenv('HTTP_HOST')) { $HTTP_HOST = getenv('HTTP_HOST'); } else { $HTTP_HOST = ''; } } /** * Defines the frameset */ // loic1: If left light mode -> urldecode the db name if (isset($lightm_db)) { // no longer urlencoded because of html entities in the db name // $db = urldecode($lightm_db); $db = $lightm_db; unset($lightm_db); } $url_query = PMA_generate_common_url(isset($db) ? $db : ''); header('Content-Type: text/html; charset=' . $GLOBALS['charset']); require_once('./libraries/relation.lib.php'); $cfgRelation = PMA_getRelationsParam(); if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) { PMA_purgeHistory($cfg['Server']['user']); } $phpmain_hash = md5($cfg['PmaAbsoluteUri']); $phpmain_hash_js = time(); ?>