start QA_11
[phpmyadmin/crack.git] / navigation.php
blob9bd89fc062e8bdb474b97f8508770b9e7da18958
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * the navigation frame - displays server, db and table selection tree
6 * @version $Id$
7 * @uses $GLOBALS['PMA_List_Database']
8 * @uses $GLOBALS['server']
9 * @uses $GLOBALS['db']
10 * @uses $GLOBALS['table']
11 * @uses $GLOBALS['available_languages']
12 * @uses $GLOBALS['lang']
13 * @uses $GLOBALS['text_dir']
14 * @uses $GLOBALS['charset']
15 * @uses $GLOBALS['pmaThemeImage']
16 * @uses $GLOBALS['strNoDatabases']
17 * @uses $GLOBALS['strDatabase']
18 * @uses $GLOBALS['strGo']
19 * @uses $GLOBALS['strSelectADb']
20 * @uses $GLOBALS['strNoTablesFound']
21 * @uses $GLOBALS['cfg']['LeftFrameLight']
22 * @uses $GLOBALS['cfg']['ShowTooltip']
23 * @uses $GLOBALS['cfg']['ShowTooltipAliasDB']
24 * @uses $GLOBALS['cfg']['DefaultTabDatabase']
25 * @uses $GLOBALS['cfgRelation']['commwork']) {
26 * @uses PMA_List_Database::getSingleItem()
27 * @uses PMA_List_Database::count()
28 * @uses PMA_List_Database::getHtmlSelectGrouped()
29 * @uses PMA_List_Database::getGroupedDetails()
30 * @uses PMA_generate_common_url()
31 * @uses PMA_generate_common_hidden_inputs()
32 * @uses PMA_getComments();
33 * @uses PMA_getTableCount()
34 * @uses PMA_getTableList()
35 * @uses PMA_getRelationsParam()
36 * @uses PMA_outBufferPre()
37 * @uses session_write_close()
38 * @uses strlen()
39 * @uses session_write_close()
40 * @uses is_array()
41 * @uses implode()
42 * @uses htmlspecialchars()
45 /**
46 * Gets a core script and starts output buffering work
48 require_once './libraries/common.inc.php';
50 /**
51 * finish and cleanup navigation.php script execution
53 * @uses $GLOBALS['controllink'] to close it
54 * @uses $GLOBALS['userlink'] to close it
55 * @uses PMA_DBI_close()
56 * @access private only to be used in navigation.php
58 function PMA_exitNavigationFrame()
60 echo '</body></html>';
62 /**
63 * Close MySQL connections
65 if (isset($GLOBALS['controllink']) && $GLOBALS['controllink']) {
66 @PMA_DBI_close($GLOBALS['controllink']);
68 if (isset($GLOBALS['userlink']) && $GLOBALS['userlink']) {
69 @PMA_DBI_close($GLOBALS['userlink']);
72 exit;
75 // keep the offset of the db list in session before closing it
76 if (! isset($_SESSION['navi_limit_offset'])) {
77 $_SESSION['navi_limit_offset'] = 0;
79 if (isset($_REQUEST['pos'])) {
80 $_SESSION['navi_limit_offset'] = (int) $_REQUEST['pos'];
82 $pos = $_SESSION['navi_limit_offset'];
84 // free the session file, for the other frames to be loaded
85 session_write_close();
87 /**
88 * the output compression library
90 require_once './libraries/ob.lib.php';
92 PMA_outBufferPre();
95 * selects the database if there is only one on current server
97 if ($GLOBALS['server'] && ! strlen($GLOBALS['db'])) {
98 $GLOBALS['db'] = $GLOBALS['PMA_List_Database']->getSingleItem();
101 $db_start = $GLOBALS['db'];
104 * the relation library
106 require_once './libraries/relation.lib.php';
107 $cfgRelation = PMA_getRelationsParam();
110 * garvin: For re-usability, moved http-headers to a seperate file.
111 * It can now be included by libraries/header.inc.php, querywindow.php.
113 require_once './libraries/header_http.inc.php';
115 if (! isset($_SESSION['navi_limit_offset'])) {
116 $_SESSION['navi_limit_offset'] = 0;
118 if (isset($_REQUEST['pos'])) {
119 $_SESSION['navi_limit_offset'] = (int) $_REQUEST['pos'];
121 $pos = $_SESSION['navi_limit_offset'];
124 * Displays the frame
126 // xml declaration moves IE into quirks mode, making much trouble with CSS
127 /* echo '<?xml version="1.0" encoding="' . $GLOBALS['charset'] . '"?>'; */
129 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
130 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
131 <html xmlns="http://www.w3.org/1999/xhtml"
132 xml:lang="<?php echo $available_languages[$lang][2]; ?>"
133 lang="<?php echo $available_languages[$lang][2]; ?>"
134 dir="<?php echo $GLOBALS['text_dir']; ?>">
136 <head>
137 <link rel="icon" href="./favicon.ico" type="image/x-icon" />
138 <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
139 <title>phpMyAdmin</title>
140 <meta http-equiv="Content-Type"
141 content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" />
142 <base target="frame_content" />
143 <link rel="stylesheet" type="text/css"
144 href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=left&amp;nocache=<?php echo $_SESSION['PMA_Config']->getMtime(); ?>" />
145 <script type="text/javascript" src="js/navigation.js"></script>
146 <script type="text/javascript" src="js/functions.js"></script>
147 <script type="text/javascript">
148 // <![CDATA[
149 var image_minus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_minus.png';
150 var image_plus = '<?php echo $GLOBALS['pmaThemeImage']; ?>b_plus.png';
151 // ]]>
152 </script>
153 <?php
155 * remove horizontal scroll bar bug in IE 6 by forcing a vertical scroll bar
158 <!--[if IE 6]>
159 <style type="text/css">
160 /* <![CDATA[ */
161 html {
162 overflow-y: scroll;
164 /* ]]> */
165 </style>
166 <![endif]-->
167 </head>
169 <body id="body_leftFrame" onload="PMA_setFrameSize();" onresize="PMA_saveFrameSize();">
170 <?php
171 require './libraries/navigation_header.inc.php';
172 if (! $GLOBALS['server']) {
173 // no server selected
174 PMA_exitNavigationFrame();
175 } elseif (! $GLOBALS['PMA_List_Database']->count()) {
176 // no database available, so we break here
177 echo '<p>' . $GLOBALS['strNoDatabases'] . '</p>';
178 PMA_exitNavigationFrame();
179 } elseif ($GLOBALS['cfg']['LeftFrameLight'] && $GLOBALS['PMA_List_Database']->count() > 1) {
180 $list = $cfg['DisplayDatabasesList'];
181 if ($list === 'auto') {
182 if (empty($GLOBALS['db'])) {
183 $list = true;
184 } else {
185 $list = false;
188 if (!$list) {
189 // more than one database available and LeftFrameLight is true
190 // display db selectbox
192 // Light mode -> beginning of the select combo for databases
193 // Note: When javascript is active, the frameset will be changed from
194 // within navigation.php. With no JS (<noscript>) the whole frameset will
195 // be rebuilt with the new target frame.
198 <div id="databaseList">
199 <form method="post" action="index.php" target="_parent" id="left">
200 <label for="lightm_db"><?php echo $GLOBALS['strDatabase']; ?></label>
201 <?php
202 echo PMA_generate_common_hidden_inputs() . "\n";
203 echo $GLOBALS['PMA_List_Database']->getHtmlSelectGrouped(true, $_SESSION['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n";
204 echo '<noscript>' . "\n"
205 .'<input type="submit" name="Go" value="' . $GLOBALS['strGo'] . '" />' . "\n"
206 .'</noscript>' . "\n"
207 .'</form>' . "\n";
208 } else {
209 if (! empty($db)) {
210 echo '<div id="databaseList">' . "\n";
212 echo $GLOBALS['PMA_List_Database']->getHtmlListGrouped(true, $_SESSION['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n";
214 $_url_params = array('pos' => $pos);
215 PMA_listNavigator($GLOBALS['PMA_List_Database']->count(), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
216 if (! empty($db)) {
217 echo '</div>' . "\n";
222 <div id="left_tableList">
223 <?php
224 // Don't display expansible/collapsible database info if:
225 // 1. $GLOBALS['server'] == 0 (no server selected)
226 // This is the case when there are multiple servers and
227 // '$GLOBALS['cfg']['ServerDefault'] = 0' is set. In that case, we want the welcome
228 // screen to appear with no database info displayed.
229 // 2. there is only one database available (ie either only one database exists
230 // or $GLOBALS['cfg']['Servers']['only_db'] is defined and is not an array)
231 // In this case, the database should not be collapsible/expandable
233 $img_plus = '<img class="icon" id="el%dImg" src="' . $pmaThemeImage . 'b_plus.png"'
234 .' width="9" height="9" alt="+" />';
235 $img_minus = '<img class="icon" id="el%dImg" src="' . $pmaThemeImage . 'b_minus.png"'
236 .' width="9" height="9" alt="-" />';
238 $href_left = '<a onclick="if (toggle(\'%d\')) return false;"'
239 .' href="navigation.php?%s" target="_self">';
241 $element_counter = 0;
243 if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
244 // show selected databasename as link to DefaultTabDatabase-page
245 // with table count in ()
246 $common_url_query = PMA_generate_common_url($GLOBALS['db']);
248 $db_tooltip = '';
250 if ($GLOBALS['cfg']['ShowTooltip']
251 && $GLOBALS['cfgRelation']['commwork']) {
252 $_db_tooltip = PMA_getComments($GLOBALS['db']);
253 if (is_array($_db_tooltip)) {
254 $db_tooltip = implode(' ', $_db_tooltip);
258 $disp_name = $GLOBALS['db'];
259 if ($db_tooltip && $GLOBALS['cfg']['ShowTooltipAliasDB']) {
260 $disp_name = $db_tooltip;
261 $disp_name_cut = $db_tooltip;
262 $db_tooltip = $GLOBALS['db'];
266 <p><a class="item"
267 href="<?php echo $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . $common_url_query; ?>"
268 title="<?php echo htmlspecialchars($db_tooltip); ?>" >
269 <?php
270 if ($GLOBALS['text_dir'] === 'rtl') {
271 echo ' <bdo dir="ltr">(' . PMA_getTableCount($GLOBALS['db']) . ')</bdo> ';
273 echo htmlspecialchars($disp_name);
274 if ($GLOBALS['text_dir'] === 'ltr') {
275 echo ' <bdo dir="ltr">(' . PMA_getTableCount($GLOBALS['db']) . ')</bdo> ';
277 echo '</a></p>';
280 * This helps reducing the navi panel size; in the right panel,
281 * user can find a navigator to page thru all tables.
283 * @todo instead of the 0 parameter, keep track of the
284 * offset in the list of tables ($_SESSION['navi_table_limit_offset'])
285 * and use PMA_listNavigator(); do not just check pos in REQUEST
286 * but add another hidden param to see if it's the pos of databases
287 * or the pos of tables.
289 $table_list = PMA_getTableList($GLOBALS['db'], null, 0, $cfg['MaxTableList']);
290 $count_table_list = count($table_list);
291 if ($count_table_list > 0) {
292 PMA_displayTableList($table_list, true, '', $GLOBALS['db']);
293 // hint user that the table list is larger, until the todo is done
294 if ($count_table_list == $GLOBALS['cfg']['MaxTableList']) {
295 echo '&nbsp; ( 1 .. ', $GLOBALS['cfg']['MaxTableList'], ' / ', PMA_getTableCount($GLOBALS['db']), ' )';
297 } else {
298 echo $GLOBALS['strNoTablesFound'];
300 unset($table_list, $count_table_list);
301 } elseif ($GLOBALS['cfg']['LeftFrameLight']) {
302 echo '<p>' . $GLOBALS['strSelectADb'] . '</p>' . "\n";
303 } else {
304 echo '<div id="databaseList">' . "\n";
305 $_url_params = array('pos' => $pos);
306 PMA_listNavigator($GLOBALS['PMA_List_Database']->count(), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
307 echo '</div>' . "\n";
309 $common_url_query = PMA_generate_common_url();
310 PMA_displayDbList($GLOBALS['PMA_List_Database']->getGroupedDetails($_SESSION['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']), $_SESSION['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']);
314 * displays collapsable db list
316 * @uses $_REQUEST['dbgroup']
317 * @uses $GLOBALS['cfg']['DefaultTabDatabase']
318 * @uses $GLOBALS['strSelectADb']
319 * @uses strpos()
320 * @uses urlencode()
321 * @uses printf()
322 * @uses htmlspecialchars()
323 * @uses PMA_generate_common_url()
324 * @uses PMA_getTableList()
325 * @uses PMA_displayTableList()
326 * @global $element_counter
327 * @global $img_minus
328 * @global $img_plus
329 * @global $href_left
330 * @global $db_start
331 * @global $common_url_query
332 * @param array $ext_dblist extended db list
333 * @param integer $offset
334 * @param integer $count
336 function PMA_displayDbList($ext_dblist, $offset, $count) {
337 global $element_counter, $img_minus, $img_plus, $href_left,
338 $db_start, $common_url_query;
340 // get table list, for all databases
341 // doing this in one step takes advantage of a single query with information_schema!
342 $tables_full = PMA_DBI_get_tables_full($GLOBALS['PMA_List_Database']->getLimitedItems($offset, $count));
344 $url_dbgroup = '';
345 echo '<ul id="leftdatabaselist">';
346 $close_db_group = false;
347 foreach ($ext_dblist as $group => $db_group) {
348 if ($GLOBALS['PMA_List_Database']->count() > 1) {
349 if ($close_db_group) {
350 $url_dbgroup = '';
351 echo '</ul>';
352 echo '</li>';
353 $close_db_group = false;
355 if (count($db_group) > 1) {
356 $close_db_group = true;
357 $url_dbgroup = '&amp;dbgroup=' . urlencode($group);
358 $common_url_query = PMA_generate_common_url() . $url_dbgroup;
359 $element_counter++;
360 echo '<li class="dbgroup">';
361 if ((! empty($_REQUEST['dbgroup']) && $_REQUEST['dbgroup'] == $group)
362 || $db_start == $group || strpos($db_start, $group) === 0) {
363 // display + only if this db(group) is not preselected
364 printf($href_left, $element_counter, PMA_generate_common_url());
365 printf($img_minus, $element_counter);
366 } else {
367 printf($href_left, $element_counter, $common_url_query);
368 printf($img_plus, $element_counter);
370 echo '</a> ' . $group . "\n";
371 if ((! empty($_REQUEST['dbgroup']) && $_REQUEST['dbgroup'] == $group)
372 || $db_start == $group || strpos($db_start, $group) === 0) {
373 echo '<ul id="subel' . $element_counter . '">' . "\n";
374 } else {
375 echo '<ul id="subel' . $element_counter . '"'
376 .' style="display: none">' . "\n";
380 foreach ($db_group as $db) {
381 $common_url_query = PMA_generate_common_url($db['name']) . $url_dbgroup;
383 $element_counter++;
384 // Displays the database name
385 echo '<li>' . "\n";
387 if ($GLOBALS['PMA_List_Database']->count() > 1) {
388 // only with more than one db we need collapse ...
389 if ($db_start != $db['name'] || $db['num_tables'] < 1) {
390 // display + only if this db is not preselected
391 // or table count is 0
392 printf($href_left, $element_counter, $common_url_query);
393 printf($img_plus, $element_counter);
394 } else {
395 printf($href_left, $element_counter,
396 PMA_generate_common_url() . $url_dbgroup);
397 printf($img_minus, $element_counter);
399 echo '</a>';
401 // ... and we need to refresh both frames on db selection
403 <a class="item"
404 id="<?php echo htmlspecialchars($db['name']); ?>"
405 href="index.php?<?php echo $common_url_query; ?>"
406 target="_parent"
407 title="<?php echo htmlspecialchars($db['comment']); ?>"
408 onclick="
409 if (! toggle('<?php echo $element_counter; ?>', true))
410 window.parent.goTo('./navigation.php?<?php echo $common_url_query; ?>');
411 window.parent.goTo('./<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
412 . '?' . $common_url_query; ?>', 'main');
413 return false;">
414 <?php
415 if ($GLOBALS['text_dir'] === 'rtl') {
416 echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
418 echo htmlspecialchars($db['disp_name']);
419 if ($GLOBALS['text_dir'] === 'ltr') {
420 echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
423 </a>
424 <?php
425 } else {
426 // with only 1 db available we dont need to refresh left frame
427 // on db selection, only phpmain
429 <a href="<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
430 . '?' . $common_url_query; ?>"
431 id="<?php echo htmlspecialchars($db['name']); ?>"
432 title="<?php echo htmlspecialchars($db['comment']); ?>">
433 <?php
434 if ($GLOBALS['text_dir'] === 'rtl') {
435 echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
437 echo htmlspecialchars($db['disp_name']);
438 if ($GLOBALS['text_dir'] === 'ltr') {
439 echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
442 </a>
443 <?php
445 if ($db['num_tables']) {
446 if (isset($tables_full[$db['name']])) {
447 $tables = PMA_getTableList($db['name'], $tables_full[$db['name']]);
448 } elseif (isset($tables_full[strtolower($db['name'])])) {
449 // on windows with lower_case_table_names = 1
450 // MySQL returns
451 // with SHOW DATABASES or information_schema.SCHEMATA: `Test`
452 // but information_schema.TABLES gives `test`
453 // bug #1436171
454 // sf.net/tracker/?func=detail&aid=1436171&group_id=23067&atid=377408
455 $tables = PMA_getTableList($db['name'], $tables_full[strtolower($db['name'])]);
456 } else {
457 $tables = PMA_getTableList($db['name']);
459 $child_visible =
460 (bool) ($GLOBALS['PMA_List_Database']->count() === 1 || $db_start == $db['name']);
461 PMA_displayTableList($tables, $child_visible, '', $db['name']);
462 } elseif ($GLOBALS['cfg']['LeftFrameLight']) {
463 // no tables and LeftFrameLight:
464 // display message no tables in selected db
465 echo '<p>' . $GLOBALS['strSelectADb'] . '</p>' . "\n";
467 echo '</li>' . "\n";
468 } // end foreach db
469 } // end foreach group
471 if ($close_db_group) {
472 $url_dbgroup = '';
473 echo '</ul>';
474 echo '</li>';
475 $close_db_group = false;
478 echo '</ul>' . "\n";
482 * display unordered list of tables
483 * calls itself recursively if table in given list
484 * is a list itself
486 * @uses is_array()
487 * @uses count()
488 * @uses urlencode()
489 * @uses strpos()
490 * @uses printf()
491 * @uses htmlspecialchars()
492 * @uses strlen()
493 * @uses is_array()
494 * @uses PMA_displayTableList()
495 * @uses $_REQUEST['tbl_group']
496 * @uses $GLOBALS['common_url_query']
497 * @uses $GLOBALS['table']
498 * @uses $GLOBALS['pmaThemeImage']
499 * @uses $GLOBALS['cfg']['LeftFrameTableSeparator']
500 * @uses $GLOBALS['cfg']['DefaultTabDatabase']
501 * @uses $GLOBALS['cfg']['DefaultTabTable']
502 * @uses $GLOBALS['strRows']
503 * @uses $GLOBALS['strBrowse']
504 * @global integer the element counter
505 * @global string html code for '-' image
506 * @global string html code for '+' image
507 * @global string html code for self link
508 * @param array $tables array of tables/tablegroups
509 * @param boolean $visible wether the list is visible or not
510 * @param string $tab_group_full full tab group name
511 * @param string $table_db db of this table
513 function PMA_displayTableList($tables, $visible = false,
514 $tab_group_full = '', $table_db = '')
516 if (! is_array($tables) || count($tables) === 0) {
517 return;
520 global $element_counter, $img_minus, $img_plus, $href_left;
521 $sep = $GLOBALS['cfg']['LeftFrameTableSeparator'];
523 if ($visible) {
524 echo '<ul id="subel' . $element_counter . '">';
525 } else {
526 echo '<ul id="subel' . $element_counter . '" style="display: none">';
528 foreach ($tables as $group => $table) {
529 if (isset($table['is' . $sep . 'group'])) {
530 $common_url_query = $GLOBALS['common_url_query']
531 . '&amp;tbl_group=' . urlencode($tab_group_full . $group);
533 $element_counter++;
534 echo '<li>' . "\n";
535 if ($visible
536 && ((isset($_REQUEST['tbl_group'])
537 && (strpos($_REQUEST['tbl_group'], $group) === 0
538 || strpos($_REQUEST['tbl_group'], $sep . $group) !== false))
539 || strpos($GLOBALS['table'], $group) === 0)) {
540 printf($href_left, $element_counter,
541 $GLOBALS['common_url_query'] . '&amp;tbl_group=' . $tab_group_full);
542 printf($img_minus, $element_counter);
543 } else {
544 printf($href_left, $element_counter, $common_url_query);
545 printf($img_plus, $element_counter);
547 echo '</a>';
549 <a href="index.php?<?php echo $common_url_query; ?>"
550 target="_parent"
551 onclick="
552 if (! toggle('<?php echo $element_counter; ?>', true))
553 window.parent.goTo('./navigation.php?<?php echo $common_url_query; ?>');
554 window.parent.goTo('./<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
555 . '?' . $common_url_query; ?>', 'main');
556 return false;">
557 <?php
558 if ($GLOBALS['text_dir'] === 'rtl') {
559 echo ' <bdo dir="ltr">(' . $table['tab' . $sep . 'count'] . ')</bdo> ';
561 echo htmlspecialchars(substr($group, 0, strlen($group) - strlen($sep)));
562 if ($GLOBALS['text_dir'] === 'ltr') {
563 echo ' <bdo dir="ltr">(' . $table['tab' . $sep . 'count'] . ')</bdo> ';
566 </a>
567 <?php
569 unset($table['is' . $sep . 'group']);
570 unset($table['tab' . $sep . 'group']);
571 unset($table['tab' . $sep . 'count']);
573 if ($visible &&
574 ((isset($_REQUEST['tbl_group'])
575 && (strpos($_REQUEST['tbl_group'], $group) === 0
576 || strpos($_REQUEST['tbl_group'], $sep . $group) !== false))
577 || strpos($GLOBALS['table'], $group) === 0)) {
578 PMA_displayTableList($table, true,
579 $tab_group_full . $group, $table_db);
580 } else {
581 PMA_displayTableList($table, false, '', $table_db);
583 echo '</li>' . "\n";
584 } elseif (is_array($table)) {
585 $href = $GLOBALS['cfg']['DefaultTabTable'] . '?'
586 .$GLOBALS['common_url_query'] . '&amp;table='
587 .urlencode($table['Name']);
588 echo '<li>' . "\n";
589 echo '<a title="' . $GLOBALS['strBrowse'] . ': '
590 . htmlspecialchars($table['Comment'])
591 .' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows'] . ')"'
592 .' id="browse_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
593 .' href="sql.php?' . $GLOBALS['common_url_query']
594 .'&amp;table=' . urlencode($table['Name'])
595 .'&amp;goto=' . $GLOBALS['cfg']['DefaultTabTable']
596 . '" >'
597 .'<img class="icon"';
598 if ('VIEW' === strtoupper($table['Comment'])) {
599 echo ' src="' . $GLOBALS['pmaThemeImage'] . 's_views.png"';
600 } else {
601 echo ' src="' . $GLOBALS['pmaThemeImage'] . 'b_sbrowse.png"';
603 echo ' id="icon_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
604 .' width="10" height="10" alt="' . $GLOBALS['strBrowse'] . '" /></a>' . "\n"
605 .'<a href="' . $href . '" title="' . htmlspecialchars($table['Comment']
606 .' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . $GLOBALS['strRows']) . ')"'
607 .' id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">'
608 // preserve spaces in table name
609 . str_replace(' ', '&nbsp;', htmlspecialchars($table['disp_name'])) . '</a>';
610 echo '</li>' . "\n";
613 echo '</ul>';
616 echo '</div>' . "\n";
618 PMA_exitNavigationFrame();