0) { $max = $GLOBALS['cfg']['LeftFrameTableLevel']; $temp_table = $_table; $new_table = array(); $last_index = 0; for ($ti = 0; $ti < $max; $ti++) { if (isset($temp_table[$ti])) { $new_table[$ti] = $temp_table[$ti]; unset($temp_table[$ti]); $last_index = $ti; } } $_table = $new_table; } return $_table; } function PMA_indent($spaces) { $string = ''; for ($i = 0; $i <= $spaces; $i++) { $string .= ' '; } return $string; } function PMA_nestedSetHeaderParent($baseid, $key, $keyhistory, $indent, $indent_level, $val, $childout = true) { $name = $key; $id = preg_replace('@[^a-z0-9]*@i', '', $baseid . $keyhistory . $key) . $indent; $on_mouse = (($GLOBALS['cfg']['LeftPointerColor'] == '') ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $id . '\', \'' . $GLOBALS['cfg']['LeftPointerColor'] . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $id . '\', \'' . $GLOBALS['cfg']['LeftBgColor'] . '\')}"'); $countarray = $val; if (count($countarray) == 2 && isset($countarray['pma_name']) && isset($countarray['pma_list_item'])) { $counter = count($countarray['pma_name']); } else { unset($countarray['pma_name']); if (count($countarray) > 1) { unset($countarray['pma_list_item']); } $counter = count($countarray); } echo "\n"; echo PMA_indent($indent * 5) . '
' . "\n"; echo PMA_indent($indent * 6) . ''; echo '+' . "\n"; echo PMA_indent($indent * 6) . '' . htmlspecialchars($name) . '  (' . $counter . ')' . "\n"; echo PMA_indent($indent * 5) . '
' . "\n"; echo "\n"; if ($childout) { echo PMA_indent($indent * 5) . '
' . "\n"; } } function PMA_nestedSetHeader($baseid, $tablestack, $keyhistory, $indent, $indent_level, $headerOut, $firstGroup = false, $firstGroupClose = true) { if ($firstGroup) { PMA_nestedSetHeaderParent($baseid, $firstGroup, $keyhistory, $indent, $indent_level, $tablestack); $indent++; } foreach($tablestack AS $key => $val) { if ($key != 'pma_name' && $key != 'pma_list_item') { if ($headerOut) { PMA_nestedSetHeaderParent($baseid, $key, $keyhistory, $indent, $indent_level, $val); } if (isset($val['pma_name']) && isset($val['pma_list_item']) && count($val) == 2) { PMA_nestedSet($baseid, $val, $key, $keyhistory . $key, false, ($indent + 1)); } else { PMA_nestedSet($baseid, $val, $key, $keyhistory . $key, true, ($indent + 1)); } if ($headerOut) { echo PMA_indent($indent * 5) . '
' . "\n"; } } } if ($firstGroup && $firstGroupClose) { echo PMA_indent($indent * 4) . '' . "\n"; } elseif ($firstGroup) { echo PMA_indent($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']['LeftPointerColor'] == '') ? '' : ' 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 PMA_indent($indent * 5) . ''; $items = explode("\n", $tablestack['pma_list_item'][$tkey]); foreach($items AS $ikey => $ival) { echo "\n"; echo PMA_indent(($indent * 5)) . $ival; } echo "\n"; $loops++; } if ($divClose) { echo PMA_indent($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(); ?> phpMyAdmin target="phpmain" /> 1 || !empty($cfg['LeftFrameTableSeparator'])) && !$cfg['LeftFrameLight']) { echo "\n"; ?> 1) else if ($num_dbs == 1) { echo "\n"; ?> phpMyAdmin
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 (