Revert initial commit
[phpmyadmin/blinky.git] / db_structure.php
blob0fa4873daad96e980c53880ca218b622ef81ed42
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 * @package phpMyAdmin
7 */
9 /**
12 require_once './libraries/common.inc.php';
13 require_once './libraries/Table.class.php';
15 $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.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 require_once './libraries/replication.inc.php';
49 // 1. No tables
50 if ($num_tables == 0) {
51 echo '<p>' . __('No tables found in database.') . '</p>' . "\n";
53 if (empty($db_is_information_schema)) {
54 require './libraries/display_create_table.lib.php';
55 } // end if (Create Table dialog)
57 /**
58 * Displays the footer
60 require_once './libraries/footer.inc.php';
61 exit;
64 // else
65 // 2. Shows table informations
67 require_once './libraries/bookmark.lib.php';
69 require_once './libraries/mysql_charsets.lib.php';
70 $db_collation = PMA_getDbCollation($db);
72 // in a separate file to avoid redeclaration of functions in some code paths
73 require_once './libraries/db_structure.lib.php';
75 $titles = array();
76 if (true == $cfg['PropertiesIconic']) {
77 $titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
78 $titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />';
79 $titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
80 $titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />';
81 $titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
82 $titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />';
83 $titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />';
84 $titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
85 $titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />';
86 $titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
87 $titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />';
89 if ('both' === $cfg['PropertiesIconic']) {
90 $titles['Browse'] .= __('Browse');
91 $titles['Search'] .= __('Search');
92 $titles['NoBrowse'] .= __('Browse');
93 $titles['NoSearch'] .= __('Search');
94 $titles['Insert'] .= __('Insert');
95 $titles['NoInsert'] .= __('Insert');
96 $titles['Structure'] .= __('Structure');
97 $titles['Drop'] .= __('Drop');
98 $titles['NoDrop'] .= __('Drop');
99 $titles['Empty'] .= __('Empty');
100 $titles['NoEmpty'] .= __('Empty');
102 } else {
103 $titles['Browse'] = __('Browse');
104 $titles['Search'] = __('Search');
105 $titles['NoBrowse'] = __('Browse');
106 $titles['NoSearch'] = __('Search');
107 $titles['Insert'] = __('Insert');
108 $titles['NoInsert'] = __('Insert');
109 $titles['Structure'] = __('Structure');
110 $titles['Drop'] = __('Drop');
111 $titles['NoDrop'] = __('Drop');
112 $titles['Empty'] = __('Empty');
113 $titles['NoEmpty'] = __('Empty');
117 * Displays the tables list
119 $_url_params = array(
120 'pos' => $pos,
121 'db' => $db);
123 // Add the sort options if they exists
124 if (isset($_REQUEST['sort'])) {
125 $_url_params['sort'] = $_REQUEST['sort'];
128 if (isset($_REQUEST['sort_order'])) {
129 $_url_params['sort_order'] = $_REQUEST['sort_order'];
132 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
135 <form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
136 <?php
137 echo PMA_generate_common_hidden_inputs($db);
139 PMA_TableHeader($db_is_information_schema, $server_slave_status);
141 $i = $sum_entries = 0;
142 $sum_size = (double) 0;
143 $overhead_size = (double) 0;
144 $overhead_check = '';
145 $checked = !empty($checkall) ? ' checked="checked"' : '';
146 $num_columns = $cfg['PropertiesNumColumns'] > 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0;
147 $row_count = 0;
150 $hidden_fields = array();
151 $odd_row = true;
152 $sum_row_count_pre = '';
154 // for blobstreaming
155 $PMA_Config = $GLOBALS['PMA_Config'];
157 if (!empty($PMA_Config))
158 $session_bs_tables = $PMA_Config->get('BLOBSTREAMING_TABLES'); // list of blobstreaming tables
160 $tableReductionCount = 0; // the amount to reduce the table count by
162 foreach ($tables as $keyname => $each_table) {
163 if (isset($session_bs_tables))
165 // compare table name against blobstreaming tables
166 foreach ($session_bs_tables as $table_key=>$table_val)
167 // if the table is a blobstreaming table, reduce table count and skip outer foreach loop
168 if ($table_key == $keyname)
170 $tableReductionCount++;
171 continue 2;
175 // Get valid statistics whatever is the table type
177 $table_is_view = false;
178 $table_encoded = urlencode($each_table['TABLE_NAME']);
179 // Sets parameters for links
180 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
181 // do not list the previous table's size info for a view
182 $formatted_size = '-';
183 $unit = '';
185 switch ( $each_table['ENGINE']) {
186 // MyISAM, ISAM or Heap table: Row count, data size and index size
187 // are accurate; data size is accurate for ARCHIVE
188 case 'MyISAM' :
189 case 'ISAM' :
190 case 'HEAP' :
191 case 'MEMORY' :
192 case 'ARCHIVE' :
193 if ($db_is_information_schema) {
194 $each_table['Rows'] = PMA_Table::countRecords($db,
195 $each_table['Name']);
198 if ($is_show_stats) {
199 $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']);
200 $sum_size += $tblsize;
201 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
202 if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) {
203 list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0);
204 $overhead_size += $each_table['Data_free'];
207 break;
208 case 'InnoDB' :
209 // InnoDB table: Row count is not accurate but data and index
210 // sizes are.
212 if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
213 $each_table['COUNTED'] = true;
214 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
215 $each_table['TABLE_NAME'], $force_exact = true,
216 $is_view = false);
217 } else {
218 $each_table['COUNTED'] = false;
221 if ($is_show_stats) {
222 $tblsize = $each_table['Data_length'] + $each_table['Index_length'];
223 $sum_size += $tblsize;
224 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
226 //$display_rows = ' - ';
227 break;
228 // Mysql 5.0.x (and lower) uses MRG_MyISAM and MySQL 5.1.x (and higher) uses MRG_MYISAM
229 // Both are aliases for MERGE
230 case 'MRG_MyISAM' :
231 case 'MRG_MYISAM' :
232 case 'MERGE' :
233 case 'BerkeleyDB' :
234 // Merge or BerkleyDB table: Only row count is accurate.
235 if ($is_show_stats) {
236 $formatted_size = ' - ';
237 $unit = '';
239 break;
240 // for a view, the ENGINE is sometimes reported as null,
241 // or on some servers it's reported as "SYSTEM VIEW"
242 case null :
243 case 'SYSTEM VIEW' :
244 // if table is broken, Engine is reported as null, so one more test
245 if ($each_table['TABLE_TYPE'] == 'VIEW') {
246 // countRecords() takes care of $cfg['MaxExactCountViews']
247 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
248 $each_table['TABLE_NAME'], $force_exact = true,
249 $is_view = true);
250 $table_is_view = true;
252 break;
253 default :
254 // Unknown table type.
255 if ($is_show_stats) {
256 $formatted_size = 'unknown';
257 $unit = '';
259 } // end switch
261 if (! PMA_Table::isMerge($db, $each_table['TABLE_NAME'])) {
262 $sum_entries += $each_table['TABLE_ROWS'];
265 if (isset($each_table['Collation'])) {
266 $collation = '<dfn title="'
267 . PMA_getCollationDescr($each_table['Collation']) . '">'
268 . $each_table['Collation'] . '</dfn>';
269 } else {
270 $collation = '---';
273 if ($is_show_stats) {
274 if (isset($formatted_overhead)) {
275 $overhead = '<a href="tbl_structure.php?'
276 . $tbl_url_query . '#showusage">' . $formatted_overhead
277 . ' ' . $overhead_unit . '</a>' . "\n";
278 unset($formatted_overhead);
279 $overhead_check .=
280 "document.getElementById('checkbox_tbl_" . ($i + 1) . "').checked = true;";
281 } else {
282 $overhead = '-';
284 } // end if
286 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
287 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
288 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
289 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']]))
290 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
291 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
293 $i++;
295 $row_count++;
296 if ($table_is_view) {
297 $hidden_fields[] = '<input type="hidden" name="views[]" value="' . htmlspecialchars($each_table['TABLE_NAME']) . '" />';
300 if ($each_table['TABLE_ROWS'] > 0) {
301 $browse_table = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $titles['Browse'] . '</a>';
302 $search_table = '<a href="tbl_select.php?' . $tbl_url_query . '">' . $titles['Search'] . '</a>';
303 $browse_table_label = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $truename . '</a>';
304 } else {
305 $browse_table = $titles['NoBrowse'];
306 $search_table = $titles['NoSearch'];
307 $browse_table_label = '<a href="tbl_structure.php?' . $tbl_url_query . '">' . $truename . '</a>';
310 if (! $db_is_information_schema) {
311 if (! empty($each_table['TABLE_ROWS'])) {
312 $empty_table = '<a href="sql.php?' . $tbl_url_query
313 . '&amp;sql_query=';
314 $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
315 . '&amp;zero_rows='
316 . urlencode(sprintf(__('Table %s has been emptied'), htmlspecialchars($each_table['TABLE_NAME'])))
317 . '" onclick="return confirmLink(this, \'TRUNCATE ';
318 $empty_table .= PMA_jsFormat($each_table['TABLE_NAME']) . '\')">' . $titles['Empty'] . '</a>';
319 } else {
320 $empty_table = $titles['NoEmpty'];
322 $drop_query = 'DROP '
323 . ($table_is_view ? 'VIEW' : 'TABLE')
324 . ' ' . PMA_backquote($each_table['TABLE_NAME']);
325 $drop_message = sprintf(
326 $table_is_view ? __('View %s has been dropped') : __('Table %s has been dropped'),
327 str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME'])));
330 $tracking_icon = '';
331 if (PMA_Tracker::isActive()) {
332 if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) {
333 $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>';
334 } elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) {
335 $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>';
339 if ($num_columns > 0 && $num_tables > $num_columns
340 && (($row_count % $num_columns) == 0)) {
341 $row_count = 1;
342 $odd_row = true;
344 </tr>
345 </tbody>
346 </table>
347 <?php
348 PMA_TableHeader(false, $server_slave_status);
351 $ignored = false;
352 $do = false;
354 if ($server_slave_status) {
355 ////////////////////////////////////////////////////////////////
357 if ((strlen(array_search($truename, $server_slave_Do_Table)) > 0)
358 || (strlen(array_search($db, $server_slave_Do_DB)) > 0)
359 || (count($server_slave_Do_DB) == 1 && count($server_slave_Ignore_DB) == 1)
361 $do = true;
363 foreach ($server_slave_Wild_Do_Table as $table) {
364 if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename)))
365 $do = true;
367 ////////////////////////////////////////////////////////////////////
368 if ((strlen(array_search($truename, $server_slave_Ignore_Table)) > 0) || (strlen(array_search($db, $server_slave_Ignore_DB)) > 0)) {
369 $ignored = true;
371 foreach ($server_slave_Wild_Ignore_Table as $table) {
372 if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename)))
373 $ignored = true;
375 }/* elseif ($server_master_status) {
376 if ((strlen(array_search($db, $server_master_Do_DB))>0) || count($server_master_Do_DB)==1)
377 $do = true;
378 elseif ((strlen(array_search($db, $server_master_Ignore_DB))>0) || count($server_master_Ignore_DB)==1)
379 $ignored = true;
382 <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
383 <td align="center">
384 <input type="checkbox" name="selected_tbl[]"
385 value="<?php echo htmlspecialchars($each_table['TABLE_NAME']); ?>"
386 id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> /></td>
387 <th><?php echo $browse_table_label; ?>
388 <?php echo (! empty($tracking_icon) ? $tracking_icon : ''); ?>
389 </th>
390 <?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 } ?>
391 <td align="center"><?php echo $browse_table; ?></td>
392 <td align="center">
393 <a href="tbl_structure.php?<?php echo $tbl_url_query; ?>">
394 <?php echo $titles['Structure']; ?></a></td>
395 <td align="center"><?php echo $search_table; ?></td>
396 <?php if (! $db_is_information_schema) { ?>
397 <td align="center">
398 <a href="tbl_change.php?<?php echo $tbl_url_query; ?>">
399 <?php echo $titles['Insert']; ?></a></td>
400 <td align="center"><?php echo $empty_table; ?></td>
401 <td align="center">
402 <a href="sql.php?<?php echo $tbl_url_query;
403 ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php
404 echo urlencode($drop_query); ?>&amp;zero_rows=<?php
405 echo urlencode($drop_message); ?>"
406 onclick="return confirmLink(this, '<?php echo PMA_jsFormat($drop_query, false); ?>')">
407 <?php echo $titles['Drop']; ?></a></td>
408 <?php } // end if (! $db_is_information_schema)
410 // there is a null value in the ENGINE
411 // - when the table needs to be repaired, or
412 // - when it's a view
413 // so ensure that we'll display "in use" below for a table
414 // that needs to be repaired
415 if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
416 if ($table_is_view) {
417 if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']){
418 $row_count_pre = '~';
419 $sum_row_count_pre = '~';
420 $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]')));
422 } elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
423 // InnoDB table: we did not get an accurate row count
424 $row_count_pre = '~';
425 $sum_row_count_pre = '~';
426 $show_superscript = '';
427 } else {
428 $row_count_pre = '';
429 $show_superscript = '';
432 <td class="value"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
433 <?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
434 <td nowrap="nowrap"><?php echo ($table_is_view ? __('View') : $each_table['ENGINE']); ?></td>
435 <?php if (isset($collation)) { ?>
436 <td nowrap="nowrap"><?php echo $collation ?></td>
437 <?php } ?>
438 <?php } ?>
440 <?php if ($is_show_stats) { ?>
441 <td class="value"><a
442 href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
443 ><?php echo $formatted_size . ' ' . $unit; ?></a></td>
444 <td class="value"><?php echo $overhead; ?></td>
445 <?php } // end if ?>
446 <?php } elseif ($table_is_view) { ?>
447 <td class="value">-</td>
448 <td><?php echo __('View'); ?></td>
449 <td>---</td>
450 <?php if ($is_show_stats) { ?>
451 <td class="value">-</td>
452 <td class="value">-</td>
453 <?php } ?>
454 <?php } else { ?>
455 <td colspan="<?php echo ($colspan_for_structure - ($db_is_information_schema ? 5 : 8)) ?>"
456 align="center">
457 <?php echo __('in use'); ?></td>
458 <?php } // end if (isset($each_table['TABLE_ROWS'])) else ?>
459 </tr>
460 <?php
461 } // end foreach
463 // Show Summary
464 if ($is_show_stats) {
465 list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
466 list($overhead_formatted, $overhead_unit) =
467 PMA_formatByteDown($overhead_size, 3, 1);
470 </tbody>
471 <tbody>
472 <tr><th></th>
473 <th align="center" nowrap="nowrap">
474 <?php
475 // for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
476 // (we don't want negative numbers here)
477 if ($num_tables == 0)
478 $tableReductionCount = 0;
480 echo sprintf(__('%s table(s)'), PMA_formatNumber($num_tables - $tableReductionCount, 0));
482 </th>
483 <?php
484 if ($server_slave_status) {
485 echo ' <th>' . __('Replication') . '</th>' . "\n";
488 <th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
489 <?php echo __('Sum'); ?></th>
490 <th class="value"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
491 <?php
492 if (!($cfg['PropertiesNumColumns'] > 1)) {
493 $default_engine = PMA_DBI_get_default_engine();
494 echo ' <th align="center">' . "\n"
495 . ' <dfn title="'
496 . sprintf(__('%s is the default storage engine on this MySQL server.'), $default_engine) . '">' .$default_engine . '</dfn></th>' . "\n";
497 // we got a case where $db_collation was empty
498 echo ' <th align="center">' . "\n";
499 if (! empty($db_collation)) {
500 echo ' <dfn title="'
501 . PMA_getCollationDescr($db_collation) . ' (' . __('Default') . ')">' . $db_collation
502 . '</dfn>';
504 echo '</th>';
507 if ($is_show_stats) {
509 <th class="value"><?php echo $sum_formatted . ' ' . $unit; ?></th>
510 <th class="value"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
511 <?php
514 </tr>
515 </tbody>
516 </table>
518 <div class="clearfloat">
519 <?php
520 // Check all tables url
521 $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
523 <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
524 width="38" height="22" alt="<?php echo __('With selected:'); ?>" />
525 <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
526 onclick="if (markAllRows('tablesForm')) return false;">
527 <?php echo __('Check All'); ?></a>
529 <a href="<?php echo $checkall_url; ?>"
530 onclick="if (unMarkAllRows('tablesForm')) return false;">
531 <?php echo __('Uncheck All'); ?></a>
532 <?php if ($overhead_check != '') { ?>
534 <a href="#" onclick="unMarkAllRows('tablesForm');
535 <?php echo $overhead_check; ?> return false;">
536 <?php echo __('Check tables having overhead'); ?></a>
537 <?php } ?>
539 <select name="submit_mult" onchange="this.form.submit();" style="margin: 0 3em 0 3em;">
540 <?php
541 echo ' <option value="' . __('With selected:') . '" selected="selected">'
542 . __('With selected:') . '</option>' . "\n";
543 echo ' <option value="' . __('Empty') . '" >'
544 . __('Empty') . '</option>' . "\n";
545 echo ' <option value="' . __('Drop') . '" >'
546 . __('Drop') . '</option>' . "\n";
547 echo ' <option value="' . __('Print view') . '" >'
548 . __('Print view') . '</option>' . "\n";
549 echo ' <option value="' . __('Check table') . '" >'
550 . __('Check table') . '</option>' . "\n";
551 echo ' <option value="' . __('Optimize table') . '" >'
552 . __('Optimize table') . '</option>' . "\n";
553 echo ' <option value="' . __('Repair table') . '" >'
554 . __('Repair table') . '</option>' . "\n";
555 echo ' <option value="' . __('Analyze table') . '" >'
556 . __('Analyze table') . '</option>' . "\n";
557 echo ' <option value="' . __('Export') . '" >'
558 . __('Export') . '</option>' . "\n";
560 </select>
561 <script type="text/javascript">
562 <!--
563 // Fake js to allow the use of the <noscript> tag
564 //-->
565 </script>
566 <noscript>
567 <input type="submit" value="<?php echo __('Go'); ?>" />
568 </noscript>
569 <?php echo implode("\n", $hidden_fields) . "\n"; ?>
570 </div>
571 </form>
572 <?php
573 // display again the table list navigator
574 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
576 <hr />
578 <?php
579 // Routines
580 require './libraries/db_routines.inc.php';
582 // Events
583 if (PMA_MYSQL_INT_VERSION > 50100) {
584 require './libraries/db_events.inc.php';
588 * Work on the database
589 * redesigned 2004-05-08 by mkkeck
591 /* DATABASE WORK */
592 /* Printable view of a table */
593 echo '<p>';
594 echo '<a href="db_printview.php?' . $url_query . '">';
595 if ($cfg['PropertiesIconic']) {
596 echo '<img class="icon" src="' . $pmaThemeImage
597 .'b_print.png" width="16" height="16" alt="" />';
599 echo __('Print view') . '</a> ';
601 echo '<a href="./db_datadict.php?' . $url_query . '">';
602 if ($cfg['PropertiesIconic']) {
603 echo '<img class="icon" src="' . $pmaThemeImage
604 .'b_tblanalyse.png" width="16" height="16" alt="" />';
606 echo __('Data Dictionary') . '</a>';
607 echo '</p>';
609 if (empty($db_is_information_schema)) {
610 require './libraries/display_create_table.lib.php';
611 } // end if (Create Table dialog)
614 * Displays the footer
616 require_once './libraries/footer.inc.php';