Translation update done using Pootle.
[phpmyadmin/dkf.git] / db_structure.php
blob9e118210b382499dec216314e31c1a229caa9575
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';
15 /**
16 * Prepares the tables list if the user where not redirected to this script
17 * because there is no table in the database ($is_info is true)
19 if (empty($is_info)) {
20 // Drops/deletes/etc. multiple tables if required
21 if ((!empty($submit_mult) && isset($selected_tbl))
22 || isset($mult_btn)) {
23 $action = 'db_structure.php';
24 $err_url = 'db_structure.php?'. PMA_generate_common_url($db);
26 // see bug #2794840; in this case, code path is:
27 // db_structure.php -> libraries/mult_submits.inc.php -> sql.php
28 // -> db_structure.php and if we got an error on the multi submit,
29 // we must display it here and not call again mult_submits.inc.php
30 if (! isset($error) || FALSE === $error) {
31 require './libraries/mult_submits.inc.php';
33 if (empty($message)) {
34 $message = PMA_Message::success();
37 require './libraries/db_common.inc.php';
38 $url_query .= '&amp;goto=db_structure.php';
40 // Gets the database structure
41 $sub_part = '_structure';
42 require './libraries/db_info.inc.php';
44 require_once './libraries/replication.inc.php';
47 // 1. No tables
48 if ($num_tables == 0) {
49 echo '<p>' . __('No tables found in database.') . '</p>' . "\n";
51 if (empty($db_is_information_schema)) {
52 require './libraries/display_create_table.lib.php';
53 } // end if (Create Table dialog)
55 /**
56 * Displays the footer
58 require './libraries/footer.inc.php';
59 exit;
62 // else
63 // 2. Shows table informations
65 require_once './libraries/bookmark.lib.php';
67 require_once './libraries/mysql_charsets.lib.php';
68 $db_collation = PMA_getDbCollation($db);
70 // in a separate file to avoid redeclaration of functions in some code paths
71 require_once './libraries/db_structure.lib.php';
73 $titles = array();
74 if (true == $cfg['PropertiesIconic']) {
75 $titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
76 $titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
77 $titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
78 $titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
79 $titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
80 $titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
81 $titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />';
82 $titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
83 $titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
84 $titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
85 $titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
87 if ('both' === $cfg['PropertiesIconic']) {
88 $titles['Browse'] .= __('Browse');
89 $titles['Search'] .= __('Search');
90 $titles['NoBrowse'] .= __('Browse');
91 $titles['NoSearch'] .= __('Search');
92 $titles['Insert'] .= __('Insert');
93 $titles['NoInsert'] .= __('Insert');
94 $titles['Structure'] .= __('Structure');
95 $titles['Drop'] .= __('Drop');
96 $titles['NoDrop'] .= __('Drop');
97 $titles['Empty'] .= __('Empty');
98 $titles['NoEmpty'] .= __('Empty');
100 } else {
101 $titles['Browse'] = __('Browse');
102 $titles['Search'] = __('Search');
103 $titles['NoBrowse'] = __('Browse');
104 $titles['NoSearch'] = __('Search');
105 $titles['Insert'] = __('Insert');
106 $titles['NoInsert'] = __('Insert');
107 $titles['Structure'] = __('Structure');
108 $titles['Drop'] = __('Drop');
109 $titles['NoDrop'] = __('Drop');
110 $titles['Empty'] = __('Empty');
111 $titles['NoEmpty'] = __('Empty');
115 * Displays the tables list
117 $_url_params = array(
118 'pos' => $pos,
119 'db' => $db);
121 // Add the sort options if they exists
122 if (isset($_REQUEST['sort'])) {
123 $_url_params['sort'] = $_REQUEST['sort'];
126 if (isset($_REQUEST['sort_order'])) {
127 $_url_params['sort_order'] = $_REQUEST['sort_order'];
130 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
133 <form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
134 <?php
135 echo PMA_generate_common_hidden_inputs($db);
137 PMA_TableHeader($db_is_information_schema, $server_slave_status);
139 $i = $sum_entries = 0;
140 $sum_size = (double) 0;
141 $overhead_size = (double) 0;
142 $overhead_check = '';
143 $checked = !empty($checkall) ? ' checked="checked"' : '';
144 $num_columns = $cfg['PropertiesNumColumns'] > 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0;
145 $row_count = 0;
148 $hidden_fields = array();
149 $odd_row = true;
150 $sum_row_count_pre = '';
152 $tableReductionCount = 0; // the amount to reduce the table count by
154 foreach ($tables as $keyname => $each_table) {
155 if (PMA_BS_IsHiddenTable($keyname)) {
156 $tableReductionCount++;
157 continue;
160 // Get valid statistics whatever is the table type
162 $table_is_view = false;
163 $table_encoded = urlencode($each_table['TABLE_NAME']);
164 // Sets parameters for links
165 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
166 // do not list the previous table's size info for a view
167 $formatted_size = '-';
168 $unit = '';
170 switch ( $each_table['ENGINE']) {
171 // MyISAM, ISAM or Heap table: Row count, data size and index size
172 // are accurate; data size is accurate for ARCHIVE
173 case 'MyISAM' :
174 case 'ISAM' :
175 case 'HEAP' :
176 case 'MEMORY' :
177 case 'ARCHIVE' :
178 if ($db_is_information_schema) {
179 $each_table['Rows'] = PMA_Table::countRecords($db,
180 $each_table['Name']);
183 if ($is_show_stats) {
184 $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']);
185 $sum_size += $tblsize;
186 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
187 if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) {
188 list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0);
189 $overhead_size += $each_table['Data_free'];
192 break;
193 case 'InnoDB' :
194 // InnoDB table: Row count is not accurate but data and index
195 // sizes are.
197 if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
198 $each_table['COUNTED'] = true;
199 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
200 $each_table['TABLE_NAME'], $force_exact = true,
201 $is_view = false);
202 } else {
203 $each_table['COUNTED'] = false;
206 if ($is_show_stats) {
207 $tblsize = $each_table['Data_length'] + $each_table['Index_length'];
208 $sum_size += $tblsize;
209 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
211 //$display_rows = ' - ';
212 break;
213 // Mysql 5.0.x (and lower) uses MRG_MyISAM and MySQL 5.1.x (and higher) uses MRG_MYISAM
214 // Both are aliases for MERGE
215 case 'MRG_MyISAM' :
216 case 'MRG_MYISAM' :
217 case 'MERGE' :
218 case 'BerkeleyDB' :
219 // Merge or BerkleyDB table: Only row count is accurate.
220 if ($is_show_stats) {
221 $formatted_size = ' - ';
222 $unit = '';
224 break;
225 // for a view, the ENGINE is sometimes reported as null,
226 // or on some servers it's reported as "SYSTEM VIEW"
227 case null :
228 case 'SYSTEM VIEW' :
229 // if table is broken, Engine is reported as null, so one more test
230 if ($each_table['TABLE_TYPE'] == 'VIEW') {
231 // countRecords() takes care of $cfg['MaxExactCountViews']
232 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
233 $each_table['TABLE_NAME'], $force_exact = true,
234 $is_view = true);
235 $table_is_view = true;
237 break;
238 default :
239 // Unknown table type.
240 if ($is_show_stats) {
241 $formatted_size = 'unknown';
242 $unit = '';
244 } // end switch
246 if (! PMA_Table::isMerge($db, $each_table['TABLE_NAME'])) {
247 $sum_entries += $each_table['TABLE_ROWS'];
250 if (isset($each_table['Collation'])) {
251 $collation = '<dfn title="'
252 . PMA_getCollationDescr($each_table['Collation']) . '">'
253 . $each_table['Collation'] . '</dfn>';
254 } else {
255 $collation = '---';
258 if ($is_show_stats) {
259 if (isset($formatted_overhead)) {
260 $overhead = '<a href="tbl_structure.php?'
261 . $tbl_url_query . '#showusage">' . $formatted_overhead
262 . ' ' . $overhead_unit . '</a>' . "\n";
263 unset($formatted_overhead);
264 $overhead_check .=
265 "document.getElementById('checkbox_tbl_" . ($i + 1) . "').checked = true;";
266 } else {
267 $overhead = '-';
269 } // end if
271 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
272 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
273 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
274 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']]))
275 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
276 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
278 $i++;
280 $row_count++;
281 if ($table_is_view) {
282 $hidden_fields[] = '<input type="hidden" name="views[]" value="' . htmlspecialchars($each_table['TABLE_NAME']) . '" />';
285 if ($each_table['TABLE_ROWS'] > 0) {
286 $browse_table = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $titles['Browse'] . '</a>';
287 $search_table = '<a href="tbl_select.php?' . $tbl_url_query . '">' . $titles['Search'] . '</a>';
288 $browse_table_label = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $truename . '</a>';
289 } else {
290 $browse_table = $titles['NoBrowse'];
291 $search_table = $titles['NoSearch'];
292 $browse_table_label = '<a href="tbl_structure.php?' . $tbl_url_query . '">' . $truename . '</a>';
295 if (! $db_is_information_schema) {
296 if (! empty($each_table['TABLE_ROWS'])) {
297 $empty_table = '<a href="sql.php?' . $tbl_url_query
298 . '&amp;sql_query=';
299 $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
300 . '&amp;zero_rows='
301 . urlencode(sprintf(__('Table %s has been emptied'), htmlspecialchars($each_table['TABLE_NAME'])))
302 . '" onclick="return confirmLink(this, \'TRUNCATE ';
303 $empty_table .= PMA_jsFormat($each_table['TABLE_NAME']) . '\')">' . $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 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;zero_rows=<?php
390 echo urlencode($drop_message); ?>"
391 onclick="return confirmLink(this, '<?php echo PMA_jsFormat($drop_query, false); ?>')">
392 <?php echo $titles['Drop']; ?></a></td>
393 <?php } // end if (! $db_is_information_schema)
395 // there is a null value in the ENGINE
396 // - when the table needs to be repaired, or
397 // - when it's a view
398 // so ensure that we'll display "in use" below for a table
399 // that needs to be repaired
400 if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
401 if ($table_is_view) {
402 if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']){
403 $row_count_pre = '~';
404 $sum_row_count_pre = '~';
405 $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]')));
407 } elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
408 // InnoDB table: we did not get an accurate row count
409 $row_count_pre = '~';
410 $sum_row_count_pre = '~';
411 $show_superscript = '';
412 } else {
413 $row_count_pre = '';
414 $show_superscript = '';
417 <td class="value"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
418 <?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
419 <td nowrap="nowrap"><?php echo ($table_is_view ? __('View') : $each_table['ENGINE']); ?></td>
420 <?php if (isset($collation)) { ?>
421 <td nowrap="nowrap"><?php echo $collation ?></td>
422 <?php } ?>
423 <?php } ?>
425 <?php if ($is_show_stats) { ?>
426 <td class="value"><a
427 href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
428 ><?php echo $formatted_size . ' ' . $unit; ?></a></td>
429 <td class="value"><?php echo $overhead; ?></td>
430 <?php } // end if ?>
431 <?php } elseif ($table_is_view) { ?>
432 <td class="value">-</td>
433 <td><?php echo __('View'); ?></td>
434 <td>---</td>
435 <?php if ($is_show_stats) { ?>
436 <td class="value">-</td>
437 <td class="value">-</td>
438 <?php } ?>
439 <?php } else { ?>
440 <td colspan="<?php echo ($colspan_for_structure - ($db_is_information_schema ? 5 : 8)) ?>"
441 align="center">
442 <?php echo __('in use'); ?></td>
443 <?php } // end if (isset($each_table['TABLE_ROWS'])) else ?>
444 </tr>
445 <?php
446 } // end foreach
448 // Show Summary
449 if ($is_show_stats) {
450 list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
451 list($overhead_formatted, $overhead_unit) =
452 PMA_formatByteDown($overhead_size, 3, 1);
455 </tbody>
456 <tbody>
457 <tr><th></th>
458 <th align="center" nowrap="nowrap">
459 <?php
460 // for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
461 // (we don't want negative numbers here)
462 if ($num_tables == 0)
463 $tableReductionCount = 0;
465 echo sprintf(_ngettext('%s table', '%s tables', $num_tables - $tableReductionCount), PMA_formatNumber($num_tables - $tableReductionCount, 0));
467 </th>
468 <?php
469 if ($server_slave_status) {
470 echo ' <th>' . __('Replication') . '</th>' . "\n";
473 <th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
474 <?php echo __('Sum'); ?></th>
475 <th class="value"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
476 <?php
477 if (!($cfg['PropertiesNumColumns'] > 1)) {
478 $default_engine = PMA_DBI_get_default_engine();
479 echo ' <th align="center">' . "\n"
480 . ' <dfn title="'
481 . sprintf(__('%s is the default storage engine on this MySQL server.'), $default_engine) . '">' .$default_engine . '</dfn></th>' . "\n";
482 // we got a case where $db_collation was empty
483 echo ' <th align="center">' . "\n";
484 if (! empty($db_collation)) {
485 echo ' <dfn title="'
486 . PMA_getCollationDescr($db_collation) . ' (' . __('Default') . ')">' . $db_collation
487 . '</dfn>';
489 echo '</th>';
492 if ($is_show_stats) {
494 <th class="value"><?php echo $sum_formatted . ' ' . $unit; ?></th>
495 <th class="value"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
496 <?php
499 </tr>
500 </tbody>
501 </table>
503 <div class="clearfloat">
504 <?php
505 // Check all tables url
506 $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
508 <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
509 width="38" height="22" alt="<?php echo __('With selected:'); ?>" />
510 <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
511 onclick="if (markAllRows('tablesForm')) return false;">
512 <?php echo __('Check All'); ?></a>
514 <a href="<?php echo $checkall_url; ?>"
515 onclick="if (unMarkAllRows('tablesForm')) return false;">
516 <?php echo __('Uncheck All'); ?></a>
517 <?php if ($overhead_check != '') { ?>
519 <a href="#" onclick="unMarkAllRows('tablesForm');
520 <?php echo $overhead_check; ?> return false;">
521 <?php echo __('Check tables having overhead'); ?></a>
522 <?php } ?>
524 <select name="submit_mult" onchange="this.form.submit();" style="margin: 0 3em 0 3em;">
525 <?php
526 echo ' <option value="' . __('With selected:') . '" selected="selected">'
527 . __('With selected:') . '</option>' . "\n";
528 echo ' <option value="' . __('Empty') . '" >'
529 . __('Empty') . '</option>' . "\n";
530 echo ' <option value="' . __('Drop') . '" >'
531 . __('Drop') . '</option>' . "\n";
532 echo ' <option value="' . __('Print view') . '" >'
533 . __('Print view') . '</option>' . "\n";
534 echo ' <option value="' . __('Check table') . '" >'
535 . __('Check table') . '</option>' . "\n";
536 echo ' <option value="' . __('Optimize table') . '" >'
537 . __('Optimize table') . '</option>' . "\n";
538 echo ' <option value="' . __('Repair table') . '" >'
539 . __('Repair table') . '</option>' . "\n";
540 echo ' <option value="' . __('Analyze table') . '" >'
541 . __('Analyze table') . '</option>' . "\n";
542 echo ' <option value="' . __('Export') . '" >'
543 . __('Export') . '</option>' . "\n";
545 </select>
546 <script type="text/javascript">
547 <!--
548 // Fake js to allow the use of the <noscript> tag
549 //-->
550 </script>
551 <noscript>
552 <input type="submit" value="<?php echo __('Go'); ?>" />
553 </noscript>
554 <?php echo implode("\n", $hidden_fields) . "\n"; ?>
555 </div>
556 </form>
557 <?php
558 // display again the table list navigator
559 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
561 <hr />
563 <?php
564 // Routines
565 require './libraries/db_routines.inc.php';
567 // Events
568 if (PMA_MYSQL_INT_VERSION > 50100) {
569 require './libraries/db_events.inc.php';
573 * Work on the database
574 * redesigned 2004-05-08 by mkkeck
576 /* DATABASE WORK */
577 /* Printable view of a table */
578 echo '<p>';
579 echo '<a href="db_printview.php?' . $url_query . '">';
580 if ($cfg['PropertiesIconic']) {
581 echo '<img class="icon" src="' . $pmaThemeImage
582 .'b_print.png" width="16" height="16" alt="" />';
584 echo __('Print view') . '</a> ';
586 echo '<a href="./db_datadict.php?' . $url_query . '">';
587 if ($cfg['PropertiesIconic']) {
588 echo '<img class="icon" src="' . $pmaThemeImage
589 .'b_tblanalyse.png" width="16" height="16" alt="" />';
591 echo __('Data Dictionary') . '</a>';
592 echo '</p>';
594 if (empty($db_is_information_schema)) {
595 require './libraries/display_create_table.lib.php';
596 } // end if (Create Table dialog)
599 * Displays the footer
601 require './libraries/footer.inc.php';