3.3.9.2 release
[phpmyadmin/ammaryasirr.git] / db_structure.php
blob7e5d70fd9740d89479dfc5b635a7b7b433bef096
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 require_once './libraries/bookmark.lib.php';
51 require_once './libraries/mysql_charsets.lib.php';
52 $db_collation = PMA_getDbCollation($db);
54 // in a separate file to avoid redeclaration of functions in some code paths
55 require_once './libraries/db_structure.lib.php';
57 $titles = array();
58 if (true == $cfg['PropertiesIconic']) {
59 $titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" />';
60 $titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" />';
61 $titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" />';
62 $titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" />';
63 $titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . $strInsert . '" title="' . $strInsert . '" />';
64 $titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . $strInsert . '" title="' . $strInsert . '" />';
65 $titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . $strStructure . '" title="' . $strStructure . '" />';
66 $titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" />';
67 $titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" />';
68 $titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" />';
69 $titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" />';
71 if ('both' === $cfg['PropertiesIconic']) {
72 $titles['Browse'] .= $strBrowse;
73 $titles['Search'] .= $strSearch;
74 $titles['NoBrowse'] .= $strBrowse;
75 $titles['NoSearch'] .= $strSearch;
76 $titles['Insert'] .= $strInsert;
77 $titles['NoInsert'] .= $strInsert;
78 $titles['Structure'] .= $strStructure;
79 $titles['Drop'] .= $strDrop;
80 $titles['NoDrop'] .= $strDrop;
81 $titles['Empty'] .= $strEmpty;
82 $titles['NoEmpty'] .= $strEmpty;
84 } else {
85 $titles['Browse'] = $strBrowse;
86 $titles['Search'] = $strSearch;
87 $titles['NoBrowse'] = $strBrowse;
88 $titles['NoSearch'] = $strSearch;
89 $titles['Insert'] = $strInsert;
90 $titles['NoInsert'] = $strInsert;
91 $titles['Structure'] = $strStructure;
92 $titles['Drop'] = $strDrop;
93 $titles['NoDrop'] = $strDrop;
94 $titles['Empty'] = $strEmpty;
95 $titles['NoEmpty'] = $strEmpty;
98 // 1. No tables
99 if ($num_tables == 0) {
100 echo '<p>' . $strNoTablesFound . '</p>' . "\n";
102 // Routines
103 require './libraries/db_routines.inc.php';
105 // Events
106 if (PMA_MYSQL_INT_VERSION > 50100) {
107 require './libraries/db_events.inc.php';
110 if (empty($db_is_information_schema)) {
111 require './libraries/display_create_table.lib.php';
112 } // end if (Create Table dialog)
115 * Displays the footer
117 require_once './libraries/footer.inc.php';
118 exit;
121 // else
122 // 2. Shows table informations
125 * Displays the tables list
127 $_url_params = array(
128 'pos' => $pos,
129 'db' => $db);
131 // Add the sort options if they exists
132 if (isset($_REQUEST['sort'])) {
133 $_url_params['sort'] = $_REQUEST['sort'];
136 if (isset($_REQUEST['sort_order'])) {
137 $_url_params['sort_order'] = $_REQUEST['sort_order'];
140 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
143 <form method="post" action="db_structure.php" name="tablesForm" id="tablesForm">
144 <?php
145 echo PMA_generate_common_hidden_inputs($db);
147 PMA_TableHeader($db_is_information_schema, $server_slave_status);
149 $i = $sum_entries = 0;
150 $sum_size = (double) 0;
151 $overhead_size = (double) 0;
152 $overhead_check = '';
153 $checked = !empty($checkall) ? ' checked="checked"' : '';
154 $num_columns = $cfg['PropertiesNumColumns'] > 1 ? ceil($num_tables / $cfg['PropertiesNumColumns']) + 1 : 0;
155 $row_count = 0;
158 $hidden_fields = array();
159 $odd_row = true;
160 $sum_row_count_pre = '';
162 // added by rajk - for blobstreaming
163 $PMA_Config = $_SESSION['PMA_Config'];
165 if (!empty($PMA_Config))
166 $session_bs_tables = $PMA_Config->get('BLOBSTREAMING_TABLES'); // list of blobstreaming tables
168 $tableReductionCount = 0; // the amount to reduce the table count by
170 foreach ($tables as $keyname => $each_table) {
171 if (isset($session_bs_tables))
173 // compare table name against blobstreaming tables
174 foreach ($session_bs_tables as $table_key=>$table_val)
175 // if the table is a blobstreaming table, reduce table count and skip outer foreach loop
176 if ($table_key == $keyname)
178 $tableReductionCount++;
179 continue 2;
183 // loic1: Patch from Joshua Nye <josh at boxcarmedia.com> to get valid
184 // statistics whatever is the table type
186 $table_is_view = false;
187 $table_encoded = urlencode($each_table['TABLE_NAME']);
188 // Sets parameters for links
189 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
190 // do not list the previous table's size info for a view
191 $formatted_size = '-';
192 $unit = '';
194 switch ( $each_table['ENGINE']) {
195 // MyISAM, ISAM or Heap table: Row count, data size and index size
196 // are accurate; data size is accurate for ARCHIVE
197 case 'MyISAM' :
198 case 'ISAM' :
199 case 'HEAP' :
200 case 'MEMORY' :
201 case 'ARCHIVE' :
202 if ($db_is_information_schema) {
203 $each_table['Rows'] = PMA_Table::countRecords($db,
204 $each_table['Name']);
207 if ($is_show_stats) {
208 $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']);
209 $sum_size += $tblsize;
210 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
211 if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) {
212 list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0);
213 $overhead_size += $each_table['Data_free'];
216 break;
217 case 'InnoDB' :
218 // InnoDB table: Row count is not accurate but data and index
219 // sizes are.
221 if ($each_table['TABLE_ROWS'] < $GLOBALS['cfg']['MaxExactCount']) {
222 $each_table['COUNTED'] = true;
223 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
224 $each_table['TABLE_NAME'], $force_exact = true,
225 $is_view = false);
226 } else {
227 $each_table['COUNTED'] = false;
230 if ($is_show_stats) {
231 $tblsize = $each_table['Data_length'] + $each_table['Index_length'];
232 $sum_size += $tblsize;
233 list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
235 //$display_rows = ' - ';
236 break;
237 // Mysql 5.0.x (and lower) uses MRG_MyISAM and MySQL 5.1.x (and higher) uses MRG_MYISAM
238 // Both are aliases for MERGE
239 case 'MRG_MyISAM' :
240 case 'MRG_MYISAM' :
241 case 'MERGE' :
242 case 'BerkeleyDB' :
243 // Merge or BerkleyDB table: Only row count is accurate.
244 if ($is_show_stats) {
245 $formatted_size = ' - ';
246 $unit = '';
248 break;
249 // for a view, the ENGINE is sometimes reported as null,
250 // or on some servers it's reported as "SYSTEM VIEW"
251 case null :
252 case 'SYSTEM VIEW' :
253 // if table is broken, Engine is reported as null, so one more test
254 if ($each_table['TABLE_TYPE'] == 'VIEW') {
255 // countRecords() takes care of $cfg['MaxExactCountViews']
256 $each_table['TABLE_ROWS'] = PMA_Table::countRecords($db,
257 $each_table['TABLE_NAME'], $force_exact = true,
258 $is_view = true);
259 $table_is_view = true;
261 break;
262 default :
263 // Unknown table type.
264 if ($is_show_stats) {
265 $formatted_size = 'unknown';
266 $unit = '';
268 } // end switch
270 if (! PMA_Table::isMerge($db, $each_table['TABLE_NAME'])) {
271 $sum_entries += $each_table['TABLE_ROWS'];
274 if (isset($each_table['Collation'])) {
275 $collation = '<dfn title="'
276 . PMA_getCollationDescr($each_table['Collation']) . '">'
277 . $each_table['Collation'] . '</dfn>';
278 } else {
279 $collation = '---';
282 if ($is_show_stats) {
283 if (isset($formatted_overhead)) {
284 $overhead = '<a href="tbl_structure.php?'
285 . $tbl_url_query . '#showusage">' . $formatted_overhead
286 . ' ' . $overhead_unit . '</a>' . "\n";
287 unset($formatted_overhead);
288 $overhead_check .=
289 "document.getElementById('checkbox_tbl_" . ($i + 1) . "').checked = true;";
290 } else {
291 $overhead = '-';
293 } // end if
295 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$each_table['TABLE_NAME']]))
296 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
297 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
298 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$each_table['TABLE_NAME']]))
299 ? str_replace(' ', '&nbsp;', htmlspecialchars($tooltip_truename[$each_table['TABLE_NAME']]))
300 : str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME']));
302 $i++;
304 $row_count++;
305 if ($table_is_view) {
306 $hidden_fields[] = '<input type="hidden" name="views[]" value="' . htmlspecialchars($each_table['TABLE_NAME']) . '" />';
309 if ($each_table['TABLE_ROWS'] > 0) {
310 $browse_table = '<a href="sql.php?' . $tbl_url_query . '&amp;pos=0">' . $titles['Browse'] . '</a>';
311 $search_table = '<a href="tbl_select.php?' . $tbl_url_query . '">' . $titles['Search'] . '</a>';
312 } else {
313 $browse_table = $titles['NoBrowse'];
314 $search_table = $titles['NoSearch'];
317 if (! $db_is_information_schema) {
318 if (! empty($each_table['TABLE_ROWS'])) {
319 $empty_table = '<a href="sql.php?' . $tbl_url_query
320 . '&amp;sql_query=';
321 $empty_table .= urlencode('TRUNCATE ' . PMA_backquote($each_table['TABLE_NAME']))
322 . '&amp;zero_rows='
323 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($each_table['TABLE_NAME'])))
324 . '" onclick="return confirmLink(this, \'TRUNCATE ';
325 $empty_table .= PMA_jsFormat($each_table['TABLE_NAME']) . '\')">' . $titles['Empty'] . '</a>';
326 } else {
327 $empty_table = $titles['NoEmpty'];
329 $drop_query = 'DROP '
330 . ($table_is_view ? 'VIEW' : 'TABLE')
331 . ' ' . PMA_backquote($each_table['TABLE_NAME']);
332 $drop_message = sprintf(
333 $table_is_view ? $strViewHasBeenDropped : $strTableHasBeenDropped,
334 str_replace(' ', '&nbsp;', htmlspecialchars($each_table['TABLE_NAME'])));
337 $tracking_icon = '';
338 if (PMA_Tracker::isActive()) {
339 if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) {
340 $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>';
341 } elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) {
342 $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>';
346 if ($num_columns > 0 && $num_tables > $num_columns
347 && (($row_count % $num_columns) == 0)) {
348 $row_count = 1;
349 $odd_row = true;
351 </tr>
352 </tbody>
353 </table>
354 <?php
355 PMA_TableHeader(false, $server_slave_status);
358 $ignored = false;
359 $do = false;
361 if ($server_slave_status) {
362 ////////////////////////////////////////////////////////////////
364 if ((strlen(array_search($truename, $server_slave_Do_Table)) > 0)
365 || (strlen(array_search($db, $server_slave_Do_DB)) > 0)
366 || (count($server_slave_Do_DB) == 1 && count($server_slave_Ignore_DB) == 1)
368 $do = true;
370 foreach ($server_slave_Wild_Do_Table as $table) {
371 if (($db == PMA_replication_strout($table)) && (preg_match("@^" . substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true)) - 1) . "@", $truename)))
372 $do = true;
374 ////////////////////////////////////////////////////////////////////
375 if ((strlen(array_search($truename, $server_slave_Ignore_Table)) > 0) || (strlen(array_search($db, $server_slave_Ignore_DB)) > 0)) {
376 $ignored = true;
378 foreach ($server_slave_Wild_Ignore_Table as $table) {
379 if (($db == PMA_replication_strout($table)) && (preg_match("@^" . substr(PMA_replication_strout($table, true), 0, strlen(PMA_replication_strout($table, true)) - 1) . "@", $truename)))
380 $ignored = true;
382 }/* elseif ($server_master_status) {
383 if ((strlen(array_search($db, $server_master_Do_DB))>0) || count($server_master_Do_DB)==1)
384 $do = true;
385 elseif ((strlen(array_search($db, $server_master_Ignore_DB))>0) || count($server_master_Ignore_DB)==1)
386 $ignored = true;
389 <tr class="<?php echo $odd_row ? 'odd' : 'even'; $odd_row = ! $odd_row; ?>">
390 <td align="center">
391 <input type="checkbox" name="selected_tbl[]"
392 value="<?php echo htmlspecialchars($each_table['TABLE_NAME']); ?>"
393 id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> /></td>
394 <th><label for="checkbox_tbl_<?php echo $i; ?>"
395 title="<?php echo $alias; ?>" style="<?php echo $ignored ? ' ignored' : ''; ?>"><?php echo $truename; ?></label>
396 <?php echo (! empty($tracking_icon) ? $tracking_icon : ''); ?>
397 </th>
398 <?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 } ?>
399 <td align="center"><?php echo $browse_table; ?></td>
400 <td align="center">
401 <a href="tbl_structure.php?<?php echo $tbl_url_query; ?>">
402 <?php echo $titles['Structure']; ?></a></td>
403 <td align="center"><?php echo $search_table; ?></td>
404 <?php if (! $db_is_information_schema) { ?>
405 <td align="center">
406 <a href="tbl_change.php?<?php echo $tbl_url_query; ?>">
407 <?php echo $titles['Insert']; ?></a></td>
408 <td align="center"><?php echo $empty_table; ?></td>
409 <td align="center">
410 <a href="sql.php?<?php echo $tbl_url_query;
411 ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php
412 echo urlencode($drop_query); ?>&amp;zero_rows=<?php
413 echo urlencode($drop_message); ?>"
414 onclick="return confirmLink(this, '<?php echo PMA_jsFormat($drop_query, false); ?>')">
415 <?php echo $titles['Drop']; ?></a></td>
416 <?php } // end if (! $db_is_information_schema)
418 // there is a null value in the ENGINE
419 // - when the table needs to be repaired, or
420 // - when it's a view
421 // so ensure that we'll display "in use" below for a table
422 // that needs to be repaired
423 if (isset($each_table['TABLE_ROWS']) && ($each_table['ENGINE'] != null || $table_is_view)) {
424 if ($table_is_view) {
425 if ($each_table['TABLE_ROWS'] >= $GLOBALS['cfg']['MaxExactCountViews']){
426 $row_count_pre = '~';
427 $sum_row_count_pre = '~';
428 $show_superscript = PMA_showHint(PMA_sanitize(sprintf($strViewHasAtLeast, '[a@./Documentation.html#cfg_MaxExactCountViews@_blank]', '[/a]')));
430 } elseif($each_table['ENGINE'] == 'InnoDB' && (! $each_table['COUNTED'])) {
431 // InnoDB table: we did not get an accurate row count
432 $row_count_pre = '~';
433 $sum_row_count_pre = '~';
434 $show_superscript = '';
435 } else {
436 $row_count_pre = '';
437 $show_superscript = '';
440 <td class="value"><?php echo $row_count_pre . PMA_formatNumber($each_table['TABLE_ROWS'], 0) . $show_superscript; ?></td>
441 <?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
442 <td nowrap="nowrap"><?php echo ($table_is_view ? $strView : $each_table['ENGINE']); ?></td>
443 <?php if (isset($collation)) { ?>
444 <td nowrap="nowrap"><?php echo $collation ?></td>
445 <?php } ?>
446 <?php } ?>
448 <?php if ($is_show_stats) { ?>
449 <td class="value"><a
450 href="tbl_structure.php?<?php echo $tbl_url_query; ?>#showusage"
451 ><?php echo $formatted_size . ' ' . $unit; ?></a></td>
452 <td class="value"><?php echo $overhead; ?></td>
453 <?php } // end if ?>
454 <?php } elseif ($table_is_view) { ?>
455 <td class="value">-</td>
456 <td><?php echo $strView; ?></td>
457 <td>---</td>
458 <?php if ($is_show_stats) { ?>
459 <td class="value">-</td>
460 <td class="value">-</td>
461 <?php } ?>
462 <?php } else { ?>
463 <td colspan="<?php echo ($structure_tbl_col_cnt - ($db_is_information_schema ? 5 : 8)) ?>"
464 align="center">
465 <?php echo $strInUse; ?></td>
466 <?php } // end if (isset($each_table['TABLE_ROWS'])) else ?>
467 </tr>
468 <?php
469 } // end foreach
471 // Show Summary
472 if ($is_show_stats) {
473 list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
474 list($overhead_formatted, $overhead_unit) =
475 PMA_formatByteDown($overhead_size, 3, 1);
478 </tbody>
479 <tbody>
480 <tr><th></th>
481 <th align="center" nowrap="nowrap">
482 <?php
483 // for blobstreaming - if the number of tables is 0, set tableReductionCount to 0
484 // (we don't want negative numbers here) - rajk
485 if ($num_tables == 0)
486 $tableReductionCount = 0;
488 echo sprintf($strTables, PMA_formatNumber($num_tables - $tableReductionCount, 0));
490 </th>
491 <?php
492 if ($server_slave_status) {
493 echo ' <th>' . $GLOBALS['strReplication'] . '</th>' . "\n";
496 <th colspan="<?php echo ($db_is_information_schema ? 3 : 6) ?>" align="center">
497 <?php echo $strSum; ?></th>
498 <th class="value"><?php echo $sum_row_count_pre . PMA_formatNumber($sum_entries, 0); ?></th>
499 <?php
500 if (!($cfg['PropertiesNumColumns'] > 1)) {
501 $default_engine = PMA_DBI_get_default_engine();
502 echo ' <th align="center">' . "\n"
503 . ' <dfn title="'
504 . sprintf($strDefaultEngine, $default_engine) . '">' .$default_engine . '</dfn></th>' . "\n";
505 // we got a case where $db_collation was empty
506 echo ' <th align="center">' . "\n";
507 if (! empty($db_collation)) {
508 echo ' <dfn title="'
509 . PMA_getCollationDescr($db_collation) . ' (' . $strDefault . ')">' . $db_collation
510 . '</dfn>';
512 echo '</th>';
515 if ($is_show_stats) {
517 <th class="value"><?php echo $sum_formatted . ' ' . $unit; ?></th>
518 <th class="value"><?php echo $overhead_formatted . ' ' . $overhead_unit; ?></th>
519 <?php
522 </tr>
523 </tbody>
524 </table>
526 <div class="clearfloat">
527 <?php
528 // Check all tables url
529 $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
531 <img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
532 width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
533 <a href="<?php echo $checkall_url; ?>&amp;checkall=1"
534 onclick="if (markAllRows('tablesForm')) return false;">
535 <?php echo $strCheckAll; ?></a>
537 <a href="<?php echo $checkall_url; ?>"
538 onclick="if (unMarkAllRows('tablesForm')) return false;">
539 <?php echo $strUncheckAll; ?></a>
540 <?php if ($overhead_check != '') { ?>
542 <a href="#" onclick="unMarkAllRows('tablesForm');
543 <?php echo $overhead_check; ?> return false;">
544 <?php echo $strCheckOverhead; ?></a>
545 <?php } ?>
547 <select name="submit_mult" onchange="this.form.submit();" style="margin: 0 3em 0 3em;">
548 <?php
549 echo ' <option value="' . $strWithChecked . '" selected="selected">'
550 . $strWithChecked . '</option>' . "\n";
551 echo ' <option value="' . $strEmpty . '" >'
552 . $strEmpty . '</option>' . "\n";
553 echo ' <option value="' . $strDrop . '" >'
554 . $strDrop . '</option>' . "\n";
555 echo ' <option value="' . $strPrintView . '" >'
556 . $strPrintView . '</option>' . "\n";
557 echo ' <option value="' . $strCheckTable . '" >'
558 . $strCheckTable . '</option>' . "\n";
559 echo ' <option value="' . $strOptimizeTable . '" >'
560 . $strOptimizeTable . '</option>' . "\n";
561 echo ' <option value="' . $strRepairTable . '" >'
562 . $strRepairTable . '</option>' . "\n";
563 echo ' <option value="' . $strAnalyzeTable . '" >'
564 . $strAnalyzeTable . '</option>' . "\n";
565 echo ' <option value="' . $strExport . '" >'
566 . $strExport . '</option>' . "\n";
568 </select>
569 <script type="text/javascript">
570 <!--
571 // Fake js to allow the use of the <noscript> tag
572 //-->
573 </script>
574 <noscript>
575 <input type="submit" value="<?php echo $strGo; ?>" />
576 </noscript>
577 <?php echo implode("\n", $hidden_fields) . "\n"; ?>
578 </div>
579 </form>
580 <?php
581 // display again the table list navigator
582 PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'frame_content', $GLOBALS['cfg']['MaxTableList']);
584 <hr />
586 <?php
587 // Routines
588 require './libraries/db_routines.inc.php';
590 // Events
591 if (PMA_MYSQL_INT_VERSION > 50100) {
592 require './libraries/db_events.inc.php';
596 * Work on the database
597 * redesigned 2004-05-08 by mkkeck
599 /* DATABASE WORK */
600 /* Printable view of a table */
601 echo '<p>';
602 echo '<a href="db_printview.php?' . $url_query . '">';
603 if ($cfg['PropertiesIconic']) {
604 echo '<img class="icon" src="' . $pmaThemeImage
605 .'b_print.png" width="16" height="16" alt="" />';
607 echo $strPrintView . '</a> ';
609 echo '<a href="./db_datadict.php?' . $url_query . '">';
610 if ($cfg['PropertiesIconic']) {
611 echo '<img class="icon" src="' . $pmaThemeImage
612 .'b_tblanalyse.png" width="16" height="16" alt="" />';
614 echo $strDataDict . '</a>';
615 echo '</p>';
617 if (empty($db_is_information_schema)) {
618 require './libraries/display_create_table.lib.php';
619 } // end if (Create Table dialog)
622 * Displays the footer
624 require_once './libraries/footer.inc.php';