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; } /* DEBUGGING ONLY - REMOVE WHEN PATCH ACCEPTED $path = ''; $functioncalls = ''; function functioncalls($name, $args, $array) { $GLOBALS['functioncalls'] .= $name . "\n------------------------\n"; foreach($array AS $xkey => $key) { $defvals = explode(':' , $key); $key=$defvals[0]; $val = (isset($args[$xkey]) ? $args[$xkey] : $defvals[1]); if (is_array($val)) { $GLOBALS['functioncalls'] .= $key . "\n"; foreach($val AS $skey => $sval) { if (!is_array($val)) { $GLOBALS['functioncalls'] .= "\t" . $skey . "\n\t\t" . stripslashes(var_export($sval)) . "\n"; } else { $GLOBALS['functioncalls'] .= "\t" . $skey . "\n\t\t[ARRAY]\n"; } } } else { $GLOBALS['functioncalls'] .= $key . "\n\t" . stripslashes(var_export($val, true)) . "\n"; } } $GLOBALS['functioncalls'] .= "\n\n"; return true; } */ function PMA_nestedSetHeaderParent($baseid, $key, $keyhistory, $indent, $indent_level, $val, $childout = true) { /* DEBUGGING ONLY - REMOVE WHEN PATCH ACCEPTED $args = func_get_args(); functioncalls('PMA_nestedSetHeaderParent', $args, array('baseid', 'key','keyhistory','indent','indent_level','val','childout:true')); */ $name = $key; $id = eregi_replace('[^a-z0-9]*', '', $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) { /* DEBUGGING ONLY - REMOVE WHEN PATCH ACCEPTED $args = func_get_args(); functioncalls('PMA_nestedSetHeader', $args, array('baseid', 'tablestack','keyhistory','indent','indent_level','headerOut','firstGroup:false')); */ if ($firstGroup) { PMA_nestedSetHeaderParent($baseid, $firstGroup, $keyhistory, $indent, $indent_level, $tablestack); $indent++; } while(list($key, $val) = each($tablestack)) { 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) { /* DEBUGGING ONLY - REMOVE WHEN PATCH ACCEPTED $args = func_get_args(); functioncalls('PMA_nestedSet', $args, array('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; while(list($tkey, $tval) = each($tablestack['pma_name'])) { echo PMA_indent($indent * 5) . ''; $items = explode("\n", $tablestack['pma_list_item'][$tkey]); while(list($ikey, $ival) = each($items)) { 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.php3" } else { $num_dbs = 0; } // garvin: For re-usability, moved http-headers // to a seperate file. It can now be included by header.inc.php3, // queryframe.php3, querywindow.php3. include('./libraries/header_http.inc.php3'); /** * 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.php3. With no JS (