Merge remote-tracking branch 'origin/master' into drizzle
[phpmyadmin.git] / db_structure.php
bloba0d8495f0cfa8b3a465c34a59afa197f715e7faa
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package phpMyAdmin
6 */
8 /**
11 require_once './libraries/common.inc.php';
13 $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
14 $GLOBALS['js_include'][] = 'db_structure.js';
15 $GLOBALS['js_include'][] = 'tbl_change.js';
17 /**
18 * Prepares the tables list if the user where not redirected to this script
19 * because there is no table in the database ($is_info is true)
21 if (empty($is_info)) {
22 // Drops/deletes/etc. multiple tables if required
23 if ((!empty($submit_mult) && isset($selected_tbl))
24 || isset($mult_btn)) {
25 $action = 'db_structure.php';
26 $err_url = 'db_structure.php?'. PMA_generate_common_url($db);
28 // see bug #2794840; in this case, code path is:
29 // db_structure.php -> libraries/mult_submits.inc.php -> sql.php
30 // -> db_structure.php and if we got an error on the multi submit,
31 // we must display it here and not call again mult_submits.inc.php
32 if (! isset($error) || false === $error) {
33 require './libraries/mult_submits.inc.php';
35 if (empty($message)) {
36 $message = PMA_Message::success();
39 require './libraries/db_common.inc.php';
40 $url_query .= '&amp;goto=db_structure.php';
42 // Gets the database structure
43 $sub_part = '_structure';
44 require './libraries/db_info.inc.php';
46 if (!PMA_DRIZZLE) {
47 require './libraries/replication.inc.php';
48 } else {
49 $server_slave_status = false;
53 require_once './libraries/bookmark.lib.php';
55 require_once './libraries/mysql_charsets.lib.php';
56 $db_collation = PMA_getDbCollation($db);
58 // in a separate file to avoid redeclaration of functions in some code paths
59 require_once './libraries/db_structure.lib.php';
60 $titles = PMA_buildActionTitles();
62 // 1. No tables
63 if ($num_tables == 0) {
64 echo '<p>' . __('No tables found in database') . '</p>' . "\n";
66 if (!PMA_DRIZZLE) {
67 // Routines
68 require './libraries/db_routines.inc.php';
70 // Events
71 if (PMA_MYSQL_INT_VERSION > 50100) {
72 require './libraries/db_events.inc.php';
76 if (empty($db_is_information_schema)) {
77 require './libraries/display_create_table.lib.php';
78 } // end if (Create Table dialog)
80 /**
81 * Displays the footer
83 require_once './libraries/footer.inc.php';
84 exit;
87 // else
88 // 2. Shows table informations
90 /**
91 * Displays the tables list
93 echo '<div id="tableslistcontainer">';
94 $_url_params = array(
95 'pos' => $pos,
96 'db' => $db);
98 // Add the sort options if they exists
99 if (isset($_REQUEST['sort'])) {
100 $_url_params['sort'] = $_REQUEST['sort'];
103 if (isset($_REQUEST['sort_order'])) {
104 $_url_params['sort_order'] = $_REQUEST['sort_order'];
107 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
110 <form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
111 <?php
112 echo PMA_generate_common_hidden_inputs($db);
114 PMA_TableHeader($db_is_information_schema, $server_slave_status);
116 $i = $sum_entries = 0;
117 $sum_size = (double) 0;
118 $overhead_size = (double) 0;
119 $overhead_check = '';
120 $checked = !empty($checkall) ? ' checked="checked"' : '';
121 $num_columns = $cfg['PropertiesNumColumns'] > 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0;
122 $row_count = 0;
125 $hidden_fields = array();
126 $odd_row = true;
127 $sum_row_count_pre = '';
129 $tableReductionCount = 0; // the amount to reduce the table count by
131 foreach ($tables as $keyname => $each_table) {
132 if (PMA_BS_IsHiddenTable($keyname)) {
133 $tableReductionCount++;
134 continue;
137 // Get valid statistics whatever is the table type
139 $table_is_view = false;
140 $table_encoded = urlencode($each_table['TABLE_NAME']);
141 // Sets parameters for links
142 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
143 // do not list the previous table's size info for a view
144 $formatted_size = '-';
145 $unit = '';
147 switch ( $each_table['ENGINE']) {
148 // MyISAM, ISAM or Heap table: Row count, data size and index size
149 // are accurate; data size is accurate for ARCHIVE
150 case 'MyISAM' :
151 case 'ISAM' :
152 case 'HEAP' :
153 case 'MEMORY' :
154 case 'ARCHIVE' :
155 case 'Aria' :
156 case 'Maria' :
157 if ($db_is_information_schema) {
158 $each_table['Rows'] = PMA_Table::countRecords($db,
159 $each_table['Name']);
162 if ($is_show_stats) {
163 $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']);
164 $sum_size += $tblsize;
165 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
166 if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) {
167 list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0);
168 $overhead_size += $each_table['Data_free'];
171 break;
172 case 'InnoDB' :
173 case 'PBMS' :
174 // InnoDB table: Row count is not accurate but data and index sizes are.
175 // PBMS table in Drizzle: TABLE_ROWS is taken from table cache, so it may be unavailable
177 if (($each_table['ENGINE'] == 'InnoDB' && $each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount'])
178 || !isset($each_table['TABLE_ROWS'])) {
179 $each_table['COUNTED'] = true;
180 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
181 $each_table['TABLE_NAME'], $force_exact = true,
182 $is_view = false);
183 } else {
184 $each_table['COUNTED'] = false;
187 // Drizzle doesn't provide data and index length, check for null
188 if ($is_show_stats && $each_table['Data_length'] !== null) {
189 $tblsize = $each_table['Data_length'] + $each_table['Index_length'];
190 $sum_size += $tblsize;
191 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
193 //$display_rows = ' - ';
194 break;
195 // Mysql 5.0.x (and lower) uses MRG_MyISAM and MySQL 5.1.x (and higher) uses MRG_MYISAM
196 // Both are aliases for MERGE
197 case 'MRG_MyISAM' :
198 case 'MRG_MYISAM' :
199 case 'MERGE' :
200 case 'BerkeleyDB' :
201 // Merge or BerkleyDB table: Only row count is accurate.
202 if ($is_show_stats) {
203 $formatted_size = ' - ';
204 $unit = '';
206 break;
207 // for a view, the ENGINE is sometimes reported as null,
208 // or on some servers it's reported as "SYSTEM VIEW"
209 case null :
210 case 'SYSTEM VIEW' :
211 case 'FunctionEngine' :
212 // if table is broken, Engine is reported as null, so one more test
213 if ($each_table['TABLE_TYPE'] == 'VIEW') {
214 // countRecords() takes care of $cfg['MaxExactCountViews']
215 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
216 $each_table['TABLE_NAME'], $force_exact = true,
217 $is_view = true);
218 $table_is_view = true;
220 break;
221 default :
222 // Unknown table type.
223 if ($is_show_stats) {
224 $formatted_size = 'unknown';
225 $unit = '';
227 } // end switch
229 if (! PMA_Table::isMerge($db, $each_table['TABLE_NAME'])) {
230 $sum_entries += $each_table['TABLE_ROWS'];
233 if (isset($each_table['Collation'])) {
234 $collation = '<dfn title="'
235 . PMA_getCollationDescr($each_table['Collation']) . '">'
236 . $each_table['Collation'] . '</dfn>';
237 } else {
238 $collation = '---';
241 if ($is_show_stats) {
242 if (isset($formatted_overhead)) {
243 $overhead = '<a href="tbl_structure.php?'
244 . $tbl_url_query . '#showusage">' . $formatted_overhead
245 . ' ' . $overhead_unit . '</a>' . "\n";
246 unset($formatted_overhead);
247 $overhead_check .=
248 "document.getElementById('checkbox_tbl_" . ($i + 1) . "').checked = true;";
249 } else {
250 $overhead = '-';
252 } // end if
254 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
255 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
256 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
257 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']]))
258 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
259 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
261 $i++;
263 $row_count++;
264 if ($table_is_view) {
265 $hidden_fields[] = '<input type="hidden" name="views[]" value="' . htmlspecialchars($each_table['TABLE_NAME']) . '" />';
268 if ($each_table['TABLE_ROWS'] > 0 || $table_is_view) {
269 $browse_table = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $titles['Browse'] . '</a>';
270 $search_table = '<a href="tbl_select.php?' . $tbl_url_query . '">' . $titles['Search'] . '</a>';
271 $browse_table_label = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $truename . '</a>';
272 } else {
273 $browse_table = $titles['NoBrowse'];
274 $search_table = $titles['NoSearch'];
275 $browse_table_label = '<a href="tbl_structure.php?' . $tbl_url_query . '">' . $truename . '</a>';
278 if (! $db_is_information_schema) {
279 if (! empty($each_table['TABLE_ROWS'])) {
280 $empty_table = '<a ';
281 if ($GLOBALS['cfg']['AjaxEnable']) {
282 $empty_table .= 'class="truncate_table_anchor"';
284 $empty_table .= ' href="sql.php?' . $tbl_url_query
285 . '&amp;sql_query=';
286 $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
287 . '&amp;message_to_show='
288 . urlencode(sprintf(__('Table %s has been emptied'), htmlspecialchars($each_table['TABLE_NAME'])))
289 .'">' . $titles['Empty'] . '</a>';
290 } else {
291 $empty_table = $titles['NoEmpty'];
293 $drop_query = 'DROP '
294 . ($table_is_view ? 'VIEW' : 'TABLE')
295 . ' ' . PMA_backquote($each_table['TABLE_NAME']);
296 $drop_message = sprintf(
297 $table_is_view ? __('View %s has been dropped') : __('Table %s has been dropped'),
298 str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME'])));
301 $tracking_icon = '';
302 if (PMA_Tracker::isActive()) {
303 if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) {
304 $tracking_icon = '<a href="tbl_tracking.php?' . $url_query.'&amp;table=' . $truename . '"><img class="icon" width="14" height="14" src="' . $pmaThemeImage . 'eye.png" alt="' . __('Tracking is active.') . '" title="' . __('Tracking is active.') . '" /></a>';
305 } elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) {
306 $tracking_icon = '<a href="tbl_tracking.php?' . $url_query . '&amp;table=' . $truename . '"><img class="icon" width="14" height="14" src="' . $pmaThemeImage . 'eye_grey.png" alt="' . __('Tracking is not active.') . '" title="' . __('Tracking is not active.') . '" /></a>';
310 if ($num_columns > 0 && $num_tables > $num_columns
311 && (($row_count % $num_columns) == 0)) {
312 $row_count = 1;
313 $odd_row = true;
315 </tr>
316 </tbody>
317 </table>
318 <?php
319 PMA_TableHeader(false, $server_slave_status);
322 $ignored = false;
323 $do = false;
325 if ($server_slave_status) {
326 ////////////////////////////////////////////////////////////////
328 if ((strlen(array_search($truename, $server_slave_Do_Table)) > 0)
329 || (strlen(array_search($db, $server_slave_Do_DB)) > 0)
330 || (count($server_slave_Do_DB) == 1 && count($server_slave_Ignore_DB) == 1)
332 $do = true;
334 foreach ($server_slave_Wild_Do_Table as $db_table) {
335 $table_part = PMA_extract_db_or_table($db_table, 'table');
336 if (($db == PMA_extract_db_or_table($db_table, 'db')) && (preg_match("@^" . substr($table_part, 0, strlen($table_part) - 1) . "@", $truename))) {
337 $do = true;
340 ////////////////////////////////////////////////////////////////////
341 if ((strlen(array_search($truename, $server_slave_Ignore_Table)) > 0) || (strlen(array_search($db, $server_slave_Ignore_DB)) > 0)) {
342 $ignored = true;
344 foreach ($server_slave_Wild_Ignore_Table as $db_table) {
345 $table_part = PMA_extract_db_or_table($db_table, 'table');
346 if (($db == PMA_extract_db_or_table($db_table)) && (preg_match("@^" . substr($table_part, 0, strlen($table_part) - 1) . "@", $truename))) {
347 $ignored = true;
350 unset($table_part);
353 <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
354 <td align="center">
355 <input type="checkbox" name="selected_tbl[]"
356 value="<?php echo htmlspecialchars($each_table['TABLE_NAME']); ?>"
357 id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> /></td>
358 <th><?php echo $browse_table_label; ?>
359 <?php echo (! empty($tracking_icon) ? $tracking_icon : ''); ?>
360 </th>
361 <?php if ($server_slave_status) { ?><td align="center"><?php echo $ignored ? ' <img class="icon" src="' . $pmaThemeImage . 's_cancel.png" width="16" height="16" alt="NOT REPLICATED" />' : ''. $do ? ' <img class="icon" src="' . $pmaThemeImage . 's_success.png" width="16" height="16" alt="REPLICATED" />' : ''; ?></td><?php } ?>
362 <td align="center"><?php echo $browse_table; ?></td>
363 <td align="center">
364 <a href="tbl_structure.php?<?php echo $tbl_url_query; ?>">
365 <?php echo $titles['Structure']; ?></a></td>
366 <td align="center"><?php echo $search_table; ?></td>
367 <?php if (! $db_is_information_schema) { ?>
368 <td align="center" class="insert_table">
369 <a <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax"' : ''); ?> href="tbl_change.php?<?php echo $tbl_url_query; ?>">
370 <?php echo $titles['Insert']; ?></a></td>
371 <td align="center"><?php echo $empty_table; ?></td>
372 <td align="center">
373 <a <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="drop_table_anchor"' : ''); ?> href="sql.php?<?php echo $tbl_url_query;
374 ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php
375 echo urlencode($drop_query); ?>&amp;message_to_show=<?php
376 echo urlencode($drop_message); ?>" >
377 <?php echo $titles['Drop']; ?></a></td>
378 <?php } // end if (! $db_is_information_schema)
380 // there is a null value in the ENGINE
381 // - when the table needs to be repaired, or
382 // - when it's a view
383 // so ensure that we'll display "in use" below for a table
384 // that needs to be repaired
385 if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
386 $row_count_pre = '';
387 $show_superscript = '';
388 if ($table_is_view) {
389 // Drizzle views use FunctionEngine, and the only place where they are available are I_S and D_D
390 // schemas, where we do exact counting
391 if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews'] && $each_table['ENGINE'] != 'FunctionEngine') {
392 $row_count_pre = '~';
393 $sum_row_count_pre = '~';
394 $show_superscript = PMA_showHint(PMA_sanitize(sprintf(__('This view has at least this number of rows. Please refer to %sdocumentation%s.'), '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]')));
396 } elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
397 // InnoDB table: we did not get an accurate row count
398 $row_count_pre = '~';
399 $sum_row_count_pre = '~';
400 $show_superscript = '';
403 <td class="value tbl_rows"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
404 <?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
405 <td nowrap="nowrap"><?php echo ($table_is_view ? __('View') : $each_table['ENGINE']); ?></td>
406 <?php if (isset($collation)) { ?>
407 <td nowrap="nowrap"><?php echo $collation ?></td>
408 <?php } ?>
409 <?php } ?>
411 <?php if ($is_show_stats) { ?>
412 <td class="value tbl_size"><a
413 href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
414 ><?php echo $formatted_size . ' ' . $unit; ?></a></td>
415 <td class="value"><?php echo $overhead; ?></td>
416 <?php } // end if ?>
417 <?php } elseif ($table_is_view) { ?>
418 <td class="value">-</td>
419 <td><?php echo __('View'); ?></td>
420 <td>---</td>
421 <?php if ($is_show_stats) { ?>
422 <td class="value">-</td>
423 <td class="value">-</td>
424 <?php } ?>
425 <?php } else { ?>
426 <td colspan="<?php echo ($colspan_for_structure - ($db_is_information_schema ? 5 : 8)) ?>"
427 align="center">
428 <?php echo __('in use'); ?></td>
429 <?php } // end if (isset($each_table['TABLE_ROWS'])) else ?>
430 </tr>
431 <?php
432 } // end foreach
434 // Show Summary
435 if ($is_show_stats) {
436 list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
437 list($overhead_formatted, $overhead_unit) =
438 PMA_formatByteDown($overhead_size, 3, 1);
441 </tbody>
442 <tbody id="tbl_summary_row">
443 <tr><th></th>
444 <th align="center" nowrap="nowrap">
445 <?php
446 // for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
447 // (we don't want negative numbers here)
448 if ($num_tables == 0)
449 $tableReductionCount = 0;
451 echo sprintf(_ngettext('%s table', '%s tables', $num_tables - $tableReductionCount), PMA_formatNumber($num_tables - $tableReductionCount, 0));
453 </th>
454 <?php
455 if ($server_slave_status) {
456 echo ' <th>' . __('Replication') . '</th>' . "\n";
459 <th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
460 <?php echo __('Sum'); ?></th>
461 <th class="value tbl_rows"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
462 <?php
463 if (!($cfg['PropertiesNumColumns'] > 1)) {
464 $default_engine = PMA_DBI_get_default_engine();
465 echo ' <th align="center">' . "\n"
466 . ' <dfn title="'
467 . sprintf(__('%s is the default storage engine on this MySQL server.'), $default_engine) . '">' .$default_engine . '</dfn></th>' . "\n";
468 // we got a case where $db_collation was empty
469 echo ' <th align="center">' . "\n";
470 if (! empty($db_collation)) {
471 echo ' <dfn title="'
472 . PMA_getCollationDescr($db_collation) . ' (' . __('Default') . ')">' . $db_collation
473 . '</dfn>';
475 echo '</th>';
478 if ($is_show_stats) {
480 <th class="value tbl_size"><?php echo $sum_formatted . ' ' . $unit; ?></th>
481 <th class="value"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
482 <?php
485 </tr>
486 </tbody>
487 </table>
489 <div class="clearfloat">
490 <?php
491 // Check all tables url
492 $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
494 <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
495 width="38" height="22" alt="<?php echo __('With selected:'); ?>" />
496 <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
497 onclick="if (markAllRows('tablesForm')) return false;">
498 <?php echo __('Check All'); ?></a>
500 <a href="<?php echo $checkall_url; ?>"
501 onclick="if (unMarkAllRows('tablesForm')) return false;">
502 <?php echo __('Uncheck All'); ?></a>
503 <?php if ($overhead_check != '') { ?>
505 <a href="#" onclick="unMarkAllRows('tablesForm');
506 <?php echo $overhead_check; ?> return false;">
507 <?php echo __('Check tables having overhead'); ?></a>
508 <?php } ?>
510 <select name="submit_mult" onchange="this.form.submit();" style="margin: 0 3em 0 3em;">
511 <?php
512 echo ' <option value="' . __('With selected:') . '" selected="selected">'
513 . __('With selected:') . '</option>' . "\n";
514 echo ' <option value="export" >'
515 . __('Export') . '</option>' . "\n";
516 echo ' <option value="print" >'
517 . __('Print view') . '</option>' . "\n";
519 if (!$db_is_information_schema && !$cfg['DisableMultiTableMaintenance']) {
520 echo ' <option value="empty_tbl" >'
521 . __('Empty') . '</option>' . "\n";
522 echo ' <option value="drop_tbl" >'
523 . __('Drop') . '</option>' . "\n";
524 echo ' <option value="check_tbl" >'
525 . __('Check table') . '</option>' . "\n";
526 echo ' <option value="optimize_tbl" >'
527 . __('Optimize table') . '</option>' . "\n";
528 echo ' <option value="repair_tbl" >'
529 . __('Repair table') . '</option>' . "\n";
530 echo ' <option value="analyze_tbl" >'
531 . __('Analyze table') . '</option>' . "\n";
532 echo ' <option value="add_prefix_tbl" >'
533 . __('Add prefix to table') . '</option>' . "\n";
534 echo ' <option value="replace_prefix_tbl" >'
535 . __('Replace table prefix') . '</option>' . "\n";
536 echo ' <option value="copy_tbl_change_prefix" >'
537 . __('Copy table with prefix') . '</option>' . "\n";
540 </select>
541 <script type="text/javascript">
542 <!--
543 // Fake js to allow the use of the <noscript> tag
544 //-->
545 </script>
546 <noscript>
547 <input type="submit" value="<?php echo __('Go'); ?>" />
548 </noscript>
549 <?php echo implode("\n", $hidden_fields) . "\n"; ?>
550 </div>
551 </form>
552 <?php
553 // display again the table list navigator
554 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
556 </div>
557 <hr />
559 <?php
560 if (!PMA_DRIZZLE) {
561 // Routines
562 require './libraries/db_routines.inc.php';
564 // Events
565 if (PMA_MYSQL_INT_VERSION > 50100) {
566 require './libraries/db_events.inc.php';
571 * Work on the database
573 /* DATABASE WORK */
574 /* Printable view of a table */
575 echo '<p>';
576 echo '<a href="db_printview.php?' . $url_query . '">';
577 if ($cfg['PropertiesIconic']) {
578 echo '<img class="icon" src="' . $pmaThemeImage
579 .'b_print.png" width="16" height="16" alt="" />';
581 echo __('Print view') . '</a> ';
583 echo '<a href="./db_datadict.php?' . $url_query . '">';
584 if ($cfg['PropertiesIconic']) {
585 echo '<img class="icon" src="' . $pmaThemeImage
586 .'b_tblanalyse.png" width="16" height="16" alt="" />';
588 echo __('Data Dictionary') . '</a>';
589 echo '</p>';
591 if (empty($db_is_information_schema)) {
592 require './libraries/display_create_table.lib.php';
593 } // end if (Create Table dialog)
596 * Displays the footer
598 require './libraries/footer.inc.php';