3.1.3.2 release
[phpmyadmin/crack.git] / db_structure.php
blob49b97d595882653ba6853617986681e32a0468c5
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 */
8 /**
11 require_once './libraries/common.inc.php';
12 require_once './libraries/Table.class.php';
14 $GLOBALS['js_include'][] = 'mootools.js';
16 /**
17 * Prepares the tables list if the user where not redirected to this script
18 * because there is no table in the database ($is_info is true)
20 if (empty($is_info)) {
21 // Drops/deletes/etc. multiple tables if required
22 if ((!empty($submit_mult) && isset($selected_tbl))
23 || isset($mult_btn)) {
24 $action = 'db_structure.php';
25 $err_url = 'db_structure.php?'. PMA_generate_common_url($db);
26 require './libraries/mult_submits.inc.php';
27 if (empty($message)) {
28 $message = PMA_Message::success();
31 require './libraries/db_common.inc.php';
32 $url_query .= '&amp;goto=db_structure.php';
34 // Gets the database structure
35 $sub_part = '_structure';
36 require './libraries/db_info.inc.php';
39 // 1. No tables
40 if ($num_tables == 0) {
41 echo '<p>' . $strNoTablesFound . '</p>' . "\n";
43 if (empty($db_is_information_schema)) {
44 require './libraries/display_create_table.lib.php';
45 } // end if (Create Table dialog)
47 /**
48 * Displays the footer
50 require_once './libraries/footer.inc.php';
51 exit;
54 // else
55 // 2. Shows table informations - staybyte - 11 June 2001
57 require_once './libraries/bookmark.lib.php';
59 require_once './libraries/mysql_charsets.lib.php';
60 $db_collation = PMA_getDbCollation($db);
62 // Display function
63 /**
64 * void PMA_TableHeader([bool $db_is_information_schema = false])
65 * display table header (<table><thead>...</thead><tbody>)
67 * @uses PMA_showHint()
68 * @uses $GLOBALS['cfg']['PropertiesNumColumns']
69 * @uses $GLOBALS['is_show_stats']
70 * @uses $GLOBALS['strTable']
71 * @uses $GLOBALS['strAction']
72 * @uses $GLOBALS['strRecords']
73 * @uses $GLOBALS['strApproximateCount']
74 * @uses $GLOBALS['strType']
75 * @uses $GLOBALS['strCollation']
76 * @uses $GLOBALS['strSize']
77 * @uses $GLOBALS['strOverhead']
78 * @uses $GLOBALS['structure_tbl_col_cnt']
79 * @param boolean $db_is_information_schema
81 function PMA_TableHeader($db_is_information_schema = false)
83 $cnt = 0; // Let's count the columns...
85 if ($db_is_information_schema) {
86 $action_colspan = 3;
87 } else {
88 $action_colspan = 6;
91 echo '<table class="data" style="float: left;">' . "\n"
92 .'<thead>' . "\n"
93 .'<tr><td></td>' . "\n"
94 .' <th>' . $GLOBALS['strTable'] . '</th>' . "\n"
95 .' <th colspan="' . $action_colspan . '">' . "\n"
96 .' ' . $GLOBALS['strAction'] . "\n"
97 .' </th>'
98 .' <th>' . $GLOBALS['strRecords']
99 .PMA_showHint(PMA_sanitize($GLOBALS['strApproximateCount'])) . "\n"
100 .' </th>' . "\n";
101 if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) {
102 echo ' <th>' . $GLOBALS['strType'] . '</th>' . "\n";
103 $cnt++;
104 echo ' <th>' . $GLOBALS['strCollation'] . '</th>' . "\n";
105 $cnt++;
107 if ($GLOBALS['is_show_stats']) {
108 echo ' <th>' . $GLOBALS['strSize'] . '</th>' . "\n"
109 . ' <th>' . $GLOBALS['strOverhead'] . '</th>' . "\n";
110 $cnt += 2;
112 echo '</tr>' . "\n";
113 echo '</thead>' . "\n";
114 echo '<tbody>' . "\n";
115 $GLOBALS['structure_tbl_col_cnt'] = $cnt + $action_colspan + 3;
116 } // end function PMA_TableHeader()
118 $titles = array();
119 if (true == $cfg['PropertiesIconic']) {
120 $titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" />';
121 $titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" />';
122 $titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" />';
123 $titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" />';
124 $titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . $strInsert . '" title="' . $strInsert . '" />';
125 $titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . $strInsert . '" title="' . $strInsert . '" />';
126 $titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . $strStructure . '" title="' . $strStructure . '" />';
127 $titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" />';
128 $titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" />';
129 $titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" />';
130 $titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" />';
132 if ('both' === $cfg['PropertiesIconic']) {
133 $titles['Browse'] .= $strBrowse;
134 $titles['Search'] .= $strSearch;
135 $titles['NoBrowse'] .= $strBrowse;
136 $titles['NoSearch'] .= $strSearch;
137 $titles['Insert'] .= $strInsert;
138 $titles['NoInsert'] .= $strInsert;
139 $titles['Structure'] .= $strStructure;
140 $titles['Drop'] .= $strDrop;
141 $titles['NoDrop'] .= $strDrop;
142 $titles['Empty'] .= $strEmpty;
143 $titles['NoEmpty'] .= $strEmpty;
145 } else {
146 $titles['Browse'] = $strBrowse;
147 $titles['Search'] = $strSearch;
148 $titles['NoBrowse'] = $strBrowse;
149 $titles['NoSearch'] = $strSearch;
150 $titles['Insert'] = $strInsert;
151 $titles['NoInsert'] = $strInsert;
152 $titles['Structure'] = $strStructure;
153 $titles['Drop'] = $strDrop;
154 $titles['NoDrop'] = $strDrop;
155 $titles['Empty'] = $strEmpty;
156 $titles['NoEmpty'] = $strEmpty;
160 * Displays the tables list
163 $_url_params = array(
164 'pos' => $pos,
165 'db' => $db);
167 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
170 <form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
171 <?php
172 echo PMA_generate_common_hidden_inputs($db);
174 PMA_TableHeader($db_is_information_schema);
176 $i = $sum_entries = 0;
177 $sum_size = (double) 0;
178 $overhead_size = (double) 0;
179 $overhead_check = '';
180 $checked = !empty($checkall) ? ' checked="checked"' : '';
181 $num_columns = $cfg['PropertiesNumColumns'] > 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0;
182 $row_count = 0;
185 $hidden_fields = array();
186 $odd_row = true;
187 $sum_row_count_pre = '';
189 // added by rajk - for blobstreaming
190 $PMA_Config = $_SESSION['PMA_Config'];
192 if (!empty ($PMA_Config))
193 $session_bs_tables = $PMA_Config->get('BLOBSTREAMING_TABLES'); // list of blobstreaming tables
195 $tableReductionCount = 0; // the amount to reduce the table count by
197 foreach ($tables as $keyname => $each_table) {
198 if (isset($session_bs_tables))
200 // compare table name against blobstreaming tables
201 foreach ($session_bs_tables as $table_key=>$table_val)
202 // if the table is a blobstreaming table, reduce table count and skip outer foreach loop
203 if ($table_key == $keyname)
205 $tableReductionCount++;
206 continue 2;
210 // loic1: Patch from Joshua Nye <josh at boxcarmedia.com> to get valid
211 // statistics whatever is the table type
213 $table_is_view = false;
214 $table_encoded = urlencode($each_table['TABLE_NAME']);
215 // Sets parameters for links
216 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
217 // do not list the previous table's size info for a view
218 $formatted_size = '-';
219 $unit = '';
221 switch ( $each_table['ENGINE']) {
222 // MyISAM, ISAM or Heap table: Row count, data size and index size
223 // are accurate.
224 case 'MyISAM' :
225 case 'ISAM' :
226 case 'HEAP' :
227 case 'MEMORY' :
228 if ($db_is_information_schema) {
229 $each_table['Rows'] = PMA_Table::countRecords($db,
230 $each_table['Name'], $return = true);
233 if ($is_show_stats) {
234 $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']);
235 $sum_size += $tblsize;
236 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
237 if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) {
238 list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0);
239 $overhead_size += $each_table['Data_free'];
242 break;
243 case 'InnoDB' :
244 // InnoDB table: Row count is not accurate but data and index
245 // sizes are.
247 if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
248 $each_table['COUNTED'] = true;
249 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
250 $each_table['TABLE_NAME'], $return = true, $force_exact = true,
251 $is_view = false);
252 } else {
253 $each_table['COUNTED'] = false;
256 if ($is_show_stats) {
257 $tblsize = $each_table['Data_length'] + $each_table['Index_length'];
258 $sum_size += $tblsize;
259 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
261 //$display_rows = ' - ';
262 break;
263 case 'MRG_MyISAM' :
264 case 'BerkeleyDB' :
265 // Merge or BerkleyDB table: Only row count is accurate.
266 if ($is_show_stats) {
267 $formatted_size = ' - ';
268 $unit = '';
270 break;
271 // for a view, the ENGINE is null
272 case null :
273 case 'SYSTEM VIEW' :
274 // countRecords() takes care of $cfg['MaxExactCountViews']
275 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
276 $each_table['TABLE_NAME'], $return = true, $force_exact = true,
277 $is_view = true);
278 $table_is_view = true;
279 break;
280 default :
281 // Unknown table type.
282 if ($is_show_stats) {
283 $formatted_size = 'unknown';
284 $unit = '';
286 } // end switch
287 $sum_entries += $each_table['TABLE_ROWS'];
289 if (isset($each_table['Collation'])) {
290 $collation = '<dfn title="'
291 . PMA_getCollationDescr($each_table['Collation']) . '">'
292 . $each_table['Collation'] . '</dfn>';
293 } else {
294 $collation = '---';
297 if ($is_show_stats) {
298 if (isset($formatted_overhead)) {
299 $overhead = '<a href="tbl_structure.php?'
300 . $tbl_url_query . '#showusage">' . $formatted_overhead
301 . ' ' . $overhead_unit . '</a>' . "\n";
302 unset($formatted_overhead);
303 $overhead_check .=
304 "document.getElementById('checkbox_tbl_" . ($i + 1) . "').checked = true;";
305 } else {
306 $overhead = '-';
308 } // end if
310 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
311 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
312 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
313 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']]))
314 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
315 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
317 $i++;
319 $row_count++;
320 if ($table_is_view) {
321 $hidden_fields[] = '<input type="hidden" name="views[]" value="' . $each_table['TABLE_NAME'] . '" />';
324 if ($each_table['TABLE_ROWS'] > 0) {
325 $browse_table = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $titles['Browse'] . '</a>';
326 $search_table = '<a href="tbl_select.php?' . $tbl_url_query . '">' . $titles['Search'] . '</a>';
327 } else {
328 $browse_table = $titles['NoBrowse'];
329 $search_table = $titles['NoSearch'];
332 if (! $db_is_information_schema) {
333 if (! empty($each_table['TABLE_ROWS'])) {
334 $empty_table = '<a href="sql.php?' . $tbl_url_query
335 . '&amp;sql_query=';
336 $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
337 . '&amp;zero_rows='
338 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($each_table['TABLE_NAME'])))
339 . '" onclick="return confirmLink(this, \'TRUNCATE ';
340 $empty_table .= PMA_jsFormat($each_table['TABLE_NAME']) . '\')">' . $titles['Empty'] . '</a>';
341 } else {
342 $empty_table = $titles['NoEmpty'];
344 $drop_query = 'DROP '
345 . ($table_is_view ? 'VIEW' : 'TABLE')
346 . ' ' . PMA_backquote($each_table['TABLE_NAME']);
347 $drop_message = sprintf(
348 $table_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped,
349 str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME'])));
352 if ($num_columns > 0 && $num_tables > $num_columns
353 && (($row_count % $num_columns) == 0)) {
354 $row_count = 1;
355 $odd_row = true;
357 </tr>
358 </tbody>
359 </table>
360 <?php
361 PMA_TableHeader();
364 <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
365 <td align="center">
366 <input type="checkbox" name="selected_tbl[]"
367 value="<?php echo $each_table['TABLE_NAME']; ?>"
368 id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> /></td>
369 <th><label for="checkbox_tbl_<?php echo $i; ?>"
370 title="<?php echo $alias; ?>"><?php echo $truename; ?></label>
371 </th>
372 <td align="center"><?php echo $browse_table; ?></td>
373 <td align="center">
374 <a href="tbl_structure.php?<?php echo $tbl_url_query; ?>">
375 <?php echo $titles['Structure']; ?></a></td>
376 <td align="center"><?php echo $search_table; ?></td>
377 <?php if (! $db_is_information_schema) { ?>
378 <td align="center">
379 <a href="tbl_change.php?<?php echo $tbl_url_query; ?>">
380 <?php echo $titles['Insert']; ?></a></td>
381 <td align="center"><?php echo $empty_table; ?></td>
382 <td align="center">
383 <a href="sql.php?<?php echo $tbl_url_query;
384 ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php
385 echo urlencode($drop_query); ?>&amp;zero_rows=<?php
386 echo urlencode($drop_message); ?>"
387 onclick="return confirmLink(this, '<?php echo PMA_jsFormat($drop_query, false); ?>')">
388 <?php echo $titles['Drop']; ?></a></td>
389 <?php } // end if (! $db_is_information_schema)
391 // there is a null value in the ENGINE
392 // - when the table needs to be repaired, or
393 // - when it's a view
394 // so ensure that we'll display "in use" below for a table
395 // that needs to be repaired
396 if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
397 if ($table_is_view) {
398 if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']){
399 $row_count_pre = '~';
400 $sum_row_count_pre = '~';
401 $show_superscript = PMA_showHint(PMA_sanitize(sprintf($strViewHasAtLeast, '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]')));
403 } elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
404 // InnoDB table: we did not get an accurate row count
405 $row_count_pre = '~';
406 $sum_row_count_pre = '~';
407 $show_superscript = '';
408 } else {
409 $row_count_pre = '';
410 $show_superscript = '';
413 <td class="value"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
414 <?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
415 <td nowrap="nowrap"><?php echo ($table_is_view ? $strView : $each_table['ENGINE']); ?></td>
416 <?php if (isset($collation)) { ?>
417 <td nowrap="nowrap"><?php echo $collation ?></td>
418 <?php } ?>
419 <?php } ?>
421 <?php if ($is_show_stats) { ?>
422 <td class="value"><a
423 href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
424 ><?php echo $formatted_size . ' ' . $unit; ?></a></td>
425 <td class="value"><?php echo $overhead; ?></td>
426 <?php } // end if ?>
427 <?php } elseif ($table_is_view) { ?>
428 <td class="value">-</td>
429 <td><?php echo $strView; ?></td>
430 <td>---</td>
431 <?php if ($is_show_stats) { ?>
432 <td class="value">-</td>
433 <td class="value">-</td>
434 <?php } ?>
435 <?php } else { ?>
436 <td colspan="<?php echo ($structure_tbl_col_cnt - ($db_is_information_schema ? 5 : 8)) ?>"
437 align="center">
438 <?php echo $strInUse; ?></td>
439 <?php } // end if (isset($each_table['TABLE_ROWS'])) else ?>
440 </tr>
441 <?php
442 } // end foreach
444 // Show Summary
445 if ($is_show_stats) {
446 list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
447 list($overhead_formatted, $overhead_unit) =
448 PMA_formatByteDown($overhead_size, 3, 1);
451 </tbody>
452 <tbody>
453 <tr><td></td>
454 <th align="center" nowrap="nowrap">
455 <?php
456 // for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
457 // (we don't want negative numbers here) - rajk
458 if ($num_tables == 0)
459 $tableReductionCount = 0;
461 echo sprintf($strTables, PMA_formatNumber($num_tables - $tableReductionCount, 0));
463 </th>
464 <th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
465 <?php echo $strSum; ?></th>
466 <th class="value"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
467 <?php
468 if (!($cfg['PropertiesNumColumns'] > 1)) {
469 $default_engine = PMA_DBI_get_default_engine();
470 echo ' <th align="center">' . "\n"
471 . ' <dfn title="'
472 . sprintf($strDefaultEngine, $default_engine) . '">' .$default_engine . '</dfn></th>' . "\n";
473 // we got a case where $db_collation was empty
474 echo ' <th align="center">' . "\n";
475 if (! empty($db_collation)) {
476 echo ' <dfn title="'
477 . PMA_getCollationDescr($db_collation) . ' (' . $strDefault . ')">' . $db_collation
478 . '</dfn>';
480 echo '</th>';
483 if ($is_show_stats) {
485 <th class="value"><?php echo $sum_formatted . ' ' . $unit; ?></th>
486 <th class="value"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
487 <?php
490 </tr>
491 </tbody>
492 </table>
494 <div class="clearfloat">
495 <?php
496 // Check all tables url
497 $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
499 <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
500 width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
501 <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
502 onclick="if (markAllRows('tablesForm')) return false;">
503 <?php echo $strCheckAll; ?></a>
505 <a href="<?php echo $checkall_url; ?>"
506 onclick="if (unMarkAllRows('tablesForm')) return false;">
507 <?php echo $strUncheckAll; ?></a>
508 <?php if ($overhead_check != '') { ?>
510 <a href="#" onclick="unMarkAllRows('tablesForm');
511 <?php echo $overhead_check; ?> return false;">
512 <?php echo $strCheckOverhead; ?></a>
513 <?php } ?>
515 <select name="submit_mult" onchange="this.form.submit();" style="margin: 0 3em 0 3em;">
516 <?php
517 echo ' <option value="' . $strWithChecked . '" selected="selected">'
518 . $strWithChecked . '</option>' . "\n";
519 echo ' <option value="' . $strEmpty . '" >'
520 . $strEmpty . '</option>' . "\n";
521 echo ' <option value="' . $strDrop . '" >'
522 . $strDrop . '</option>' . "\n";
523 echo ' <option value="' . $strPrintView . '" >'
524 . $strPrintView . '</option>' . "\n";
525 echo ' <option value="' . $strCheckTable . '" >'
526 . $strCheckTable . '</option>' . "\n";
527 echo ' <option value="' . $strOptimizeTable . '" >'
528 . $strOptimizeTable . '</option>' . "\n";
529 echo ' <option value="' . $strRepairTable . '" >'
530 . $strRepairTable . '</option>' . "\n";
531 echo ' <option value="' . $strAnalyzeTable . '" >'
532 . $strAnalyzeTable . '</option>' . "\n";
534 </select>
535 <script type="text/javascript">
536 <!--
537 // Fake js to allow the use of the <noscript> tag
538 //-->
539 </script>
540 <noscript>
541 <input type="submit" value="<?php echo $strGo; ?>" />
542 </noscript>
543 <?php echo implode("\n", $hidden_fields) . "\n"; ?>
544 </div>
545 </form>
546 <?php
547 // display again the table list navigator
548 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
550 <hr />
552 <?php
553 // Routines
554 require './libraries/db_routines.inc.php';
556 // Events
557 if (PMA_MYSQL_INT_VERSION > 50100) {
558 require './libraries/db_events.inc.php';
562 * Work on the database
563 * redesigned 2004-05-08 by mkkeck
565 /* DATABASE WORK */
566 /* Printable view of a table */
567 echo '<p>';
568 echo '<a href="db_printview.php?' . $url_query . '">';
569 if ($cfg['PropertiesIconic']) {
570 echo '<img class="icon" src="' . $pmaThemeImage
571 .'b_print.png" width="16" height="16" alt="" />';
573 echo $strPrintView . '</a> ';
575 echo '<a href="./db_datadict.php?' . $url_query . '">';
576 if ($cfg['PropertiesIconic']) {
577 echo '<img class="icon" src="' . $pmaThemeImage
578 .'b_tblanalyse.png" width="16" height="16" alt="" />';
580 echo $strDataDict . '</a>';
581 echo '</p>';
583 if (empty($db_is_information_schema)) {
584 require './libraries/display_create_table.lib.php';
585 } // end if (Create Table dialog)
588 * Displays the footer
590 require_once './libraries/footer.inc.php';