frames-capable browser.') * @uses $GLOBALS['cfg']['QueryHistoryDB'] * @uses $GLOBALS['cfg']['Server']['user'] * @uses $GLOBALS['cfg']['DefaultTabServer'] as src for the mainframe * @uses $GLOBALS['cfg']['DefaultTabDatabase'] as src for the mainframe * @uses $GLOBALS['cfg']['NaviWidth'] for navi frame width * @uses $GLOBALS['collation_connection'] from $_REQUEST (grab_globals.lib.php) * or common.inc.php * @uses $GLOBALS['available_languages'] from common.inc.php (select_lang.lib.php) * @uses $GLOBALS['db'] * @uses $GLOBALS['charset'] * @uses $GLOBALS['lang'] * @uses $GLOBALS['text_dir'] * @uses $_ENV['HTTP_HOST'] * @uses PMA_getRelationsParam() * @uses PMA_purgeHistory() * @uses PMA_generate_common_url() * @uses PMA_VERSION * @uses session_write_close() * @uses time() * @uses PMA_getenv() * @uses header() to send charset * @package phpMyAdmin */ /** * Gets core libraries and defines some variables */ require_once './libraries/common.inc.php'; /** * Includes the ThemeManager if it hasn't been included yet */ require_once './libraries/relation.lib.php'; // free the session file, for the other frames to be loaded session_write_close(); // Gets the host name if (empty($HTTP_HOST)) { if (PMA_getenv('HTTP_HOST')) { $HTTP_HOST = PMA_getenv('HTTP_HOST'); } else { $HTTP_HOST = ''; } } // purge querywindow history $cfgRelation = PMA_getRelationsParam(); if ($GLOBALS['cfg']['QueryHistoryDB'] && $cfgRelation['historywork']) { PMA_purgeHistory($GLOBALS['cfg']['Server']['user']); } unset($cfgRelation); /** * pass variables to child pages */ $drops = array('lang', 'server', 'convcharset', 'collation_connection', 'db', 'table'); foreach ($drops as $each_drop) { if (array_key_exists($each_drop, $_GET)) { unset($_GET[$each_drop]); } } unset($drops, $each_drop); if (! strlen($GLOBALS['db'])) { $main_target = $GLOBALS['cfg']['DefaultTabServer']; } elseif (! strlen($GLOBALS['table'])) { $_GET['db'] = $GLOBALS['db']; $main_target = $GLOBALS['cfg']['DefaultTabDatabase']; } else { $_GET['db'] = $GLOBALS['db']; $_GET['table'] = $GLOBALS['table']; $main_target = $GLOBALS['cfg']['DefaultTabTable']; } $url_query = PMA_generate_common_url($_GET); if (isset($GLOBALS['target']) && is_string($GLOBALS['target']) && !empty($GLOBALS['target']) && in_array($GLOBALS['target'], $goto_whitelist)) { $main_target = $GLOBALS['target']; } $main_target .= $url_query; $lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1]; // start output header('Content-Type: text/html; charset=' . $GLOBALS['charset']); ?>