3 // vim: expandtab sw=4 ts=4 sts=4:
6 if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
7 include('./libraries/grab_globals.lib.php3');
9 if (!defined('PMA_COMMON_LIB_INCLUDED')) {
10 include('./libraries/common.lib.php3');
14 * Drop multiple fields if required
16 if ((!empty($submit_mult) && isset($selected_fld))
17 ||
isset($mult_btn)) {
18 $action = 'tbl_properties_structure.php3';
19 $err_url = 'tbl_properties_structure.php3?' . PMA_generate_common_url($db, $table);
20 include('./mult_submits.inc.php3');
26 require('./tbl_properties_common.php3');
27 $url_query .= '&goto=tbl_properties_structure.php3&back=tbl_properties_structure.php3';
30 * Prepares the table structure display
32 // 1. Get table information/display tabs
33 require('./tbl_properties_table_info.php3');
36 * Show result of multi submit operation
38 if ((!empty($submit_mult) && isset($selected_fld))
39 ||
isset($mult_btn)) {
40 PMA_showMessage($strSuccess);
43 // 2. Gets table keys and retains them
44 $local_query = 'SHOW KEYS FROM ' . PMA_backquote($table);
45 $result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
48 $pk_array = array(); // will be use to emphasis prim. keys in the table view
49 while ($row = PMA_mysql_fetch_array($result)) {
51 // Backups the list of primary keys
52 if ($row['Key_name'] == 'PRIMARY') {
53 $primary .= $row['Column_name'] . ', ';
54 $pk_array[$row['Column_name']] = 1;
57 mysql_free_result($result);
60 $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table);
61 $fields_rs = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
62 $fields_cnt = mysql_num_rows($fields_rs);
67 * Displays the table structure ('show table' works correct since 3.23.03)
71 <!-- TABLE INFORMATIONS
-->
73 <form action
="tbl_properties_structure.php3" name
="fieldsForm">
74 <?php
echo PMA_generate_common_hidden_inputs($db, $table); ?
>
76 <table border
="<?php echo $cfg['Border']; ?>">
79 <th
> 
;<?php
echo $strField; ?
> 
;</th
>
80 <th
><?php
echo $strType; ?
></th
>
81 <?php
echo PMA_MYSQL_INT_VERSION
>= 40100 ?
' <th>' . $strCharset . '</th>' . "\n" : ''; ?
>
82 <th
><?php
echo $strAttr; ?
></th
>
83 <th
><?php
echo $strNull; ?
></th
>
84 <th
><?php
echo $strDefault; ?
></th
>
85 <th
><?php
echo $strExtra; ?
></th
>
86 <th colspan
="<?php echo((PMA_MYSQL_INT_VERSION >= 32323) ? '6' : '5'); ?>"><?php
echo $strAction; ?
></th
>
90 $comments_map = array();
93 if ($GLOBALS['cfg']['ShowPropertyComments']) {
94 require('./libraries/relation.lib.php3');
95 require('./libraries/transformations.lib.php3');
97 $cfgRelation = PMA_getRelationsParam();
100 if ($cfgRelation['commwork']) {
101 $comments_map = PMA_getComments($db, $table);
103 if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) {
104 $mime_map = PMA_getMIME($db, $table, true);
110 $aryFields = array();
111 $checked = (!empty($checkall) ?
' checked="checked"' : '');
113 while ($row = PMA_mysql_fetch_array($fields_rs)) {
115 $bgcolor = ($i %
2) ?
$cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
116 $aryFields[] = $row['Field'];
118 $type = $row['Type'];
119 // reformat mysql query output - staybyte - 9. June 2001
120 // loic1: set or enum types: slashes single quotes inside options
121 if (eregi('^(set|enum)\((.+)\)$', $type, $tmp)) {
122 $tmp[2] = substr(ereg_replace('([^,])\'\'', '\\1\\\'', ',' . $tmp[2]), 1);
123 $type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
130 $type_nowrap = ' nowrap="nowrap"';
131 $type = eregi_replace('BINARY', '', $type);
132 $type = eregi_replace('ZEROFILL', '', $type);
133 $type = eregi_replace('UNSIGNED', '', $type);
138 $binary = eregi('BLOB', $row['Type'], $test) ||
eregi('BINARY', $row['Type'], $test);
139 $unsigned = eregi('UNSIGNED', $row['Type'], $test);
140 $zerofill = eregi('ZEROFILL', $row['Type'], $test);
143 // rabus: Devide charset from the rest of the type definition (MySQL >= 4.1)
144 unset($field_charset);
145 if (PMA_MYSQL_INT_VERSION
>= 40100) {
146 if ((substr($type, 0, 4) == 'char'
147 ||
substr($type, 0, 7) == 'varchar'
148 ||
substr($type, 0, 4) == 'text'
149 ||
substr($type, 0, 8) == 'tinytext'
150 ||
substr($type, 0, 10) == 'mediumtext'
151 ||
substr($type, 0, 8) == 'longtext'
152 ||
substr($type, 0, 3) == 'set'
153 ||
substr($type, 0, 4) == 'enum'
155 if (strpos($type, ' character set ')) {
156 $type = substr($type, 0, strpos($type, ' character set '));
158 if (!empty($row['Collation'])) {
159 $field_charset = $row['Collation'];
168 // garvin: Display basic mimetype [MIME]
169 if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) {
170 $type_mime = '<br />MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']);
175 $strAttribute = ' ';
177 $strAttribute = 'BINARY';
180 $strAttribute = 'UNSIGNED';
183 $strAttribute = 'UNSIGNED ZEROFILL';
185 if (!isset($row['Default'])) {
186 if ($row['Null'] != '') {
187 $row['Default'] = '<i>NULL</i>';
190 $row['Default'] = htmlspecialchars($row['Default']);
193 $field_encoded = urlencode($row['Field']);
194 $field_name = htmlspecialchars($row['Field']);
196 // garvin: underline commented fields and display a hover-title (CSS only)
199 if (isset($comments_map[$row['Field']])) {
200 $field_name = '<span style="border-bottom: 1px dashed black;" title="' . htmlspecialchars($comments_map[$row['Field']]) . '">' . $field_name . '</span>';
203 if (isset($pk_array[$row['Field']])) {
204 $field_name = '<u>' . $field_name . '</u>';
210 <td align
="center" bgcolor
="<?php echo $bgcolor; ?>">
211 <input type
="checkbox" name
="selected_fld[]" value
="<?php echo $field_encoded; ?>" id
="checkbox_row_<?php echo $i; ?>" <?php
echo $checked; ?
> />
213 <td bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap"> 
;<label
for="checkbox_row_<?php echo $i; ?>"><?php
echo $field_name; ?
></label
> 
;</td
>
214 <td bgcolor
="<?php echo $bgcolor; ?>"<?php
echo $type_nowrap; ?
>><?php
echo $type; echo $type_mime; ?
><bdo dir
="ltr"></bdo
></td
>
215 <?php
echo PMA_MYSQL_INT_VERSION
>= 40100 ?
' <td bgcolor="' . $bgcolor . '">' . (empty($field_charset) ?
' ' : $field_charset) . '</td>' . "\n" : '' ?
>
216 <td bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap"><?php
echo $strAttribute; ?
></td
>
217 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo (($row['Null'] == '') ?
$strNo : $strYes); ?
> 
;</td
>
218 <td bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap"><?php
if (isset($row['Default'])) echo $row['Default']; ?
> 
;</td
>
219 <td bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap"><?php
echo $row['Extra']; ?
> 
;</td
>
220 <td bgcolor
="<?php echo $bgcolor; ?>">
221 <a href
="tbl_alter.php3?<?php echo $url_query; ?>&field=<?php echo $field_encoded; ?>">
222 <?php
echo $strChange; ?
></a
>
224 <td bgcolor
="<?php echo $bgcolor; ?>">
226 // loic1: Drop field only if there is more than one field in the table
227 if ($fields_cnt > 1) {
230 <a href
="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP ' . PMA_backquote($row['Field'])); ?>&cpurge=1&purgekey=<?php echo urlencode($row['Field']); ?>&zero_rows=<?php echo urlencode(sprintf($strFieldHasBeenDropped, htmlspecialchars($row['Field']))); ?>"
231 onclick
="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table); ?> DROP <?php echo PMA_jsFormat($row['Field']); ?>')">
232 <?php
echo $strDrop; ?
></a
>
235 echo "\n" . ' ' . $strDrop;
240 <td bgcolor
="<?php echo $bgcolor; ?>">
242 if ($type == 'text' ||
$type == 'blob') {
243 echo $strPrimary . "\n";
247 <a href
="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY, ADD PRIMARY KEY(' . $primary . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAPrimaryKey, htmlspecialchars($row['Field']))); ?>"
248 onclick
="return confirmLink(this, 'ALTER TABLE <?php echo PMA_jsFormat($table); ?> DROP PRIMARY KEY, ADD PRIMARY KEY(<?php echo PMA_jsFormat($row['Field']); ?>)')">
249 <?php
echo $strPrimary; ?
></a
>
255 <td bgcolor
="<?php echo $bgcolor; ?>">
257 if ($type == 'text' ||
$type == 'blob') {
258 echo $strIndex . "\n";
262 <a href
="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD INDEX(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex ,htmlspecialchars($row['Field']))); ?>">
263 <?php
echo $strIndex; ?
></a
>
269 <td bgcolor
="<?php echo $bgcolor; ?>">
271 if ($type == 'text' ||
$type == 'blob') {
272 echo $strUnique . "\n";
276 <a href
="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD UNIQUE(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex , htmlspecialchars($row['Field']))); ?>">
277 <?php
echo $strUnique; ?
></a
>
284 if (PMA_MYSQL_INT_VERSION
>= 32323) {
285 if ((!empty($tbl_type) && $tbl_type == 'MYISAM')
286 && ($type == 'text' ||
strpos(' ' . $type, 'varchar'))) {
289 <td bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap">
290 <a href
="sql.php3?<?php echo $url_query; ?>&sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD FULLTEXT(' . PMA_backquote($row['Field']) . ')'); ?>&zero_rows=<?php echo urlencode(sprintf($strAnIndex , htmlspecialchars($row['Field']))); ?>">
291 <?php
echo $strIdxFulltext; ?
></a
>
297 <td bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap">
298 <?php
echo $strIdxFulltext . "\n"; ?
>
301 } // end if... else...
307 unset($field_charset);
312 $checkall_url = 'tbl_properties_structure.php3?' . PMA_generate_common_url($db,$table);
316 <td colspan
="<?php echo PMA_MYSQL_INT_VERSION >= 40100 ? '14' : (PMA_MYSQL_INT_VERSION >= 32323 ? '13' : '12'); ?>">
317 <img src
="./images/arrow_<?php echo $text_dir; ?>.gif" border
="0" width
="38" height
="22" alt
="<?php echo $strWithChecked; ?>" />
318 <a href
="<?php echo $checkall_url; ?>&checkall=1" onclick
="setCheckboxes('fieldsForm', true); return false;">
319 <?php
echo $strCheckAll; ?
></a
>
321 <a href
="<?php echo $checkall_url; ?>" onclick
="setCheckboxes('fieldsForm', false); return false;">
322 <?php
echo $strUncheckAll; ?
></a
>
324 <i
><?php
echo $strWithChecked; ?
></i
> 
; 
;
325 <input type
="submit" name
="submit_mult" value
="<?php echo $strChange; ?>" />
327 // Drop button if there is at least two fields
328 if ($fields_cnt > 1) {
330  
;<i
><?php
echo $strOr; ?
></i
> 
;
331 <input type
="submit" name
="submit_mult" value
="<?php echo $strDrop; ?>" />
345 * If there are more than 20 rows, displays browse/select/insert/empty/drop
348 if ($fields_cnt > 20) {
350 <!-- Browse links
-->
353 include('./tbl_properties_links.php3');
354 } // end if ($fields_cnt > 20)
362 <!-- Indexes
, space usage
and row statistics
-->
364 <table border
="0" cellspacing
="0" cellpadding
="0">
368 define('PMA_IDX_INCLUDED', 1);
369 require ('./tbl_indexes.php3');
375 * Displays Space usage and row statistics
377 // BEGIN - Calc Table Space - staybyte - 9 June 2001
378 // loic1, 22 feb. 2002: updated with patch from
379 // Joshua Nye <josh at boxcarmedia.com> to get valid
380 // statistics whatever is the table type
381 if ($cfg['ShowStats']) {
383 $is_innodb = (isset($showtable['Type']) && $showtable['Type'] == 'InnoDB');
384 if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
387 if (PMA_MYSQL_INT_VERSION
>= 32303 && ($nonisam == FALSE ||
$is_innodb)) {
390 if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') {
393 list($data_size, $data_unit) = PMA_formatByteDown($showtable['Data_length']);
394 if ($mergetable == FALSE) {
395 list($index_size, $index_unit) = PMA_formatByteDown($showtable['Index_length']);
397 if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) {
398 list($free_size, $free_unit) = PMA_formatByteDown($showtable['Data_free']);
399 list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] +
$showtable['Index_length'] - $showtable['Data_free']);
401 list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] +
$showtable['Index_length']);
403 list($tot_size, $tot_unit) = PMA_formatByteDown($showtable['Data_length'] +
$showtable['Index_length']);
404 if ($table_info_num_rows > 0) {
405 list($avg_size, $avg_unit) = PMA_formatByteDown(($showtable['Data_length'] +
$showtable['Index_length']) / $showtable['Rows'], 6, 1);
412 <td width
="20"> 
;</td
>
414 <?php
echo $strSpaceUsage . ' :' . "\n"; ?
>
415 <a name
="showusage"></a
>
416 <table border
="<?php echo $cfg['Border']; ?>">
418 <th
><?php
echo $strType; ?
></th
>
419 <th colspan
="2" align
="center"><?php
echo $strUsage; ?
></th
>
422 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>" style
="padding-right: 10px"><?php
echo $strData; ?
></td
>
423 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>" align
="right" nowrap
="nowrap"><?php
echo $data_size; ?
></td
>
424 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>"><?php
echo $data_unit; ?
></td
>
427 if (isset($index_size)) {
431 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>" style
="padding-right: 10px"><?php
echo $strIndex; ?
></td
>
432 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>" align
="right" nowrap
="nowrap"><?php
echo $index_size; ?
></td
>
433 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>"><?php
echo $index_unit; ?
></td
>
437 if (isset($free_size)) {
440 <tr style
="color: #bb0000">
441 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>" style
="padding-right: 10px"><?php
echo $strOverhead; ?
></td
>
442 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>" align
="right" nowrap
="nowrap"><?php
echo $free_size; ?
></td
>
443 <td bgcolor
="<?php echo $cfg['BgcolorTwo']; ?>"><?php
echo $free_unit; ?
></td
>
446 <td bgcolor
="<?php echo $cfg['BgcolorOne']; ?>" style
="padding-right: 10px"><?php
echo $strEffective; ?
></td
>
447 <td bgcolor
="<?php echo $cfg['BgcolorOne']; ?>" align
="right" nowrap
="nowrap"><?php
echo $effect_size; ?
></td
>
448 <td bgcolor
="<?php echo $cfg['BgcolorOne']; ?>"><?php
echo $effect_unit; ?
></td
>
452 if (isset($tot_size) && $mergetable == FALSE) {
456 <td bgcolor
="<?php echo $cfg['BgcolorOne']; ?>" style
="padding-right: 10px"><?php
echo $strTotalUC; ?
></td
>
457 <td bgcolor
="<?php echo $cfg['BgcolorOne']; ?>" align
="right" nowrap
="nowrap"><?php
echo $tot_size; ?
></td
>
458 <td bgcolor
="<?php echo $cfg['BgcolorOne']; ?>"><?php
echo $tot_unit; ?
></td
>
462 // Optimize link if overhead
463 if (isset($free_size) && ($tbl_type == 'MYISAM' ||
$tbl_type == 'BDB')) {
467 <td colspan
="3" align
="center">
468 [<a href
="sql.php3?<?php echo $url_query; ?>&pos=0&sql_query=<?php echo urlencode('OPTIMIZE TABLE ' . PMA_backquote($table)); ?>"><?php
echo $strOptimizeTable; ?
></a
>]
478 <!-- Rows Statistic
-->
479 <td width
="20"> 
;</td
>
481 <?php
echo $strRowsStatistic . ' :' . "\n"; ?
>
482 <table border
="<?php echo $cfg['Border']; ?>">
484 <th
><?php
echo $strStatement; ?
></th
>
485 <th align
="center"><?php
echo $strValue; ?
></th
>
489 if (isset($showtable['Row_format'])) {
490 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
494 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strFormat; ?
></td
>
495 <td bgcolor
="<?php echo $bgcolor; ?>" align
="<?php echo $cell_align_left; ?>" nowrap
="nowrap">
498 if ($showtable['Row_format'] == 'Fixed') {
501 else if ($showtable['Row_format'] == 'Dynamic') {
505 echo $showtable['Row_format'];
513 if (PMA_MYSQL_INT_VERSION
>= 40100) {
514 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
517 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strCharset; ?
></td
>
518 <td bgcolor
="<?php echo $bgcolor; ?>" align
="<?php echo $cell_align_left; ?>" nowrap
="nowrap">
526 if (!$is_innodb && isset($showtable['Rows'])) {
527 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
531 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strRows; ?
></td
>
532 <td bgcolor
="<?php echo $bgcolor; ?>" align
="right" nowrap
="nowrap">
533 <?php
echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?
>
538 if (!$is_innodb && isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
539 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
543 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strRowLength; ?
> 
;ø
;</td
>
544 <td bgcolor
="<?php echo $bgcolor; ?>" align
="right" nowrap
="nowrap">
545 <?php
echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?
>
550 if (!$is_innodb && isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
551 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
555 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strRowSize; ?
> 
;ø
;</td
>
556 <td bgcolor
="<?php echo $bgcolor; ?>" align
="right" nowrap
="nowrap">
557 <?php
echo $avg_size . ' ' . $avg_unit . "\n"; ?
>
562 if (isset($showtable['Auto_increment'])) {
563 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
567 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strNext; ?
> 
;Autoindex
</td
>
568 <td bgcolor
="<?php echo $bgcolor; ?>" align
="right" nowrap
="nowrap">
569 <?php
echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?
>
576 if (isset($showtable['Create_time'])) {
577 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
581 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strStatCreateTime; ?
></td
>
582 <td style
="font-size: <?php echo $font_smaller; ?>" align
="right" bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap">
583 <?php
echo PMA_localisedDate(strtotime($showtable['Create_time'])) . "\n"; ?
>
590 if (isset($showtable['Update_time'])) {
591 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
595 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strStatUpdateTime; ?
></td
>
596 <td style
="font-size: <?php echo $font_smaller; ?>" align
="right" bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap">
597 <?php
echo PMA_localisedDate(strtotime($showtable['Update_time'])) . "\n"; ?
>
604 if (isset($showtable['Check_time'])) {
605 $bgcolor = ((++
$i%2
) ?
$cfg['BgcolorTwo'] : $cfg['BgcolorOne']);
609 <td bgcolor
="<?php echo $bgcolor; ?>"><?php
echo $strStatCheckTime; ?
></td
>
610 <td style
="font-size: <?php echo $font_smaller; ?>" align
="right" bgcolor
="<?php echo $bgcolor; ?>" nowrap
="nowrap">
611 <?php
echo PMA_localisedDate(strtotime($showtable['Check_time'])) . "\n"; ?
>
623 // END - Calc Table Space
639 <!-- Printable view of the table
-->
641 <div style
="margin-bottom: 10px"><a href
="tbl_printview.php3?<?php echo $url_query; ?>"><?php
echo $strPrintView; ?
></a
></div
>
644 <!-- Add some
new fields
-->
646 <form method
="post" action
="tbl_addfield.php3"
647 onsubmit
="return checkFormElementInRange(this, 'num_fields', 1)">
648 <?php
echo PMA_generate_common_hidden_inputs($db, $table); ?
>
649 <?php
echo $strAddNewField; ?
> 
;:
650 <input type
="text" name
="num_fields" size
="2" maxlength
="2" value
="1" class="textfield" style
="vertical-align: middle" onfocus
="this.select()" />
651 <select name
="after_field" style
="vertical-align: middle">
652 <option value
="--end--"><?php
echo $strAtEndOfTable; ?
></option
>
653 <option value
="--first--"><?php
echo $strAtBeginningOfTable; ?
></option
>
656 while (list($junk, $fieldname) = each($aryFields)) {
657 echo ' <option value="' . htmlspecialchars($fieldname) . '">' . sprintf($strAfter, htmlspecialchars($fieldname)) . '</option>' . "\n";
662 <input type
="submit" value
="<?php echo $strGo; ?>" style
="vertical-align: middle" />
667 if ($cfg['Server']['relation']) {
669 <!-- Work on Relations
-->
671 <div style
="margin-bottom: 10px">
672 <a href
="tbl_relation.php3?<?php echo $url_query; ?>"><?php
echo $strRelationView; ?
></a
>
680 <!-- Let MySQL propose the optimal structure
-->
682 <div style
="margin-bottom: 10px">
683 <a href
="sql.php3?<?php echo $url_query; ?>&session_max_rows=all&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table) . ' PROCEDURE ANALYSE()'); ?>">
684 <?php
echo $strStructPropose; ?
></a
>
685 <?php
echo PMA_showMySQLDocu('Extending_MySQL', 'procedure_analyse') . "\n"; ?
>
691 * Query box, bookmark, insert data from textfile
693 $goto = 'tbl_properties_structure.php3';
694 require('./tbl_query_box.php3');
702 * Displays the footer
705 require('./footer.inc.php3');