Merge remote branch 'pootle/master'
[phpmyadmin/dkf.git] / db_structure.php
blobf16654778a431b80d37b643b839fae95f0b9c55b
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';
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);
27 // see bug #2794840; in this case, code path is:
28 // db_structure.php -> libraries/mult_submits.inc.php -> sql.php
29 // -> db_structure.php and if we got an error on the multi submit,
30 // we must display it here and not call again mult_submits.inc.php
31 if (! isset($error) || FALSE === $error) {
32 require './libraries/mult_submits.inc.php';
34 if (empty($message)) {
35 $message = PMA_Message::success();
38 require './libraries/db_common.inc.php';
39 $url_query .= '&amp;goto=db_structure.php';
41 // Gets the database structure
42 $sub_part = '_structure';
43 require './libraries/db_info.inc.php';
45 require_once './libraries/replication.inc.php';
48 // 1. No tables
49 if ($num_tables == 0) {
50 echo '<p>' . __('No tables found in database.') . '</p>' . "\n";
52 if (empty($db_is_information_schema)) {
53 require './libraries/display_create_table.lib.php';
54 } // end if (Create Table dialog)
56 /**
57 * Displays the footer
59 require './libraries/footer.inc.php';
60 exit;
63 // else
64 // 2. Shows table informations
66 require_once './libraries/bookmark.lib.php';
68 require_once './libraries/mysql_charsets.lib.php';
69 $db_collation = PMA_getDbCollation($db);
71 // in a separate file to avoid redeclaration of functions in some code paths
72 require_once './libraries/db_structure.lib.php';
74 $titles = array();
75 if (true == $cfg['PropertiesIconic']) {
76 $titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
77 $titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
78 $titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
79 $titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
80 $titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
81 $titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
82 $titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />';
83 $titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
84 $titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
85 $titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
86 $titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
88 if ('both' === $cfg['PropertiesIconic']) {
89 $titles['Browse'] .= __('Browse');
90 $titles['Search'] .= __('Search');
91 $titles['NoBrowse'] .= __('Browse');
92 $titles['NoSearch'] .= __('Search');
93 $titles['Insert'] .= __('Insert');
94 $titles['NoInsert'] .= __('Insert');
95 $titles['Structure'] .= __('Structure');
96 $titles['Drop'] .= __('Drop');
97 $titles['NoDrop'] .= __('Drop');
98 $titles['Empty'] .= __('Empty');
99 $titles['NoEmpty'] .= __('Empty');
101 } else {
102 $titles['Browse'] = __('Browse');
103 $titles['Search'] = __('Search');
104 $titles['NoBrowse'] = __('Browse');
105 $titles['NoSearch'] = __('Search');
106 $titles['Insert'] = __('Insert');
107 $titles['NoInsert'] = __('Insert');
108 $titles['Structure'] = __('Structure');
109 $titles['Drop'] = __('Drop');
110 $titles['NoDrop'] = __('Drop');
111 $titles['Empty'] = __('Empty');
112 $titles['NoEmpty'] = __('Empty');
116 * Displays the tables list
118 $_url_params = array(
119 'pos' => $pos,
120 'db' => $db);
122 // Add the sort options if they exists
123 if (isset($_REQUEST['sort'])) {
124 $_url_params['sort'] = $_REQUEST['sort'];
127 if (isset($_REQUEST['sort_order'])) {
128 $_url_params['sort_order'] = $_REQUEST['sort_order'];
131 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
134 <form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
135 <?php
136 echo PMA_generate_common_hidden_inputs($db);
138 PMA_TableHeader($db_is_information_schema, $server_slave_status);
140 $i = $sum_entries = 0;
141 $sum_size = (double) 0;
142 $overhead_size = (double) 0;
143 $overhead_check = '';
144 $checked = !empty($checkall) ? ' checked="checked"' : '';
145 $num_columns = $cfg['PropertiesNumColumns'] > 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0;
146 $row_count = 0;
149 $hidden_fields = array();
150 $odd_row = true;
151 $sum_row_count_pre = '';
153 $tableReductionCount = 0; // the amount to reduce the table count by
155 foreach ($tables as $keyname => $each_table) {
156 if (PMA_BS_IsHiddenTable($keyname)) {
157 $tableReductionCount++;
158 continue;
161 // Get valid statistics whatever is the table type
163 $table_is_view = false;
164 $table_encoded = urlencode($each_table['TABLE_NAME']);
165 // Sets parameters for links
166 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
167 // do not list the previous table's size info for a view
168 $formatted_size = '-';
169 $unit = '';
171 switch ( $each_table['ENGINE']) {
172 // MyISAM, ISAM or Heap table: Row count, data size and index size
173 // are accurate; data size is accurate for ARCHIVE
174 case 'MyISAM' :
175 case 'ISAM' :
176 case 'HEAP' :
177 case 'MEMORY' :
178 case 'ARCHIVE' :
179 if ($db_is_information_schema) {
180 $each_table['Rows'] = PMA_Table::countRecords($db,
181 $each_table['Name']);
184 if ($is_show_stats) {
185 $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']);
186 $sum_size += $tblsize;
187 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
188 if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) {
189 list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0);
190 $overhead_size += $each_table['Data_free'];
193 break;
194 case 'InnoDB' :
195 // InnoDB table: Row count is not accurate but data and index
196 // sizes are.
198 if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
199 $each_table['COUNTED'] = true;
200 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
201 $each_table['TABLE_NAME'], $force_exact = true,
202 $is_view = false);
203 } else {
204 $each_table['COUNTED'] = false;
207 if ($is_show_stats) {
208 $tblsize = $each_table['Data_length'] + $each_table['Index_length'];
209 $sum_size += $tblsize;
210 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
212 //$display_rows = ' - ';
213 break;
214 // Mysql 5.0.x (and lower) uses MRG_MyISAM and MySQL 5.1.x (and higher) uses MRG_MYISAM
215 // Both are aliases for MERGE
216 case 'MRG_MyISAM' :
217 case 'MRG_MYISAM' :
218 case 'MERGE' :
219 case 'BerkeleyDB' :
220 // Merge or BerkleyDB table: Only row count is accurate.
221 if ($is_show_stats) {
222 $formatted_size = ' - ';
223 $unit = '';
225 break;
226 // for a view, the ENGINE is sometimes reported as null,
227 // or on some servers it's reported as "SYSTEM VIEW"
228 case null :
229 case 'SYSTEM VIEW' :
230 // if table is broken, Engine is reported as null, so one more test
231 if ($each_table['TABLE_TYPE'] == 'VIEW') {
232 // countRecords() takes care of $cfg['MaxExactCountViews']
233 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
234 $each_table['TABLE_NAME'], $force_exact = true,
235 $is_view = true);
236 $table_is_view = true;
238 break;
239 default :
240 // Unknown table type.
241 if ($is_show_stats) {
242 $formatted_size = 'unknown';
243 $unit = '';
245 } // end switch
247 if (! PMA_Table::isMerge($db, $each_table['TABLE_NAME'])) {
248 $sum_entries += $each_table['TABLE_ROWS'];
251 if (isset($each_table['Collation'])) {
252 $collation = '<dfn title="'
253 . PMA_getCollationDescr($each_table['Collation']) . '">'
254 . $each_table['Collation'] . '</dfn>';
255 } else {
256 $collation = '---';
259 if ($is_show_stats) {
260 if (isset($formatted_overhead)) {
261 $overhead = '<a href="tbl_structure.php?'
262 . $tbl_url_query . '#showusage">' . $formatted_overhead
263 . ' ' . $overhead_unit . '</a>' . "\n";
264 unset($formatted_overhead);
265 $overhead_check .=
266 "document.getElementById('checkbox_tbl_" . ($i + 1) . "').checked = true;";
267 } else {
268 $overhead = '-';
270 } // end if
272 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
273 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
274 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
275 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']]))
276 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
277 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
279 $i++;
281 $row_count++;
282 if ($table_is_view) {
283 $hidden_fields[] = '<input type="hidden" name="views[]" value="' . htmlspecialchars($each_table['TABLE_NAME']) . '" />';
286 if ($each_table['TABLE_ROWS'] > 0) {
287 $browse_table = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $titles['Browse'] . '</a>';
288 $search_table = '<a href="tbl_select.php?' . $tbl_url_query . '">' . $titles['Search'] . '</a>';
289 $browse_table_label = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $truename . '</a>';
290 } else {
291 $browse_table = $titles['NoBrowse'];
292 $search_table = $titles['NoSearch'];
293 $browse_table_label = '<a href="tbl_structure.php?' . $tbl_url_query . '">' . $truename . '</a>';
296 if (! $db_is_information_schema) {
297 if (! empty($each_table['TABLE_ROWS'])) {
298 $empty_table = '<a class="truncate_table_anchor" href="sql.php?' . $tbl_url_query
299 . '&amp;sql_query=';
300 $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
301 . '&amp;message_to_show='
302 . urlencode(sprintf(__('Table %s has been emptied'), htmlspecialchars($each_table['TABLE_NAME'])))
303 .'">' . $titles['Empty'] . '</a>';
304 } else {
305 $empty_table = $titles['NoEmpty'];
307 $drop_query = 'DROP '
308 . ($table_is_view ? 'VIEW' : 'TABLE')
309 . ' ' . PMA_backquote($each_table['TABLE_NAME']);
310 $drop_message = sprintf(
311 $table_is_view ? __('View %s has been dropped') : __('Table %s has been dropped'),
312 str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME'])));
315 $tracking_icon = '';
316 if (PMA_Tracker::isActive()) {
317 if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) {
318 $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>';
319 } elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) {
320 $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>';
324 if ($num_columns > 0 && $num_tables > $num_columns
325 && (($row_count % $num_columns) == 0)) {
326 $row_count = 1;
327 $odd_row = true;
329 </tr>
330 </tbody>
331 </table>
332 <?php
333 PMA_TableHeader(false, $server_slave_status);
336 $ignored = false;
337 $do = false;
339 if ($server_slave_status) {
340 ////////////////////////////////////////////////////////////////
342 if ((strlen(array_search($truename, $server_slave_Do_Table)) > 0)
343 || (strlen(array_search($db, $server_slave_Do_DB)) > 0)
344 || (count($server_slave_Do_DB) == 1 && count($server_slave_Ignore_DB) == 1)
346 $do = true;
348 foreach ($server_slave_Wild_Do_Table as $db_table) {
349 $table_part = PMA_extract_db_or_table($db_table, 'table');
350 if (($db == PMA_extract_db_or_table($db_table, 'db')) && (preg_match("@^" . substr($table_part, 0, strlen($table_part) - 1) . "@", $truename))) {
351 $do = true;
354 ////////////////////////////////////////////////////////////////////
355 if ((strlen(array_search($truename, $server_slave_Ignore_Table)) > 0) || (strlen(array_search($db, $server_slave_Ignore_DB)) > 0)) {
356 $ignored = true;
358 foreach ($server_slave_Wild_Ignore_Table as $db_table) {
359 $table_part = PMA_extract_db_or_table($db_table, 'table');
360 if (($db == PMA_extract_db_or_table($db_table)) && (preg_match("@^" . substr($table_part, 0, strlen($table_part) - 1) . "@", $truename))) {
361 $ignored = true;
364 unset($table_part);
367 <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
368 <td align="center">
369 <input type="checkbox" name="selected_tbl[]"
370 value="<?php echo htmlspecialchars($each_table['TABLE_NAME']); ?>"
371 id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> /></td>
372 <th><?php echo $browse_table_label; ?>
373 <?php echo (! empty($tracking_icon) ? $tracking_icon : ''); ?>
374 </th>
375 <?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 } ?>
376 <td align="center"><?php echo $browse_table; ?></td>
377 <td align="center">
378 <a href="tbl_structure.php?<?php echo $tbl_url_query; ?>">
379 <?php echo $titles['Structure']; ?></a></td>
380 <td align="center"><?php echo $search_table; ?></td>
381 <?php if (! $db_is_information_schema) { ?>
382 <td align="center">
383 <a href="tbl_change.php?<?php echo $tbl_url_query; ?>">
384 <?php echo $titles['Insert']; ?></a></td>
385 <td align="center"><?php echo $empty_table; ?></td>
386 <td align="center">
387 <a class="drop_table_anchor" href="sql.php?<?php echo $tbl_url_query;
388 ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php
389 echo urlencode($drop_query); ?>&amp;message_to_show=<?php
390 echo urlencode($drop_message); ?>" >
391 <?php echo $titles['Drop']; ?></a></td>
392 <?php } // end if (! $db_is_information_schema)
394 // there is a null value in the ENGINE
395 // - when the table needs to be repaired, or
396 // - when it's a view
397 // so ensure that we'll display "in use" below for a table
398 // that needs to be repaired
399 if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
400 if ($table_is_view) {
401 if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']){
402 $row_count_pre = '~';
403 $sum_row_count_pre = '~';
404 $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]')));
406 } elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
407 // InnoDB table: we did not get an accurate row count
408 $row_count_pre = '~';
409 $sum_row_count_pre = '~';
410 $show_superscript = '';
411 } else {
412 $row_count_pre = '';
413 $show_superscript = '';
416 <td class="value"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
417 <?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
418 <td nowrap="nowrap"><?php echo ($table_is_view ? __('View') : $each_table['ENGINE']); ?></td>
419 <?php if (isset($collation)) { ?>
420 <td nowrap="nowrap"><?php echo $collation ?></td>
421 <?php } ?>
422 <?php } ?>
424 <?php if ($is_show_stats) { ?>
425 <td class="value"><a
426 href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
427 ><?php echo $formatted_size . ' ' . $unit; ?></a></td>
428 <td class="value"><?php echo $overhead; ?></td>
429 <?php } // end if ?>
430 <?php } elseif ($table_is_view) { ?>
431 <td class="value">-</td>
432 <td><?php echo __('View'); ?></td>
433 <td>---</td>
434 <?php if ($is_show_stats) { ?>
435 <td class="value">-</td>
436 <td class="value">-</td>
437 <?php } ?>
438 <?php } else { ?>
439 <td colspan="<?php echo ($colspan_for_structure - ($db_is_information_schema ? 5 : 8)) ?>"
440 align="center">
441 <?php echo __('in use'); ?></td>
442 <?php } // end if (isset($each_table['TABLE_ROWS'])) else ?>
443 </tr>
444 <?php
445 } // end foreach
447 // Show Summary
448 if ($is_show_stats) {
449 list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
450 list($overhead_formatted, $overhead_unit) =
451 PMA_formatByteDown($overhead_size, 3, 1);
454 </tbody>
455 <tbody id="tbl_summary_row">
456 <tr><th></th>
457 <th align="center" nowrap="nowrap">
458 <?php
459 // for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
460 // (we don't want negative numbers here)
461 if ($num_tables == 0)
462 $tableReductionCount = 0;
464 echo sprintf(_ngettext('%s table', '%s tables', $num_tables - $tableReductionCount), PMA_formatNumber($num_tables - $tableReductionCount, 0));
466 </th>
467 <?php
468 if ($server_slave_status) {
469 echo ' <th>' . __('Replication') . '</th>' . "\n";
472 <th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
473 <?php echo __('Sum'); ?></th>
474 <th class="value"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
475 <?php
476 if (!($cfg['PropertiesNumColumns'] > 1)) {
477 $default_engine = PMA_DBI_get_default_engine();
478 echo ' <th align="center">' . "\n"
479 . ' <dfn title="'
480 . sprintf(__('%s is the default storage engine on this MySQL server.'), $default_engine) . '">' .$default_engine . '</dfn></th>' . "\n";
481 // we got a case where $db_collation was empty
482 echo ' <th align="center">' . "\n";
483 if (! empty($db_collation)) {
484 echo ' <dfn title="'
485 . PMA_getCollationDescr($db_collation) . ' (' . __('Default') . ')">' . $db_collation
486 . '</dfn>';
488 echo '</th>';
491 if ($is_show_stats) {
493 <th class="value"><?php echo $sum_formatted . ' ' . $unit; ?></th>
494 <th class="value"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
495 <?php
498 </tr>
499 </tbody>
500 </table>
502 <div class="clearfloat">
503 <?php
504 // Check all tables url
505 $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
507 <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
508 width="38" height="22" alt="<?php echo __('With selected:'); ?>" />
509 <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
510 onclick="if (markAllRows('tablesForm')) return false;">
511 <?php echo __('Check All'); ?></a>
513 <a href="<?php echo $checkall_url; ?>"
514 onclick="if (unMarkAllRows('tablesForm')) return false;">
515 <?php echo __('Uncheck All'); ?></a>
516 <?php if ($overhead_check != '') { ?>
518 <a href="#" onclick="unMarkAllRows('tablesForm');
519 <?php echo $overhead_check; ?> return false;">
520 <?php echo __('Check tables having overhead'); ?></a>
521 <?php } ?>
523 <select name="submit_mult" onchange="this.form.submit();" style="margin: 0 3em 0 3em;">
524 <?php
525 echo ' <option value="' . __('With selected:') . '" selected="selected">'
526 . __('With selected:') . '</option>' . "\n";
527 echo ' <option value="' . __('Export') . '" >'
528 . __('Export') . '</option>' . "\n";
529 echo ' <option value="' . __('Print view') . '" >'
530 . __('Print view') . '</option>' . "\n";
532 if (!$db_is_information_schema) {
533 echo ' <option value="' . __('Empty') . '" >'
534 . __('Empty') . '</option>' . "\n";
535 echo ' <option value="' . __('Drop') . '" >'
536 . __('Drop') . '</option>' . "\n";
537 echo ' <option value="' . __('Check table') . '" >'
538 . __('Check table') . '</option>' . "\n";
539 echo ' <option value="' . __('Optimize table') . '" >'
540 . __('Optimize table') . '</option>' . "\n";
541 echo ' <option value="' . __('Repair table') . '" >'
542 . __('Repair table') . '</option>' . "\n";
543 echo ' <option value="' . __('Analyze table') . '" >'
544 . __('Analyze table') . '</option>' . "\n";
547 </select>
548 <script type="text/javascript">
549 <!--
550 // Fake js to allow the use of the <noscript> tag
551 //-->
552 </script>
553 <noscript>
554 <input type="submit" value="<?php echo __('Go'); ?>" />
555 </noscript>
556 <?php echo implode("\n", $hidden_fields) . "\n"; ?>
557 </div>
558 </form>
559 <?php
560 // display again the table list navigator
561 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
563 <hr />
565 <?php
566 // Routines
567 require './libraries/db_routines.inc.php';
569 // Events
570 if (PMA_MYSQL_INT_VERSION > 50100) {
571 require './libraries/db_events.inc.php';
575 * Work on the database
576 * redesigned 2004-05-08 by mkkeck
578 /* DATABASE WORK */
579 /* Printable view of a table */
580 echo '<p>';
581 echo '<a href="db_printview.php?' . $url_query . '">';
582 if ($cfg['PropertiesIconic']) {
583 echo '<img class="icon" src="' . $pmaThemeImage
584 .'b_print.png" width="16" height="16" alt="" />';
586 echo __('Print view') . '</a> ';
588 echo '<a href="./db_datadict.php?' . $url_query . '">';
589 if ($cfg['PropertiesIconic']) {
590 echo '<img class="icon" src="' . $pmaThemeImage
591 .'b_tblanalyse.png" width="16" height="16" alt="" />';
593 echo __('Data Dictionary') . '</a>';
594 echo '</p>';
596 if (empty($db_is_information_schema)) {
597 require './libraries/display_create_table.lib.php';
598 } // end if (Create Table dialog)
601 * Displays the footer
603 require './libraries/footer.inc.php';