' . "\n";
}
}
}
if ($firstGroup && $firstGroupClose) {
echo str_repeat(' ', $indent * 4) . '' . "\n";
} elseif ($firstGroup) {
echo str_repeat(' ', $indent * 4) . '' . "\n";
}
}
function PMA_nestedSet($baseid, $tablestack, $key = '__protected__', $keyhistory = '', $headerOut = false, $indent = 1) {
if ($keyhistory == '' && $key != '__protected__') {
$keyhistory = $key;
}
$indent_level = 9;
if (isset($tablestack)
&& isset($tablestack['pma_name'])
&& isset($tablestack['pma_list_item'])) {
if (count($tablestack) > 1 && !empty($key) && isset($tablestack['pma_name']) && isset($tablestack['pma_list_item']) && $indent == 1) {
PMA_nestedSetHeader($baseid, $tablestack, $keyhistory, ($indent+1), $indent_level, $headerOut, $key, false);
$divClose = true;
$extra_indent = 1;
} else {
PMA_nestedSetHeader($baseid, $tablestack, $keyhistory, $indent, $indent_level, $headerOut);
$divClose = false;
$extra_indent = 0;
}
$on_mouse = (($GLOBALS['cfg']['LeftPointerEnable'] == FALSE) ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $keyhistory . $key . '\', \'' . $GLOBALS['cfg']['LeftPointerColor'] . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $keyhistory . $key . '\', \'' . $GLOBALS['cfg']['LeftBgColor'] . '\')}"');
$loops = 0;
foreach ($tablestack['pma_name'] AS $tkey => $tval) {
echo str_repeat(' ', $indent * 5) . '';
$items = explode("\n", $tablestack['pma_list_item'][$tkey]);
foreach ($items AS $ikey => $ival) {
echo "\n";
echo str_repeat(' ', ($indent * 5)) . $ival;
}
echo "\n";
$loops++;
}
if ($divClose) {
echo str_repeat(' ', $indent * 5) . '';
}
} elseif (is_array($tablestack)) {
PMA_nestedSetHeader($baseid, $tablestack, $keyhistory, (($key == '__protected__' && $indent == 1 )? ($indent-1) : ($indent + 1)), $indent_level, $headerOut, (($key == '__protected__' && $indent == 1) || ($indent > 1) ? false : $key));
}
return true;
}
/**
* 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;
}
// garvin: For re-usability, moved http-headers
// to a seperate file. It can now be included by header.inc.php,
// queryframe.php, querywindow.php.
require_once('./libraries/header_http.inc.php');
/**
* Displays the frame
*/
// Gets the font sizes to use
PMA_setFontSizes();
echo ""; // remove vertical scroll bar bug in ie
?>
phpMyAdmin target="phpmain" />
1 || !empty($cfg['LeftFrameTableSeparator'])) && !$cfg['LeftFrameLight']) {
echo "\n";
?>
1)
else if ($num_dbs == 1) {
echo "\n";
?>
';
echo '';
echo '' . "\n";
}
echo '';
} // end of display logo
echo "\n";
if (!$cfg['QueryFrame']) {
echo "\n";
?>
'
. ($cfg['MainPageIconic']
? ''
: '' . $strHome . '')
. '';
// if we have chosen server show logout for advanced authentication
if ($server != 0 && $cfg['Server']['auth_type'] != 'config') {
echo $str_spacer_links;
echo ''
. ($cfg['MainPageIconic']
? ''
: '' . $strLogout . '')
. '';
} // end if
if ($cfg['MainPageIconic']) {
echo ''
. ''
. ''
. '';
echo ''
. ''
. ''
. '';
}
?>
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 (
' . "\n";
}
$table_title[$table] = htmlspecialchars($table);
} // end while (tables list)
if (count($table_title) > 0) {
if ($cfg['NaturalOrder'] && $num_tables > 0) {
natsort($table_title);
}
foreach ($table_title as $each_key => $each_val) {
$table_list .= ' ' . $table_array[$each_key];
}
} else {
$table_list = '
' . "\n"
. '
' . $strNoTablesFound . '
' . "\n";
}
$selected = ' selected="selected"';
$table_list_header .= ' ' . "\n";
$table_list_header .= ' ' . ($db_tooltip != '' && $cfg['ShowTooltipAliasTB'] ? htmlspecialchars($db_tooltip) : htmlspecialchars($db)) . ' ' . "\n\n";
} else {
$selected = '';
} // end if... else...
if (!$cfg['QueryFrame']) {
if (!empty($num_tables)) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
} // end !$cfg['QueryFrame']
} // end if (light mode)
} // end for $i (db list)
// Light mode -> end of the select combo for databases and table list for
// the current database
if ($cfg['LeftFrameLight']) {
if (!$cfg['QueryFrame']) {
echo ' ' . "\n";
echo ' ' . "\n";
echo ' ' . "\n";
}
if (!$table_list) {
$table_list = '
' . $strSelectADb . '
' . "\n";
}
// Displays the current database name and the list of tables it
// contains
if (!$cfg['QueryFrame']) {
echo '';
}
echo $table_list_header;
echo $table_list;
}
// No light mode -> initialize some js variables for the
// expandible/collapsible stuff
else {
?>
1)
// Case where only one database has to be displayed
else if ($num_dbs == 1) {
$db = $dblist[0];
$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 infomation about tables for tooltip
if ($cfg['ShowTooltip'] && PMA_MYSQL_INT_VERSION >= 32303
&& $num_tables) {
$tooltip = array();
$tooltip_name = array();
$result = PMA_DBI_try_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db), NULL, PMA_DBI_QUERY_STORE);
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);
}
}
// Displays the database name
if (!$cfg['LeftFrameLight']) {
$on_mouse = (($cfg['LeftPointerEnable'] == FALSE) ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el2\', \'' . $cfg['LeftPointerColor'] . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el2\', \'' . $cfg['LeftBgColor'] . '\')}"');
echo "\n";
echo '
';
}
echo "\n";
} // end if ($num_dbs == 1)
// Case where no database has to be displayed
else {
echo "\n";
echo '
' . $strNoDatabases . '
';
} // end if ($num_dbs == 0)
echo "\n";
// 2004-08-05 added by Michael Keck
// reload queryframe if it exists and we delete a database
// or select a database from the db_list.
$my_lightm_db = '';
if (isset($lightm_db) && $lightm_db!='') {
$my_lightm_db = $lightm_db;
}
if ($cfg['LeftFrameLight'] && $cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
if (!isset($table_array) || count($table_array)==0) {
$my_url_query = PMA_generate_common_url('', '', '&');
?>