Add list of ignored files.
[phpmyadmin/madhuracj.git] / db_structure.php
blobfa1839034095deae35cccb68de13ee7f65c32cce
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'][] = 'mootools.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>' . $strNoTablesFound . '</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 - staybyte - 11 June 2001
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="' . $strBrowse . '" title="' . $strBrowse . '" />';
78 $titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" />';
79 $titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" />';
80 $titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" />';
81 $titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . $strInsert . '" title="' . $strInsert . '" />';
82 $titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . $strInsert . '" title="' . $strInsert . '" />';
83 $titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . $strStructure . '" title="' . $strStructure . '" />';
84 $titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" />';
85 $titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" />';
86 $titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" />';
87 $titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" />';
89 if ('both' === $cfg['PropertiesIconic']) {
90 $titles['Browse'] .= $strBrowse;
91 $titles['Search'] .= $strSearch;
92 $titles['NoBrowse'] .= $strBrowse;
93 $titles['NoSearch'] .= $strSearch;
94 $titles['Insert'] .= $strInsert;
95 $titles['NoInsert'] .= $strInsert;
96 $titles['Structure'] .= $strStructure;
97 $titles['Drop'] .= $strDrop;
98 $titles['NoDrop'] .= $strDrop;
99 $titles['Empty'] .= $strEmpty;
100 $titles['NoEmpty'] .= $strEmpty;
102 } else {
103 $titles['Browse'] = $strBrowse;
104 $titles['Search'] = $strSearch;
105 $titles['NoBrowse'] = $strBrowse;
106 $titles['NoSearch'] = $strSearch;
107 $titles['Insert'] = $strInsert;
108 $titles['NoInsert'] = $strInsert;
109 $titles['Structure'] = $strStructure;
110 $titles['Drop'] = $strDrop;
111 $titles['NoDrop'] = $strDrop;
112 $titles['Empty'] = $strEmpty;
113 $titles['NoEmpty'] = $strEmpty;
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 // added by rajk - for blobstreaming
155 $PMA_Config = $_SESSION['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 // loic1: Patch from Joshua Nye <josh at boxcarmedia.com> to get valid
176 // statistics whatever is the table type
178 $table_is_view = false;
179 $table_encoded = urlencode($each_table['TABLE_NAME']);
180 // Sets parameters for links
181 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
182 // do not list the previous table's size info for a view
183 $formatted_size = '-';
184 $unit = '';
186 switch ( $each_table['ENGINE']) {
187 // MyISAM, ISAM or Heap table: Row count, data size and index size
188 // are accurate; data size is accurate for ARCHIVE
189 case 'MyISAM' :
190 case 'ISAM' :
191 case 'HEAP' :
192 case 'MEMORY' :
193 case 'ARCHIVE' :
194 if ($db_is_information_schema) {
195 $each_table['Rows'] = PMA_Table::countRecords($db,
196 $each_table['Name']);
199 if ($is_show_stats) {
200 $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']);
201 $sum_size += $tblsize;
202 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
203 if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) {
204 list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0);
205 $overhead_size += $each_table['Data_free'];
208 break;
209 case 'InnoDB' :
210 // InnoDB table: Row count is not accurate but data and index
211 // sizes are.
213 if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
214 $each_table['COUNTED'] = true;
215 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
216 $each_table['TABLE_NAME'], $force_exact = true,
217 $is_view = false);
218 } else {
219 $each_table['COUNTED'] = false;
222 if ($is_show_stats) {
223 $tblsize = $each_table['Data_length'] + $each_table['Index_length'];
224 $sum_size += $tblsize;
225 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
227 //$display_rows = ' - ';
228 break;
229 case 'MRG_MYISAM' :
230 case 'BerkeleyDB' :
231 // Merge or BerkleyDB table: Only row count is accurate.
232 if ($is_show_stats) {
233 $formatted_size = ' - ';
234 $unit = '';
236 break;
237 // for a view, the ENGINE is sometimes reported as null,
238 // or on some servers it's reported as "SYSTEM VIEW"
239 case null :
240 case 'SYSTEM VIEW' :
241 // if table is broken, Engine is reported as null, so one more test
242 if ($each_table['TABLE_TYPE'] == 'VIEW') {
243 // countRecords() takes care of $cfg['MaxExactCountViews']
244 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
245 $each_table['TABLE_NAME'], $force_exact = true,
246 $is_view = true);
247 $table_is_view = true;
249 break;
250 default :
251 // Unknown table type.
252 if ($is_show_stats) {
253 $formatted_size = 'unknown';
254 $unit = '';
256 } // end switch
258 if ('MRG_MYISAM' != $each_table['ENGINE']) {
259 $sum_entries += $each_table['TABLE_ROWS'];
262 if (isset($each_table['Collation'])) {
263 $collation = '<dfn title="'
264 . PMA_getCollationDescr($each_table['Collation']) . '">'
265 . $each_table['Collation'] . '</dfn>';
266 } else {
267 $collation = '---';
270 if ($is_show_stats) {
271 if (isset($formatted_overhead)) {
272 $overhead = '<a href="tbl_structure.php?'
273 . $tbl_url_query . '#showusage">' . $formatted_overhead
274 . ' ' . $overhead_unit . '</a>' . "\n";
275 unset($formatted_overhead);
276 $overhead_check .=
277 "document.getElementById('checkbox_tbl_" . ($i + 1) . "').checked = true;";
278 } else {
279 $overhead = '-';
281 } // end if
283 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
284 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
285 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
286 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']]))
287 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
288 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
290 $i++;
292 $row_count++;
293 if ($table_is_view) {
294 $hidden_fields[] = '<input type="hidden" name="views[]" value="' . htmlspecialchars($each_table['TABLE_NAME']) . '" />';
297 if ($each_table['TABLE_ROWS'] > 0) {
298 $browse_table = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $titles['Browse'] . '</a>';
299 $search_table = '<a href="tbl_select.php?' . $tbl_url_query . '">' . $titles['Search'] . '</a>';
300 } else {
301 $browse_table = $titles['NoBrowse'];
302 $search_table = $titles['NoSearch'];
305 if (! $db_is_information_schema) {
306 if (! empty($each_table['TABLE_ROWS'])) {
307 $empty_table = '<a href="sql.php?' . $tbl_url_query
308 . '&amp;sql_query=';
309 $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
310 . '&amp;zero_rows='
311 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($each_table['TABLE_NAME'])))
312 . '" onclick="return confirmLink(this, \'TRUNCATE ';
313 $empty_table .= PMA_jsFormat($each_table['TABLE_NAME']) . '\')">' . $titles['Empty'] . '</a>';
314 } else {
315 $empty_table = $titles['NoEmpty'];
317 $drop_query = 'DROP '
318 . ($table_is_view ? 'VIEW' : 'TABLE')
319 . ' ' . PMA_backquote($each_table['TABLE_NAME']);
320 $drop_message = sprintf(
321 $table_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped,
322 str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME'])));
325 $tracking_icon = '';
326 if (PMA_Tracker::isActive()) {
327 if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) {
328 $tracking_icon = '<a href="tbl_tracking.php?' . $url_query.'&amp;table=' . $truename . '"><img class="icon" width="14" height="14" src="' . $pmaThemeImage . 'eye.png" alt="' . $strTrackingIsActive . '" title="' . $strTrackingIsActive . '" /></a>';
329 } elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) {
330 $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="' . $strTrackingIsNotActive . '" title="' . $strTrackingIsNotActive . '" /></a>';
334 if ($num_columns > 0 && $num_tables > $num_columns
335 && (($row_count % $num_columns) == 0)) {
336 $row_count = 1;
337 $odd_row = true;
339 </tr>
340 </tbody>
341 </table>
342 <?php
343 PMA_TableHeader(false, $server_slave_status);
346 $ignored = false;
347 $do = false;
349 if ($server_slave_status) {
350 ////////////////////////////////////////////////////////////////
352 if ((strlen(array_search($truename, $server_slave_Do_Table)) > 0)
353 || (strlen(array_search($db, $server_slave_Do_DB))>0)
354 || (count($server_slave_Do_DB)==1 && count($server_slave_Ignore_DB)==1)
356 $do = true;
358 foreach ($server_slave_Wild_Do_Table as $table) {
359 if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename)))
360 $do = true;
362 ////////////////////////////////////////////////////////////////////
363 if ((strlen(array_search($truename, $server_slave_Ignore_Table))>0) || (strlen(array_search($db, $server_slave_Ignore_DB))>0)) {
364 $ignored = true;
366 foreach ($server_slave_Wild_Ignore_Table as $table) {
367 if (($db == PMA_replication_strout($table)) && (ereg("^".substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true))-1), $truename)))
368 $ignored = true;
370 }/* elseif ($server_master_status) {
371 if ((strlen(array_search($db, $server_master_Do_DB))>0) || count($server_master_Do_DB)==1)
372 $do = true;
373 elseif ((strlen(array_search($db, $server_master_Ignore_DB))>0) || count($server_master_Ignore_DB)==1)
374 $ignored = true;
377 <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
378 <td align="center">
379 <input type="checkbox" name="selected_tbl[]"
380 value="<?php echo htmlspecialchars($each_table['TABLE_NAME']); ?>"
381 id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> /></td>
382 <th><label for="checkbox_tbl_<?php echo $i; ?>"
383 title="<?php echo $alias; ?>" style="<?php echo $ignored ? ' ignored' : ''; ?>"><?php echo $truename; ?></label>
384 <?php echo (! empty($tracking_icon) ? $tracking_icon : ''); ?>
385 </th>
386 <?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 } ?>
387 <td align="center"><?php echo $browse_table; ?></td>
388 <td align="center">
389 <a href="tbl_structure.php?<?php echo $tbl_url_query; ?>">
390 <?php echo $titles['Structure']; ?></a></td>
391 <td align="center"><?php echo $search_table; ?></td>
392 <?php if (! $db_is_information_schema) { ?>
393 <td align="center">
394 <a href="tbl_change.php?<?php echo $tbl_url_query; ?>">
395 <?php echo $titles['Insert']; ?></a></td>
396 <td align="center"><?php echo $empty_table; ?></td>
397 <td align="center">
398 <a href="sql.php?<?php echo $tbl_url_query;
399 ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php
400 echo urlencode($drop_query); ?>&amp;zero_rows=<?php
401 echo urlencode($drop_message); ?>"
402 onclick="return confirmLink(this, '<?php echo PMA_jsFormat($drop_query, false); ?>')">
403 <?php echo $titles['Drop']; ?></a></td>
404 <?php } // end if (! $db_is_information_schema)
406 // there is a null value in the ENGINE
407 // - when the table needs to be repaired, or
408 // - when it's a view
409 // so ensure that we'll display "in use" below for a table
410 // that needs to be repaired
411 if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
412 if ($table_is_view) {
413 if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']){
414 $row_count_pre = '~';
415 $sum_row_count_pre = '~';
416 $show_superscript = PMA_showHint(PMA_sanitize(sprintf($strViewHasAtLeast, '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]')));
418 } elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
419 // InnoDB table: we did not get an accurate row count
420 $row_count_pre = '~';
421 $sum_row_count_pre = '~';
422 $show_superscript = '';
423 } else {
424 $row_count_pre = '';
425 $show_superscript = '';
428 <td class="value"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
429 <?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
430 <td nowrap="nowrap"><?php echo ($table_is_view ? $strView : $each_table['ENGINE']); ?></td>
431 <?php if (isset($collation)) { ?>
432 <td nowrap="nowrap"><?php echo $collation ?></td>
433 <?php } ?>
434 <?php } ?>
436 <?php if ($is_show_stats) { ?>
437 <td class="value"><a
438 href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
439 ><?php echo $formatted_size . ' ' . $unit; ?></a></td>
440 <td class="value"><?php echo $overhead; ?></td>
441 <?php } // end if ?>
442 <?php } elseif ($table_is_view) { ?>
443 <td class="value">-</td>
444 <td><?php echo $strView; ?></td>
445 <td>---</td>
446 <?php if ($is_show_stats) { ?>
447 <td class="value">-</td>
448 <td class="value">-</td>
449 <?php } ?>
450 <?php } else { ?>
451 <td colspan="<?php echo ($structure_tbl_col_cnt - ($db_is_information_schema ? 5 : 8)) ?>"
452 align="center">
453 <?php echo $strInUse; ?></td>
454 <?php } // end if (isset($each_table['TABLE_ROWS'])) else ?>
455 </tr>
456 <?php
457 } // end foreach
459 // Show Summary
460 if ($is_show_stats) {
461 list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
462 list($overhead_formatted, $overhead_unit) =
463 PMA_formatByteDown($overhead_size, 3, 1);
466 </tbody>
467 <tbody>
468 <tr><th></th>
469 <th align="center" nowrap="nowrap">
470 <?php
471 // for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
472 // (we don't want negative numbers here) - rajk
473 if ($num_tables == 0)
474 $tableReductionCount = 0;
476 echo sprintf($strTables, PMA_formatNumber($num_tables - $tableReductionCount, 0));
478 </th>
479 <?php
480 if ($server_slave_status) {
481 echo ' <th>' . $GLOBALS['strReplication'] . '</th>' . "\n";
484 <th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
485 <?php echo $strSum; ?></th>
486 <th class="value"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
487 <?php
488 if (!($cfg['PropertiesNumColumns'] > 1)) {
489 $default_engine = PMA_DBI_get_default_engine();
490 echo ' <th align="center">' . "\n"
491 . ' <dfn title="'
492 . sprintf($strDefaultEngine, $default_engine) . '">' .$default_engine . '</dfn></th>' . "\n";
493 // we got a case where $db_collation was empty
494 echo ' <th align="center">' . "\n";
495 if (! empty($db_collation)) {
496 echo ' <dfn title="'
497 . PMA_getCollationDescr($db_collation) . ' (' . $strDefault . ')">' . $db_collation
498 . '</dfn>';
500 echo '</th>';
503 if ($is_show_stats) {
505 <th class="value"><?php echo $sum_formatted . ' ' . $unit; ?></th>
506 <th class="value"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
507 <?php
510 </tr>
511 </tbody>
512 </table>
514 <div class="clearfloat">
515 <?php
516 // Check all tables url
517 $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
519 <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
520 width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
521 <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
522 onclick="if (markAllRows('tablesForm')) return false;">
523 <?php echo $strCheckAll; ?></a>
525 <a href="<?php echo $checkall_url; ?>"
526 onclick="if (unMarkAllRows('tablesForm')) return false;">
527 <?php echo $strUncheckAll; ?></a>
528 <?php if ($overhead_check != '') { ?>
530 <a href="#" onclick="unMarkAllRows('tablesForm');
531 <?php echo $overhead_check; ?> return false;">
532 <?php echo $strCheckOverhead; ?></a>
533 <?php } ?>
535 <select name="submit_mult" onchange="this.form.submit();" style="margin: 0 3em 0 3em;">
536 <?php
537 echo ' <option value="' . $strWithChecked . '" selected="selected">'
538 . $strWithChecked . '</option>' . "\n";
539 echo ' <option value="' . $strEmpty . '" >'
540 . $strEmpty . '</option>' . "\n";
541 echo ' <option value="' . $strDrop . '" >'
542 . $strDrop . '</option>' . "\n";
543 echo ' <option value="' . $strPrintView . '" >'
544 . $strPrintView . '</option>' . "\n";
545 echo ' <option value="' . $strCheckTable . '" >'
546 . $strCheckTable . '</option>' . "\n";
547 echo ' <option value="' . $strOptimizeTable . '" >'
548 . $strOptimizeTable . '</option>' . "\n";
549 echo ' <option value="' . $strRepairTable . '" >'
550 . $strRepairTable . '</option>' . "\n";
551 echo ' <option value="' . $strAnalyzeTable . '" >'
552 . $strAnalyzeTable . '</option>' . "\n";
553 echo ' <option value="' . $strExport . '" >'
554 . $strExport . '</option>' . "\n";
556 </select>
557 <script type="text/javascript">
558 <!--
559 // Fake js to allow the use of the <noscript> tag
560 //-->
561 </script>
562 <noscript>
563 <input type="submit" value="<?php echo $strGo; ?>" />
564 </noscript>
565 <?php echo implode("\n", $hidden_fields) . "\n"; ?>
566 </div>
567 </form>
568 <?php
569 // display again the table list navigator
570 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
572 <hr />
574 <?php
575 // Routines
576 require './libraries/db_routines.inc.php';
578 // Events
579 if (PMA_MYSQL_INT_VERSION > 50100) {
580 require './libraries/db_events.inc.php';
584 * Work on the database
585 * redesigned 2004-05-08 by mkkeck
587 /* DATABASE WORK */
588 /* Printable view of a table */
589 echo '<p>';
590 echo '<a href="db_printview.php?' . $url_query . '">';
591 if ($cfg['PropertiesIconic']) {
592 echo '<img class="icon" src="' . $pmaThemeImage
593 .'b_print.png" width="16" height="16" alt="" />';
595 echo $strPrintView . '</a> ';
597 echo '<a href="./db_datadict.php?' . $url_query . '">';
598 if ($cfg['PropertiesIconic']) {
599 echo '<img class="icon" src="' . $pmaThemeImage
600 .'b_tblanalyse.png" width="16" height="16" alt="" />';
602 echo $strDataDict . '</a>';
603 echo '</p>';
605 if (empty($db_is_information_schema)) {
606 require './libraries/display_create_table.lib.php';
607 } // end if (Create Table dialog)
610 * Displays the footer
612 require_once './libraries/footer.inc.php';