Coding style improvements to Eps_Relation_Schema
[phpmyadmin/thilanka.git] / navigation.php
blobdc60e22f1b1666007c5f60a4581bb1edb4938591
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 * @package phpMyAdmin
7 */
9 /**
10 * Gets a core script and starts output buffering work
12 require_once './libraries/common.inc.php';
14 /**
15 * finish and cleanup navigation.php script execution, only to be used in navigation.php
17 * @access private
19 function PMA_exitNavigationFrame()
21 echo '</body></html>';
22 exit;
25 require_once './libraries/common.lib.php';
26 require_once './libraries/RecentTable.class.php';
28 /**
29 * Check if it is an ajax request to reload the recent tables list.
31 if ($GLOBALS['is_ajax_request'] && $_REQUEST['recent_table']) {
32 PMA_ajaxResponse('', true, array('options' => PMA_RecentTable::getInstance()->getHtmlSelectOption()) );
35 // keep the offset of the db list in session before closing it
36 if (! isset($_SESSION['tmp_user_values']['navi_limit_offset'])) {
37 $_SESSION['tmp_user_values']['navi_limit_offset'] = 0;
39 if (! isset($_SESSION['tmp_user_values']['table_limit_offset']) || $_SESSION['tmp_user_values']['table_limit_offset_db'] != $db) {
40 $_SESSION['tmp_user_values']['table_limit_offset'] = 0;
41 $_SESSION['tmp_user_values']['table_limit_offset_db'] = $db;
43 if (isset($_REQUEST['pos'])) {
44 if (isset($_REQUEST['tpos'])) {
45 $_SESSION['tmp_user_values']['table_limit_offset'] = (int) $_REQUEST['pos'];
47 else {
48 $_SESSION['tmp_user_values']['navi_limit_offset'] = (int) $_REQUEST['pos'];
51 $pos = $_SESSION['tmp_user_values']['navi_limit_offset'];
52 $tpos = $_SESSION['tmp_user_values']['table_limit_offset'];
53 // free the session file, for the other frames to be loaded
54 // but only if debugging is not enabled
55 if (empty($_SESSION['debug'])) {
56 session_write_close();
59 /**
60 * the output compression library
62 require_once './libraries/ob.lib.php';
64 PMA_outBufferPre();
67 * selects the database if there is only one on current server
69 if ($GLOBALS['server'] && ! strlen($GLOBALS['db'])) {
70 $GLOBALS['db'] = $GLOBALS['pma']->databases->getSingleItem();
73 $db_start = $GLOBALS['db'];
75 /**
76 * the relation settings
78 $cfgRelation = PMA_getRelationsParam();
80 /**
81 * For re-usability, moved http-headers to a seperate file.
82 * It can now be included by libraries/header.inc.php, querywindow.php.
84 require_once './libraries/header_http.inc.php';
87 * Displays the frame
89 // xml declaration moves IE into quirks mode, making much trouble with CSS
90 /* echo '<?xml version="1.0" encoding="utf-8"?>'; */
92 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
93 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
94 <html xmlns="http://www.w3.org/1999/xhtml"
95 xml:lang="<?php echo $available_languages[$lang][1]; ?>"
96 lang="<?php echo $available_languages[$lang][1]; ?>"
97 dir="<?php echo $GLOBALS['text_dir']; ?>">
99 <head>
100 <link rel="icon" href="./favicon.ico" type="image/x-icon" />
101 <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
102 <title>phpMyAdmin</title>
103 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
104 <base target="frame_content" />
105 <link rel="stylesheet" type="text/css"
106 href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=left&amp;nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
107 <?php
108 echo PMA_includeJS('jquery/jquery-1.6.2.js');
109 echo PMA_includeJS('jquery/jquery-ui-1.8.custom.js');
110 echo PMA_includeJS('navigation.js');
111 echo PMA_includeJS('functions.js');
112 echo PMA_includeJS('messages.php');
114 <script type="text/javascript">
115 // <![CDATA[
116 // INIT PMA_setFrameSize
117 var onloadCnt = 0;
118 var onLoadHandler = window.onload;
119 var resizeHandler = window.onresize;
120 window.document.onresize = resizeHandler;
121 window.onload = function() {
122 if (onloadCnt == 0) {
123 if (typeof(onLoadHandler) == "function") {
124 onLoadHandler();
126 if (typeof(PMA_setFrameSize) != 'undefined' && typeof(PMA_setFrameSize) == 'function') {
127 PMA_setFrameSize();
129 onloadCnt++;
132 window.onresize = function() {
133 if (typeof(resizeHandler) == "function") {
134 resizeHandler();
136 if (typeof(PMA_saveFrameSize) != 'undefined' && typeof(PMA_saveFrameSize) == 'function') {
137 PMA_saveFrameSize();
140 // ]]>
141 </script>
142 <?php
144 * remove horizontal scroll bar bug in IE 6 by forcing a vertical scroll bar
147 <!--[if IE 6]>
148 <style type="text/css">
149 /* <![CDATA[ */
150 html {
151 overflow-y: scroll;
153 /* ]]> */
154 </style>
155 <![endif]-->
156 </head>
158 <body id="body_leftFrame">
159 <?php
160 require './libraries/navigation_header.inc.php';
162 // display recently used tables
163 if ($GLOBALS['cfg']['LeftRecentTable'] > 0) {
164 echo '<div id="recentTableList">' . "\n"
165 .'<form method="post" action="index.php" target="_parent">' . "\n"
166 .PMA_generate_common_hidden_inputs() . "\n"
167 .PMA_RecentTable::getInstance()->getHtmlSelect()
168 .'<noscript>' . "\n"
169 .'<input type="submit" name="Go" value="' . __('Go') . '" />' . "\n"
170 .'</noscript>' . "\n"
171 .'</form>' . "\n"
172 .'</div>' . "\n";
175 if (! $GLOBALS['server']) {
176 // no server selected
177 PMA_exitNavigationFrame();
178 } elseif (! count($GLOBALS['pma']->databases)) {
179 // no database available, so we break here
180 echo '<p>' . __('No databases') . '</p>';
181 PMA_exitNavigationFrame();
182 } elseif ($GLOBALS['cfg']['LeftFrameLight'] && count($GLOBALS['pma']->databases) > 1) {
183 $list = $cfg['DisplayDatabasesList'];
184 if ($list === 'auto') {
185 if (empty($GLOBALS['db'])) {
186 $list = true;
187 } else {
188 $list = false;
191 if (!$list) {
192 // more than one database available and LeftFrameLight is true
193 // display db selectbox
195 // Light mode -> beginning of the select combo for databases
196 // Note: When javascript is active, the frameset will be changed from
197 // within navigation.php. With no JS (<noscript>) the whole frameset will
198 // be rebuilt with the new target frame.
201 <div id="databaseList">
202 <form method="post" action="index.php" target="_parent" id="left">
203 <?php
204 echo PMA_generate_common_hidden_inputs() . "\n";
205 echo $GLOBALS['pma']->databases->getHtmlSelectGrouped(true, $_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n";
206 echo '<noscript>' . "\n"
207 .'<input type="submit" name="Go" value="' . __('Go') . '" />' . "\n"
208 .'</noscript>' . "\n"
209 .'</form>' . "\n"
210 . '</div>' . "\n";
211 } else {
212 echo $GLOBALS['pma']->databases->getHtmlListGrouped(true, $_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n";
214 $_url_params = array('pos' => $pos);
215 PMA_listNavigator(count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
219 <div id="left_tableList">
220 <?php
221 // Don't display expansible/collapsible database info if:
222 // 1. $GLOBALS['server'] == 0 (no server selected)
223 // This is the case when there are multiple servers and
224 // '$GLOBALS['cfg']['ServerDefault'] = 0' is set. In that case, we want the welcome
225 // screen to appear with no database info displayed.
226 // 2. there is only one database available (ie either only one database exists
227 // or $GLOBALS['cfg']['Servers']['only_db'] is defined and is not an array)
228 // In this case, the database should not be collapsible/expandable
230 $img_plus = '<img class="icon ic_b_plus" id="el%dImg" src="themes/dot.gif"'
231 .' alt="+" />';
232 $img_minus = '<img class="icon ic_b_minus" id="el%dImg" src="themes/dot.gif"'
233 .' alt="-" />';
235 $href_left = '<a onclick="if (toggle(\'%d\')) return false;"'
236 .' href="navigation.php?%s" target="_self">';
238 $element_counter = 0;
241 if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
242 $table_list = PMA_getTableList($GLOBALS['db'], null, $tpos, $cfg['MaxTableList']);
243 $table_count = PMA_getTableCount($GLOBALS['db']);
245 // show selected databasename as link to DefaultTabDatabase-page
246 // with table count in ()
247 $common_url_query = PMA_generate_common_url($GLOBALS['db']);
249 $db_tooltip = '';
251 if ($GLOBALS['cfg']['ShowTooltip']
252 && $GLOBALS['cfgRelation']['commwork']) {
253 $_db_tooltip = PMA_getDbComment($GLOBALS['db']);
254 if ($_db_tooltip) {
255 $db_tooltip = $_db_tooltip;
259 $disp_name = $GLOBALS['db'];
260 if ($db_tooltip && $GLOBALS['cfg']['ShowTooltipAliasDB']) {
261 $disp_name = $db_tooltip;
262 $disp_name_cut = $db_tooltip;
263 $db_tooltip = $GLOBALS['db'];
266 if ($table_count >= $GLOBALS['cfg']['LeftDisplayTableFilterMinimum']) {
268 <span id="NavFilter">
269 <span id="clear_fast_filter" title="<?php echo __('Clear'); ?>">X</span>
270 <input type="text" name="fast_filter" id="fast_filter" title="<?php echo __('Filter tables by name'); ?>" value="<?php echo __('Filter tables by name'); ?>" />
271 </span>
272 <?php
276 * This helps reducing the navi panel size; in the right panel,
277 * user can find a navigator to page thru all tables.
280 if (! empty($table_list)) {
281 // upper table list paginator
282 if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) {
283 $_url_params = array(
284 'tpos' => 'true',
285 'pos' => $tpos,
286 'db' => $GLOBALS['db']
288 PMA_listNavigator($table_count, $tpos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxTableList']);
290 PMA_displayTableList($table_list, true, '', $GLOBALS['db']);
291 // lower table list paginator
292 if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) {
293 PMA_listNavigator($table_count, $tpos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxTableList']);
295 } else {
296 echo __('No tables found in database.');
298 unset($table_list);
299 if ($db != 'information_schema') {
300 $class = '';
301 $GLOBALS['cfg']['AjaxEnable'] ? $class="ajax" : '';
302 echo '<ul id="newtable"><li><a target="frame_content" href="tbl_create.php' . PMA_generate_common_url(array('db' => $GLOBALS['db'])) . '" class="'.$class .'" >'
303 .'<img class="icon ic_b_snewtbl" src="themes/dot.gif" id="icon_newtable" alt="' . _pgettext('short form', 'Create table') . '" />'
304 . _pgettext('short form', 'Create table') . '</a></li></ul>';
306 } elseif ($GLOBALS['cfg']['LeftFrameLight']) {
307 /* No need to tell user to select database if we're showing complete list */
308 if (!$list) {
309 echo '<p>' . __('Please select a database') . '</p>';
311 } else {
312 echo '<div id="databaseList">' . "\n";
313 $_url_params = array('pos' => $pos);
314 PMA_listNavigator(count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
315 echo '</div>' . "\n";
317 $common_url_query = PMA_generate_common_url();
318 PMA_displayDbList($GLOBALS['pma']->databases->getGroupedDetails($_SESSION['tmp_user_values']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']), $_SESSION['tmp_user_values']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']);
322 * displays collapsable db list
324 * @global integer $element_counter
325 * @global string $img_minus
326 * @global string $img_plus
327 * @global string $href_left
328 * @global string $db_start
329 * @global string $common_url_query
330 * @param array $ext_dblist extended db list
331 * @param integer $offset
332 * @param integer $count
334 function PMA_displayDbList($ext_dblist, $offset, $count)
336 global $element_counter, $img_minus, $img_plus, $href_left,
337 $db_start, $common_url_query;
339 // get table list, for all databases
340 // doing this in one step takes advantage of a single query with information_schema!
341 $tables_full = PMA_DBI_get_tables_full($GLOBALS['pma']->databases->getLimitedItems($offset, $count));
343 $url_dbgroup = '';
344 echo '<ul id="leftdatabaselist">';
345 $close_db_group = false;
346 foreach ($ext_dblist as $group => $db_group) {
347 if (count($GLOBALS['pma']->databases) > 1) {
348 if ($close_db_group) {
349 $url_dbgroup = '';
350 echo '</ul>';
351 echo '</li>';
352 $close_db_group = false;
354 if (count($db_group) > 1) {
355 $close_db_group = true;
356 $url_dbgroup = '&amp;dbgroup=' . urlencode($group);
357 $common_url_query = PMA_generate_common_url() . $url_dbgroup;
358 $element_counter++;
359 echo '<li class="dbgroup">';
360 if ((! empty($_REQUEST['dbgroup']) && $_REQUEST['dbgroup'] == $group)
361 || $db_start == $group || strpos($db_start, $group) === 0) {
362 // display + only if this db(group) is not preselected
363 printf($href_left, $element_counter, PMA_generate_common_url());
364 printf($img_minus, $element_counter);
365 } else {
366 printf($href_left, $element_counter, $common_url_query);
367 printf($img_plus, $element_counter);
369 echo '</a> ' . $group . "\n";
370 if ((! empty($_REQUEST['dbgroup']) && $_REQUEST['dbgroup'] == $group)
371 || $db_start == $group || strpos($db_start, $group) === 0) {
372 echo '<ul id="subel' . $element_counter . '">' . "\n";
373 } else {
374 echo '<ul id="subel' . $element_counter . '"'
375 .' style="display: none">' . "\n";
379 foreach ($db_group as $db) {
380 $common_url_query = PMA_generate_common_url($db['name']) . $url_dbgroup;
382 $element_counter++;
383 // Displays the database name
384 echo '<li>' . "\n";
386 if (count($GLOBALS['pma']->databases) > 1) {
387 // only with more than one db we need collapse ...
388 if ($db_start != $db['name'] || $db['num_tables'] < 1) {
389 // display + only if this db is not preselected
390 // or table count is 0
391 printf($href_left, $element_counter, $common_url_query);
392 printf($img_plus, $element_counter);
393 } else {
394 printf($href_left, $element_counter,
395 PMA_generate_common_url() . $url_dbgroup);
396 printf($img_minus, $element_counter);
398 echo '</a>';
400 // ... and we need to refresh both frames on db selection
402 <a class="item"
403 id="<?php echo htmlspecialchars($db['name']); ?>"
404 href="index.php?<?php echo $common_url_query; ?>"
405 target="_parent"
406 title="<?php echo htmlspecialchars($db['comment']); ?>"
407 onclick="
408 if (! toggle('<?php echo $element_counter; ?>', true))
409 window.parent.goTo('./navigation.php?<?php echo $common_url_query; ?>');
410 window.parent.goTo('./<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
411 . '?' . $common_url_query; ?>', 'main');
412 return false;">
413 <?php
414 // Might be unset if CountTables directive is false
415 if (isset($db['num_tables'])) {
416 if ($GLOBALS['text_dir'] === 'rtl') {
417 echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
420 echo htmlspecialchars($db['disp_name']);
421 if (isset($db['num_tables'])) {
422 if ($GLOBALS['text_dir'] === 'ltr') {
423 echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
427 </a>
428 <?php
429 } else {
430 // with only 1 db available we dont need to refresh navi frame
431 // on db selection, only phpmain
433 <a href="<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
434 . '?' . $common_url_query; ?>"
435 id="<?php echo htmlspecialchars($db['name']); ?>"
436 title="<?php echo htmlspecialchars($db['comment']); ?>">
437 <?php
438 if (isset($db['num_tables'])) {
439 if ($GLOBALS['text_dir'] === 'rtl') {
440 echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
443 echo htmlspecialchars($db['disp_name']);
444 if (isset($db['num_tables'])) {
445 if ($GLOBALS['text_dir'] === 'ltr') {
446 echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
450 </a>
451 <?php
453 if (($GLOBALS['cfg']['Server']['CountTables'] === false) || $db['num_tables']) {
454 if (isset($tables_full[$db['name']])) {
455 $tables = PMA_getTableList($db['name'], $tables_full[$db['name']]);
456 } elseif (isset($tables_full[strtolower($db['name'])])) {
457 // on windows with lower_case_table_names = 1
458 // MySQL returns
459 // with SHOW DATABASES or information_schema.SCHEMATA: `Test`
460 // but information_schema.TABLES gives `test`
461 // bug #1436171
462 // sf.net/tracker/?func=detail&aid=1436171&group_id=23067&atid=377408
463 $tables = PMA_getTableList($db['name'], $tables_full[strtolower($db['name'])]);
464 } else {
465 $tables = PMA_getTableList($db['name']);
467 $child_visible =
468 (bool) (count($GLOBALS['pma']->databases) === 1 || $db_start == $db['name']);
469 PMA_displayTableList($tables, $child_visible, '', $db['name']);
470 } elseif ($GLOBALS['cfg']['LeftFrameLight']) {
471 // no tables and LeftFrameLight:
472 // display message no tables in selected db
473 echo '<p>' . __('Please select a database') . '</p>' . "\n";
475 echo '</li>' . "\n";
476 } // end foreach db
477 } // end foreach group
479 if ($close_db_group) {
480 $url_dbgroup = '';
481 echo '</ul>';
482 echo '</li>';
483 $close_db_group = false;
486 echo '</ul>' . "\n";
490 * display unordered list of tables
491 * calls itself recursively if table in given list
492 * is a list itself
494 * @global integer the element counter
495 * @global string html code for '-' image
496 * @global string html code for '+' image
497 * @global string html code for self link
498 * @param array $tables array of tables/tablegroups
499 * @param boolean $visible whether the list is visible or not
500 * @param string $tab_group_full full tab group name
501 * @param string $table_db db of this table
503 function PMA_displayTableList($tables, $visible = false,
504 $tab_group_full = '', $table_db = '')
506 if (! is_array($tables) || count($tables) === 0) {
507 return;
510 global $element_counter, $img_minus, $img_plus, $href_left;
511 $sep = $GLOBALS['cfg']['LeftFrameTableSeparator'];
513 if ($visible) {
514 echo '<ul id="subel' . $element_counter . '">';
515 } else {
516 echo '<ul id="subel' . $element_counter . '" style="display: none">';
518 foreach ($tables as $group => $table) {
519 // only allow grouping if the group has more than 1 table
520 if (isset($table['is' . $sep . 'group']) && $table['tab' . $sep . 'count'] > 1) {
521 $common_url_query = $GLOBALS['common_url_query']
522 . '&amp;tbl_group=' . urlencode($tab_group_full . $group);
524 $element_counter++;
525 echo '<li>' . "\n";
526 if ($visible
527 && ((isset($_REQUEST['tbl_group'])
528 && (strpos($_REQUEST['tbl_group'], $group) === 0
529 || strpos($_REQUEST['tbl_group'], $sep . $group) !== false))
530 || strpos($GLOBALS['table'], $group) === 0)) {
531 printf($href_left, $element_counter,
532 $GLOBALS['common_url_query'] . '&amp;tbl_group=' . $tab_group_full);
533 printf($img_minus, $element_counter);
534 } else {
535 printf($href_left, $element_counter, $common_url_query);
536 printf($img_plus, $element_counter);
538 echo '</a>';
540 <a href="index.php?<?php echo $common_url_query; ?>"
541 target="_parent"
542 onclick="
543 if (! toggle('<?php echo $element_counter; ?>', true))
544 window.parent.goTo('./navigation.php?<?php echo $common_url_query; ?>');
545 window.parent.goTo('./<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
546 . '?' . $common_url_query; ?>', 'main');
547 return false;">
548 <?php
549 if ($GLOBALS['text_dir'] === 'rtl') {
550 echo ' <bdo dir="ltr">(' . $table['tab' . $sep . 'count'] . ')</bdo> ';
552 echo htmlspecialchars(substr($group, 0, strlen($group) - strlen($sep)));
553 if ($GLOBALS['text_dir'] === 'ltr') {
554 echo ' <bdo dir="ltr">(' . $table['tab' . $sep . 'count'] . ')</bdo> ';
557 </a>
558 <?php
560 unset($table['is' . $sep . 'group']);
561 unset($table['tab' . $sep . 'group']);
562 unset($table['tab' . $sep . 'count']);
564 if ($visible &&
565 ((isset($_REQUEST['tbl_group'])
566 && (strpos($_REQUEST['tbl_group'], $group) === 0
567 || strpos($_REQUEST['tbl_group'], $sep . $group) !== false))
568 || strpos($GLOBALS['table'], $group) === 0)) {
569 PMA_displayTableList($table, true,
570 $tab_group_full . $group, $table_db);
571 } else {
572 PMA_displayTableList($table, false, '', $table_db);
574 echo '</li>' . "\n";
575 } elseif (is_array($table)) {
576 // the table was not grouped because it is the only one with its prefix
577 while (isset($table['is' . $sep . 'group'])) {
578 // get the array with the actual table information
579 foreach ($table as $value) {
580 if (is_array($value)) {
581 $table = $value;
585 $link_title = PMA_getTitleForTarget($GLOBALS['cfg']['LeftDefaultTabTable']);
586 // quick access icon next to each table name
587 echo '<li>' . "\n";
588 echo '<a class="tableicon" title="'
589 . htmlspecialchars($link_title)
590 . ': ' . htmlspecialchars($table['Comment'])
591 .' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . __('Rows') . ')"'
592 .' id="quick_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
593 .' href="' . $GLOBALS['cfg']['LeftDefaultTabTable'] . '?'
594 . $GLOBALS['common_url_query']
595 .'&amp;table=' . urlencode($table['Name'])
596 .'&amp;goto=' . $GLOBALS['cfg']['LeftDefaultTabTable']
597 . '" >'
598 .'<img src="themes/dot.gif"';
599 if ('VIEW' === strtoupper($table['Comment'])) {
600 echo ' class="icon ic_s_views"';
601 } else {
602 echo ' class="icon ic_b_sbrowse"';
604 echo ' id="icon_' . htmlspecialchars($table_db . '.' . $table['Name']) . '"'
605 .' alt="' . htmlspecialchars($link_title) . '" /></a>' . "\n";
607 // link for the table name itself
608 $href = $GLOBALS['cfg']['DefaultTabTable'] . '?'
609 .$GLOBALS['common_url_query'] . '&amp;table='
610 .urlencode($table['Name']) . '&amp;pos=0';
611 echo '<a href="' . $href
612 . '" title="' . htmlspecialchars(PMA_getTitleForTarget($GLOBALS['cfg']['DefaultTabTable']) . ': ' . $table['Comment']
613 .' (' . PMA_formatNumber($table['Rows'], 0) . ' ' . __('Rows')) . ')"'
614 .' id="' . htmlspecialchars($table_db . '.' . $table['Name']) . '">'
615 // preserve spaces in table name
616 . str_replace(' ', '&nbsp;', htmlspecialchars($table['disp_name'])) . '</a>';
617 echo '</li>' . "\n";
620 echo '</ul>';
623 echo '</div>' . "\n";
625 PMA_exitNavigationFrame();