📄 queryframe.php
字号:
. ' </a>' . "\n";}?></div><hr id="hr_second" /><?phpif ($cfg['LeftDisplayServers']){ $show_server_left = TRUE; include('./libraries/select_server.lib.php');} // end if LeftDisplayServers?><!-- Databases list --><?php/** * Get the list and number of available databases. * Skipped if no server selected: in this case no database should be displayed * before the user choose among available ones at the welcome screen. */if ($server > 0) { PMA_availableDatabases(); // this function is defined in "common.lib.php"} else { $num_dbs = 0;}// Don't display expansible/collapsible database info if:// 1. $server == 0 (no server selected)// This is the case when there are multiple servers and// '$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 $cfg['Servers']['only_db'] is defined and is not an array)// In this case, the database should not be collapsible/expandableif ($num_dbs > 1) { // Light mode -> beginning of the select combo for databases // Note: When javascript is active, the frameset will be changed from // within left.php. With no JS (<noscript>) the whole frameset will // be rebuilt with the new target frame. if ($cfg['LeftFrameLight']) { ?> <table border="0" cellpadding="1" cellspacing="0"> <tr> <td align="left" class="heada"><?php echo $strDatabase; ?>:</td> </tr> <tr> <td nowrap="nowrap"> <form method="post" action="index.php" name="left" target="_parent" style="margin: 0px; padding: 0px;"> <script type="text/javascript" language="javascript"> <!-- document.left.action="left.php"; document.left.target="nav"; //--> </script> <?php echo PMA_generate_common_hidden_inputs(); echo ' <input type="hidden" name="hash" value="' . $hash . '" />' . "\n"; ?> <select name="lightm_db" onchange="remove_focus_select();this.form.submit();"> <?php echo ' <option value="">(' . $strDatabases . ') ...</option>' . "\n"; $table_list = ''; $table_list_header = ''; $db_name = ''; $selected_db = 0; // natural order for db list; but do not sort if user asked // for a specific order with the 'only_db' mechanism // TODO: merge this logic with the one in left.php if (!is_array($cfg['Server']['only_db']) && $cfg['NaturalOrder'] && $num_dbs > 0) { $dblist_temp = $dblist; natsort($dblist_temp); $i = 0; foreach ($dblist_temp as $each) { $dblist[$i] = $each; $i++; } } $parent = ''; // Gets the tables list per database for ($i = 0; $i < $num_dbs; $i++) { $db = $dblist[$i]; $j = $i + 2; if (!empty($db_start) && $db == $db_start) { $selected_db = $j; } $tables = PMA_DBI_try_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', NULL, PMA_DBI_QUERY_STORE); $num_tables = ($tables) ? @PMA_DBI_num_rows($tables) : 0; $common_url_query = PMA_generate_common_url($db); if ($num_tables) { $num_tables_disp = $num_tables; } else { $num_tables_disp = '-'; } // Get additional information about tables for tooltip if ($cfg['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303 && $num_tables && (!$cfg['LeftFrameLight'] || $selected_db == $j)) { $tooltip = array(); $tooltip_name = array(); $result = PMA_DBI_try_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db)); while ($tmp = PMA_DBI_fetch_assoc($result)) { $tooltip_name[$tmp['Name']] = (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : ''); $tmp['Comment'] = ($cfg['ShowTooltipAliasTB'] && $cfg['ShowTooltipAliasTB'] !== 'nested' ? $tmp['Name'] : $tmp['Comment']); $tooltip[$tmp['Name']] = (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '') . '(' . (isset($tmp['Rows']) ? $tmp['Rows'] : '0') . ' ' . $strRows . ')'; } // end while } // end if // garvin: Get comments from PMA comments table $db_tooltip = ''; if ($cfg['ShowTooltip'] && $cfgRelation['commwork']) { $tmp_db_tooltip = PMA_getComments($db); if (is_array($tmp_db_tooltip)) { $db_tooltip = implode(' ', $tmp_db_tooltip); } } // Builds the databases' names list if (!empty($db_start) && $db == $db_start) { $table_title = array(); $table_array = array(); // Gets the list of tables from the current database while (list($table) = PMA_DBI_fetch_row($tables)) { $table_array[$table] = ''; $url_title = (!empty($tooltip) && isset($tooltip[$table])) ? htmlspecialchars($tooltip[$table]) : ''; $alias = (!empty($tooltip_name) && isset($tooltip_name[$table])) ? htmlspecialchars($tooltip_name[$table]) : ''; $book_sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label'); } // end while (tables list) $selected = ' selected="selected"'; } else { $selected = ''; } // end if... else... $db_disp = $db; if ($cfg['LeftFrameDBTree']) { if ($i == 0) { $parts = explode($cfg['LeftFrameDBSeparator'],$db,2); } else { $parts = $next_parts; } if ($i == $num_dbs - 1) { $next_parts = array(); } else { $next_parts = explode($cfg['LeftFrameDBSeparator'],$dblist[$i+1],2); } if (count($next_parts) > 1 && $parts[0] == $next_parts[0] && $parent != $parts[0]) { echo ' ' . '<optgroup label="'.htmlspecialchars($parts[0]).'">'."\n"; $parent = $parts[0]; } if (count($parts) > 1 && $parent == $parts[0]) { $db_disp = $cfg['LeftFrameDBSeparator'] . $parts[1]; } } if (!empty($num_tables)) { echo ' ' . '<option value="' . htmlspecialchars($db) . '"' . $selected . '>' . ($db_tooltip != '' && $cfg['ShowTooltipAliasDB'] ? htmlspecialchars($db_tooltip) : htmlspecialchars($db_disp)) . ' (' . $num_tables . ')</option>' . "\n"; } else { echo ' ' . '<option value="' . htmlspecialchars($db) . '"' . $selected . '>' . ($db_tooltip != '' && $cfg['ShowTooltipAliasDB'] ? htmlspecialchars($db_tooltip) : htmlspecialchars($db_disp)) . ' (-)</option>' . "\n"; } // end if... else... if ($cfg['LeftFrameDBTree']) { if (!empty($parent) && (count($next_parts) == 0 || $parent != $next_parts[0])) { echo ' ' . '</optgroup>'."\n"; $parent = ''; } } } // end for $i (db list) ?> </select> <noscript> <input type="submit" name="Go" value="<?php echo $strGo; ?>" /> </noscript> </form> </td> </tr> </table> <hr id="hr_third" /> <?php } // end if LeftFrameLight} // end if num_db > 1 ?> <form name="queryframeform" action="queryframe.php" method="get" style="margin:0px; padding:0px; display:none;"> <input type="hidden" name="db" value="" /> <input type="hidden" name="table" value="" /> <input type="hidden" name="framename" value="queryframe" /> </form> <form name="hashform" action="queryframe.php" style="margin:0px; padding:0px; display:none;"> <input type="hidden" name="hash" value="<?php echo $hash; ?>" /> </form> </div></body></html><?php/** * Close MySql connections */if (isset($dbh) && $dbh) { @PMA_DBI_close($dbh);}if (isset($userlink) && $userlink) { @PMA_DBI_close($userlink);}/** * Sends bufferized data */if (isset($cfg['OBGzip']) && $cfg['OBGzip'] && isset($ob_mode) && $ob_mode) { PMA_outBufferPost($ob_mode);}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -