📄 navigation.php
字号:
<?php/* $Id: navigation.php 9802 2006-12-21 01:22:03Z lem9 $ */// vim: expandtab sw=4 ts=4 sts=4:/** * the navigation frame - displays server, db and table selection tree * * @uses $GLOBALS['PMA_List_Database'] * @uses $GLOBALS['server'] * @uses $GLOBALS['db'] * @uses $GLOBALS['table'] * @uses $GLOBALS['available_languages'] * @uses $GLOBALS['lang'] * @uses $GLOBALS['text_dir'] * @uses $GLOBALS['charset'] * @uses $GLOBALS['pmaThemeImage'] * @uses $GLOBALS['strNoDatabases'] * @uses $GLOBALS['strDatabase'] * @uses $GLOBALS['strGo'] * @uses $GLOBALS['strSelectADb'] * @uses $GLOBALS['strNoTablesFound'] * @uses $GLOBALS['cfg']['LeftFrameLight'] * @uses $GLOBALS['cfg']['ShowTooltip'] * @uses $GLOBALS['cfg']['ShowTooltipAliasDB'] * @uses $GLOBALS['cfg']['DefaultTabDatabase'] * @uses $GLOBALS['cfgRelation']['commwork']) { * @uses PMA_List_Database::getSingleItem() * @uses PMA_List_Database::count() * @uses PMA_List_Database::getHtmlSelectGrouped() * @uses PMA_List_Database::getGroupedDetails() * @uses PMA_generate_common_url() * @uses PMA_generate_common_hidden_inputs() * @uses PMA_getComments(); * @uses PMA_getTableCount() * @uses PMA_getTableList() * @uses PMA_getRelationsParam() * @uses PMA_outBufferPre() * @uses session_write_close() * @uses strlen() * @uses session_write_close() * @uses is_array() * @uses implode() * @uses htmlspecialchars() *//** * Gets a core script and starts output buffering work */require_once './libraries/common.lib.php';/** * finish and cleanup navigation.php script execution * * @uses $GLOBALS['controllink'] to close it * @uses $GLOBALS['userlink'] to close it * @uses PMA_outBufferPost() * @uses PMA_DBI_close() * @access private only to be used in navigation.php */function PMA_exitNavigationFrame(){ echo '</body></html>'; /** * Close MySQL connections */ if (isset($GLOBALS['controllink']) && $GLOBALS['controllink']) { @PMA_DBI_close($GLOBALS['controllink']); } if (isset($GLOBALS['userlink']) && $GLOBALS['userlink']) { @PMA_DBI_close($GLOBALS['userlink']); } /** * Sends bufferized data */ PMA_outBufferPost(); exit();}// free the session file, for the other frames to be loadedsession_write_close();/** * the output compression library */require_once './libraries/ob.lib.php';PMA_outBufferPre();/* * selects the database if there is only one on current server */if ($GLOBALS['server'] && ! strlen($GLOBALS['db'])) { $GLOBALS['db'] = $GLOBALS['PMA_List_Database']->getSingleItem();}$db_start = $GLOBALS['db'];/** * the relation library */require_once './libraries/relation.lib.php';$cfgRelation = PMA_getRelationsParam();/** * garvin: For re-usability, moved http-headers to a seperate file. * It can now be included by libraries/header.inc.php, querywindow.php. */require_once './libraries/header_http.inc.php';/* * Displays the frame */// xml declaration moves IE into quirks mode, making much trouble with CSS/* echo '<?xml version="1.0" encoding="' . $GLOBALS['charset'] . '"?>'; */?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][2]; ?>" lang="<?php echo $available_languages[$lang][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>"><head> <link rel="icon" href="./favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" /> <title>phpMyAdmin</title> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /> <base target="frame_content" /> <link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&js_frame=left&nocache=<?php echo $_SESSION['PMA_Config']->getMtime(); ?>" /> <script type="text/javascript" src="js/navigation.js"></script> <script type="text/javascript"> // <![CDATA[ var image_minus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_minus.png'; var image_plus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_plus.png'; // ]]> </script> <?php /* * remove horizontal scroll bar bug in IE 6 by forcing a vertical scroll bar */ ?> <!--[if IE 6]> <style type="text/css"> /* <![CDATA[ */ html { overflow-y: scroll; } /* ]]> */ </style> <![endif]--></head><body id="body_leftFrame" onload="PMA_setFrameSize();" onresize="PMA_saveFrameSize();"><?phprequire './libraries/navigation_header.inc.php';if (! $GLOBALS['server']) { // no server selected PMA_exitNavigationFrame();} elseif (! $GLOBALS['PMA_List_Database']->count()) { // no database available, so we break here echo '<p>' . $GLOBALS['strNoDatabases'] . '</p>'; PMA_exitNavigationFrame();} elseif ($GLOBALS['cfg']['LeftFrameLight'] && $GLOBALS['PMA_List_Database']->count() > 1) { if (!$cfg['DisplayDatabasesList']) { // more than one database available and LeftFrameLight is true // display db selectbox // // Light mode -> beginning of the select combo for databases // Note: When javascript is active, the frameset will be changed from // within navigation.php. With no JS (<noscript>) the whole frameset will // be rebuilt with the new target frame. ?> <div id="databaseList"> <form method="post" action="index.php" target="_parent" id="left"> <label for="lightm_db"><?php echo $GLOBALS['strDatabase']; ?></label> <?php echo PMA_generate_common_hidden_inputs() . "\n"; echo $GLOBALS['PMA_List_Database']->getHtmlSelectGrouped(true) . "\n"; echo '<noscript>' . "\n" .'<input type="submit" name="Go" value="' . $GLOBALS['strGo'] . '" />' . "\n" .'</noscript>' . "\n" .'</form>' . "\n" .'</div>' . "\n"; } else { echo $GLOBALS['PMA_List_Database']->getHtmlListGrouped(true) . "\n"; }}?><div id="left_tableList"><?php// Don't display expansible/collapsible database info if:// 1. $GLOBALS['server'] == 0 (no server selected)// This is the case when there are multiple servers and// '$GLOBALS['cfg']['ServerDefault'] = 0' is set. In that case, we want the welcome// screen to appear with no database info displayed.// 2. there is only one database available (ie either only one database exists// or $GLOBALS['cfg']['Servers']['only_db'] is defined and is not an array)// In this case, the database should not be collapsible/expandable$img_plus = '<img class="icon" id="el%dImg" src="' . $pmaThemeImage . 'b_plus.png"' .' width="9" height="9" alt="+" />';$img_minus = '<img class="icon" id="el%dImg" src="' . $pmaThemeImage . 'b_minus.png"' .' width="9" height="9" alt="-" />';$href_left = '<a onclick="if (toggle(\'%d\')) return false;"' .' href="navigation.php?%s" target="_self">';$element_counter = 0;if ($GLOBALS['cfg']['LeftFrameLight'] && isset($GLOBALS['db']) && strlen($GLOBALS['db'])) { // show selected databasename as link to DefaultTabDatabase-page // with table count in () $common_url_query = PMA_generate_common_url($GLOBALS['db']); $db_tooltip = ''; if ($GLOBALS['cfg']['ShowTooltip'] && $GLOBALS['cfgRelation']['commwork']) { $_db_tooltip = PMA_getComments($GLOBALS['db']); if (is_array($_db_tooltip)) { $db_tooltip = implode(' ', $_db_tooltip); } } $disp_name = $GLOBALS['db']; if ($db_tooltip && $GLOBALS['cfg']['ShowTooltipAliasDB']) { $disp_name = $db_tooltip; $disp_name_cut = $db_tooltip; $db_tooltip = $GLOBALS['db']; } ?> <p><a class="item" href="<?php echo $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $common_url_query; ?>" title="<?php echo htmlspecialchars($db_tooltip); ?>" > <?php if ($GLOBALS['text_dir'] === 'rtl') { echo ' <bdo dir="ltr">(' . PMA_getTableCount($GLOBALS['db']) . ')</bdo> '; } echo htmlspecialchars($disp_name); if ($GLOBALS['text_dir'] === 'ltr') { echo ' <bdo dir="ltr">(' . PMA_getTableCount($GLOBALS['db']) . ')</bdo> '; } echo '</a></p>'; $table_list = PMA_getTableList($GLOBALS['db']); if (count($table_list) > 0) { PMA_displayTableList($table_list, true, '', $GLOBALS['db']); } else { echo $GLOBALS['strNoTablesFound']; } unset($table_list);} elseif ($GLOBALS['cfg']['LeftFrameLight']) { echo '<p>' . $GLOBALS['strSelectADb'] . '</p>' . "\n";} else { $common_url_query = PMA_generate_common_url(); PMA_displayDbList($GLOBALS['PMA_List_Database']->getGroupedDetails());}/** * displays collapsable db list * * @uses $_REQUEST['dbgroup'] * @uses $GLOBALS['cfg']['DefaultTabDatabase'] * @uses $GLOBALS['strSelectADb'] * @uses strpos() * @uses urlencode() * @uses printf() * @uses htmlspecialchars() * @uses PMA_generate_common_url() * @uses PMA_getTableList() * @uses PMA_displayTableList() * @global $element_counter * @global $img_minus * @global $img_plus * @global $href_left * @global $db_start * @global $common_url_query * @param array $ext_dblist extended db list */function PMA_displayDbList($ext_dblist) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -