00001 <?php
00002
00003
00004
00005
00006 require_once('./libraries/grab_globals.lib.php');
00007 require_once('./libraries/common.lib.php');
00008 require_once('./libraries/mysql_charsets.lib.php');
00009
00014 if (empty($is_info)) {
00015
00016 if ((!empty($submit_mult) && isset($selected_tbl))
00017 || isset($mult_btn)) {
00018 $action = 'db_details_structure.php';
00019 $err_url = 'db_details_structure.php?'. PMA_generate_common_url($db);
00020 require('./mult_submits.inc.php');
00021 }
00022 require('./db_details_common.php');
00023 $url_query .= '&goto=db_details_structure.php';
00024
00025
00026 $sub_part = '_structure';
00027 require('./db_details_db_info.php');
00028 echo "\n";
00029
00033 if ((!empty($submit_mult) && isset($selected_tbl))
00034 || isset($mult_btn)) {
00035 PMA_showMessage($strSuccess);
00036 }
00037 }
00038
00039 if (PMA_MYSQL_INT_VERSION >= 40100) {
00040 $db_collation = PMA_getDbCollation($db);
00041 }
00042
00043
00044
00045 function pma_TableHeader($alternate = FALSE) {
00046 echo ' <table border="' . $GLOBALS['cfg']['Border'] . '">' . "\n"
00047 . ' <tr>' . "\n"
00048 . ' <td></td>' . "\n"
00049 . ' <th>' . "\n"
00050 . ' ' . $GLOBALS['strTable'] . ' ' . "\n"
00051 . ' </th>' . "\n"
00052 . ' <th colspan="6">' . "\n"
00053 . ' ' . $GLOBALS['strAction'] . ' ' . "\n"
00054 . ' </th>' . "\n"
00055 . ' <th>' . "\n"
00056 . ' ' . $GLOBALS['strRecords'] . ' ' . "\n"
00057 . ' </th>' . "\n";
00058 if (!$alternate) {
00059 if (!($GLOBALS['cfg']['PropertiesNumColumns'] > 1)) {
00060 echo ' <th>' . "\n"
00061 . ' ' . $GLOBALS['strType'] . ' ' . "\n"
00062 . ' </th>' . "\n";
00063 if (PMA_MYSQL_INT_VERSION >= 40100) {
00064 echo ' <th>' . "\n"
00065 . ' ' . $GLOBALS['strCollation'] . ' ' . "\n"
00066 . ' </th>' . "\n";
00067 }
00068 }
00069 if ($GLOBALS['cfg']['ShowStats']) {
00070 echo ' <th>' . "\n"
00071 . ' ' . $GLOBALS['strSize'] . ' ' . "\n"
00072 . ' </th>' . "\n"
00073 . ' <th>' . "\n"
00074 . ' ' . $GLOBALS['strOverhead'] . ' ' . "\n"
00075 . ' </th>' . "\n";
00076 }
00077 echo "\n";
00078 }
00079 echo ' </tr>' . "\n";
00080 }
00081
00082
00086 require_once('./libraries/relation.lib.php');
00087 $cfgRelation = PMA_getRelationsParam();
00088
00092 if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') {
00093 PMA_SetComment($db, '', '(db_comment)', $comment);
00094 }
00095
00099 ?>
00100
00101 <!-- TABLE LIST -->
00102
00103 <?php
00104 $titles = array();
00105 if ($cfg['PropertiesIconic'] == true) {
00106
00107 $propicon = (string)$cfg['PropertiesIconic'];
00108
00109 if ($propicon == 'both') {
00110 $iconic_spacer = '<nobr>';
00111 } else {
00112 $iconic_spacer = '';
00113 }
00114
00115 $titles['Browse'] = $iconic_spacer . '<img hspace="7" width="12" height="13" src="images/button_browse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" border="0" />';
00116 $titles['Search'] = $iconic_spacer . '<img hspace="7" width="14" height="13" src="images/button_select.png" alt="' . $strSearch . '" title="' . $strSearch . '" border="0" />';
00117 $titles['NoBrowse'] = $iconic_spacer . '<img hspace="7" width="12" height="13" src="images/button_nobrowse.png" alt="' . $strBrowse . '" title="' . $strBrowse . '" border="0" />';
00118 $titles['NoSearch'] = $iconic_spacer . '<img hspace="7" width="14" height="13" src="images/button_noselect.png" alt="' . $strSearch . '" title="' . $strSearch . '" border="0" />';
00119 $titles['Insert'] = $iconic_spacer . '<img hspace="7" width="13" height="13" src="images/button_insert.png" alt="' . $strInsert . '" title="' . $strInsert . '" border="0" />';
00120 $titles['Properties'] = $iconic_spacer . '<img hspace="7" width="18" height="13" src="images/button_properties.png" alt="' . $strProperties . '" title="' . $strProperties . '" border="0" />';
00121 $titles['Drop'] = $iconic_spacer . '<img hspace="7" width="11" height="13" src="images/button_drop.png" alt="' . $strDrop . '" title="' . $strDrop . '" border="0" />';
00122 $titles['Empty'] = $iconic_spacer . '<img hspace="7" width="11" height="13" src="images/button_empty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" border="0" />';
00123 $titles['NoEmpty'] = $iconic_spacer . '<img hspace="7" width="11" height="13" src="images/button_noempty.png" alt="' . $strEmpty . '" title="' . $strEmpty . '" border="0" />';
00124
00125 if ($propicon == 'both') {
00126 $titles['Browse'] .= ' ' . $strBrowse . '</nobr>';
00127 $titles['Search'] .= ' ' . $strSearch . '</nobr>';
00128 $titles['NoBrowse'] .= ' ' . $strBrowse . '</nobr>';
00129 $titles['NoSearch'] .= ' ' . $strSearch . '</nobr>';
00130 $titles['Insert'] .= ' ' . $strInsert . '</nobr>';
00131 $titles['Properties'] .= ' ' . $strProperties . '</nobr>';
00132 $titles['Drop'] .= ' ' . $strDrop . '</nobr>';
00133 $titles['Empty'] .= ' ' . $strEmpty . '</nobr>';
00134 $titles['NoEmpty'] .= ' ' . $strEmpty . '</nobr>';
00135 }
00136 } else {
00137 $titles['Browse'] = $strBrowse;
00138 $titles['Search'] = $strSearch;
00139 $titles['NoBrowse'] = $strBrowse;
00140 $titles['NoSearch'] = $strSearch;
00141 $titles['Insert'] = $strInsert;
00142 $titles['Properties'] = $strProperties;
00143 $titles['Drop'] = $strDrop;
00144 $titles['Empty'] = $strEmpty;
00145 $titles['NoEmpty'] = $strEmpty;
00146 }
00147
00148
00149 if ($num_tables == 0) {
00150 echo $strNoTablesFound . "\n";
00151 }
00152
00153 else {
00154
00155 if ($cfg['ShowTooltip']) {
00156 $tooltip_truename = array();
00157 $tooltip_aliasname = array();
00158
00159 $result = PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db));
00160 while ($tmp = PMA_mysql_fetch_array($result)) {
00161 $tooltip_truename[$tmp['Name']] = ($cfg['ShowTooltipAliasTB'] ? (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : $tmp['Name']) : $tmp['Name']);
00162 $tooltip_aliasname[$tmp['Name']] = ($cfg['ShowTooltipAliasTB'] ? $tmp['Name'] : (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : ''));
00163 if (isset($tmp['Create_time']) && !empty($tmp['Create_time'])) {
00164 $tooltip_aliasname[$tmp['Name']] .= ', ' . $strStatCreateTime . ': ' . PMA_localisedDate(strtotime($tmp['Create_time']));
00165 }
00166
00167 if (isset($tmp['Update_time']) && !empty($tmp['Update_time'])) {
00168 $tooltip_aliasname[$tmp['Name']] .= ', ' . $strStatUpdateTime . ': ' . PMA_localisedDate(strtotime($tmp['Update_time']));
00169 }
00170
00171 if (isset($tmp['Check_time']) && !empty($tmp['Check_time'])) {
00172 $tooltip_aliasname[$tmp['Name']] .= ', ' . $strStatCheckTime . ': ' . PMA_localisedDate(strtotime($tmp['Check_time']));
00173 }
00174
00175 }
00176 }
00177
00178 if ($cfgRelation['commwork']) {
00179 $comment = PMA_getComments($db);
00180
00184 if (is_array($comment)) {
00185 ?>
00186 <!-- DB comment -->
00187 <p><i>
00188 <?php echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?>
00189 </i></p>
00190 <?php
00191 }
00192 }
00193 ?>
00194 <form method="post" action="db_details_structure.php" name="tablesForm">
00195 <?php echo PMA_generate_common_hidden_inputs($db); ?>
00196
00197 <?php
00198 if ($cfg['PropertiesNumColumns'] > 1) {
00199 ?>
00200 <table cellspacing="0" cellpadding="0" border="0">
00201 <tr>
00202 <td valign="top">
00203 <?php
00204 }
00205
00206 pma_TableHeader();
00207
00208 $i = $sum_entries = 0;
00209 (double) $sum_size = 0;
00210 (double) $overhead_size = 0;
00211 $overhead_check = '';
00212 $checked = (!empty($checkall) ? ' checked="checked"' : '');
00213 $num_columns = ($cfg['PropertiesNumColumns'] > 1 ? (ceil($num_tables / $cfg['PropertiesNumColumns']) + 1) : 0);
00214 $row_count = 0;
00215 foreach($tables AS $keyname => $sts_data) {
00216 $table = $sts_data['Name'];
00217 $table_encoded = urlencode($table);
00218 $table_name = htmlspecialchars($table);
00219
00220 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$table]))
00221 ? htmlspecialchars($tooltip_aliasname[$table])
00222 : htmlspecialchars($sts_data['Name']);
00223 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$table]))
00224 ? htmlspecialchars($tooltip_truename[$table])
00225 : htmlspecialchars($sts_data['Name']);
00226
00227
00228 $tbl_url_query = $url_query . '&table=' . $table_encoded;
00229 $bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
00230 echo "\n";
00231
00232 $row_count++;
00233 if($num_columns > 0 && $num_tables > $num_columns && (($row_count % ($num_columns)) == 0)) {
00234 $bgcolor = $cfg['BgcolorTwo'];
00235 $row_count = 1;
00236 ?>
00237 </tr>
00238 </table>
00239 </td>
00240 <td><img src="./images/spacer.gif" border="0" width="10" height="1" alt="" /></td>
00241 <td valign="top">
00242 <?php
00243 pma_TableHeader();
00244 }
00245 ?>
00246 <tr>
00247 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
00248 <input type="checkbox" name="selected_tbl[]" value="<?php echo $table_encoded; ?>" id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> />
00249 </td>
00250 <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
00251 <b><label for="checkbox_tbl_<?php echo $i; ?>" title="<?php echo $alias; ?>"><?php echo $truename; ?></label> </b>
00252 </td>
00253 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
00254 <?php
00255 require_once('./libraries/bookmark.lib.php');
00256 $book_sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label');
00257
00258 if (!empty($sts_data['Rows'])) {
00259 echo '<a href="sql.php?' . $tbl_url_query . '&sql_query='
00260 . (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table)))
00261 . '&pos=0">' . $titles['Browse'] . '</a>';
00262 } else {
00263 echo $titles['NoBrowse'];
00264 }
00265 ?>
00266 </td>
00267 <td bgcolor="<?php echo $bgcolor; ?>">
00268 <?php
00269 if (!empty($sts_data['Rows'])) {
00270 echo '<a href="tbl_select.php?' . $tbl_url_query . '">'
00271 . $titles['Search'] . '</a>';
00272 } else {
00273 echo $titles['NoSearch'];
00274 }
00275 ?>
00276 </td>
00277 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
00278 <a href="tbl_change.php?<?php echo $tbl_url_query; ?>">
00279 <?php echo $titles['Insert']; ?></a>
00280 </td>
00281 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
00282 <a href="tbl_properties_structure.php?<?php echo $tbl_url_query; ?>">
00283 <?php echo $titles['Properties']; ?></a>
00284 </td>
00285 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
00286 <a href="sql.php?<?php echo $tbl_url_query; ?>&reload=1&purge=1&sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
00287 onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
00288 <?php echo $titles['Drop']; ?></a>
00289 </td>
00290 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
00291 <?php
00292 if (!empty($sts_data['Rows'])) {
00293 echo '<a href="sql.php?' . $tbl_url_query
00294 . '&sql_query=';
00295 if (PMA_MYSQL_INT_VERSION >= 40000) {
00296 echo urlencode('TRUNCATE ' . PMA_backquote($table))
00297 . '&zero_rows='
00298 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
00299 . '" onclick="return confirmLink(this, \'TRUNCATE ';
00300 } else {
00301 echo urlencode('DELETE FROM ' . PMA_backquote($table))
00302 . '&zero_rows='
00303 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
00304 . '" onclick="return confirmLink(this, \'DELETE FROM ';
00305 }
00306 echo PMA_jsFormat($table) . '\')">' . $titles['Empty'] . '</a>';
00307 } else {
00308 echo $titles['NoEmpty'];
00309 }
00310 ?>
00311 </td>
00312 <?php
00313 echo "\n";
00314
00315
00316
00317 if (isset($sts_data['Rows'])) {
00318
00319
00320 if (isset($sts_data['Type']) && preg_match('@^(MyISAM|ISAM|HEAP)$@', $sts_data['Type'])) {
00321 if ($cfg['ShowStats']) {
00322 $tblsize = doubleval($sts_data['Data_length']) + doubleval($sts_data['Index_length']);
00323 $sum_size += $tblsize;
00324 list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
00325 if (isset($sts_data['Data_free']) && $sts_data['Data_free'] > 0) {
00326 list($formated_overhead, $overhead_unit) = PMA_formatByteDown($sts_data['Data_free']);
00327 $overhead_size += $sts_data['Data_free'];
00328 }
00329 }
00330 $sum_entries += $sts_data['Rows'];
00331 $display_rows = number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator);
00332 }
00333
00334
00335
00336 else if (isset($sts_data['Type']) && $sts_data['Type'] == 'InnoDB') {
00337 if ($cfg['ShowStats']) {
00338 $tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
00339 $sum_size += $tblsize;
00340 list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
00341 }
00342
00343
00344 if ($sts_data['Rows'] < $cfg['MaxExactCount']) {
00345 $local_query = 'SELECT COUNT(*) AS count FROM '
00346 . PMA_backquote($db) . '.'
00347 . PMA_backquote($table);
00348 $table_info_result = PMA_mysql_query($local_query)
00349 or PMA_mysqlDie('', $local_query, '', $err_url_0);
00350 $row_count = PMA_mysql_result($table_info_result, 0, 'count');
00351 $sum_entries += $row_count;
00352 } else {
00353 $row_count = $sts_data['Rows'];
00354 $sum_entries += $sts_data['Rows'];
00355 }
00356 $display_rows = number_format($row_count, 0, $number_decimal_separator, $number_thousands_separator);
00357 }
00358
00359
00360 else if (isset($sts_data['Type']) && preg_match('@^(MRG_MyISAM|BerkeleyDB)$@', $sts_data['Type'])) {
00361 if ($cfg['ShowStats']) {
00362 $formated_size = ' - ';
00363 $unit = '';
00364 }
00365 $sum_entries += $sts_data['Rows'];
00366 $display_rows = number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator);
00367 }
00368
00369
00370 else {
00371 if ($cfg['ShowStats']) {
00372 $formated_size = 'unknown';
00373 $unit = '';
00374 }
00375 $display_rows = 'unknown';
00376 }
00377 ?>
00378 <td align="right" bgcolor="<?php echo $bgcolor; ?>">
00379 <?php
00380 echo "\n" . ' ' . $display_rows . "\n";
00381 ?>
00382 </td>
00383 <?php
00384 if (!($cfg['PropertiesNumColumns'] > 1)) {
00385 echo ' <td bgcolor="' . $bgcolor . '" nowrap="nowrap">' . "\n"
00386 . ' ' . (isset($sts_data['Type']) ? $sts_data['Type'] : ' ') . ' ' . "\n"
00387 . ' </td>' . "\n";
00388 if (PMA_MYSQL_INT_VERSION >= 40100) {
00389 echo ' <td bgcolor="' . $bgcolor . '" nowrap="nowrap">' . "\n"
00390 . ' ' . (isset($sts_data['Collation']) ? '<dfn title="' . PMA_getCollationDescr($sts_data['Collation']) . '">' . $sts_data['Collation'] . '</dfn>' : '---') . ' ' . "\n"
00391 . ' </td>' . "\n";
00392 }
00393 }
00394
00395 if ($cfg['ShowStats']) {
00396 echo "\n";
00397 ?>
00398 <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
00399
00400 <a href="tbl_properties_structure.php?<?php echo $tbl_url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
00401 </td>
00402 <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
00403
00404 <?php
00405 if (isset($formated_overhead)) {
00406 echo '<a href="tbl_properties_structure.php?' . $tbl_url_query . '#showusage">' . $formated_overhead . ' ' . $overhead_unit . '</a>' . "\n";
00407 unset($formated_overhead);
00408 $overhead_check .= "document.getElementById('checkbox_tbl_$i').checked = true;";
00409 } else {
00410 echo " - \n";
00411 }
00412 ?>
00413 </td>
00414 <?php
00415 echo "\n";
00416 }
00417 } else {
00418 ?>
00419 <td colspan="3" align="center" bgcolor="<?php echo $bgcolor; ?>">
00420 <?php echo $strInUse . "\n"; ?>
00421 </td>
00422 <?php
00423 }
00424 echo "\n";
00425 ?>
00426 </tr>
00427 <?php
00428 }
00429
00430 if ($cfg['ShowStats']) {
00431 list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1);
00432 list($overhead_formated, $overhead_unit) = PMA_formatByteDown($overhead_size, 3, 1);
00433 }
00434 echo "\n";
00435 ?>
00436 <tr>
00437 <td></td>
00438 <th align="center" nowrap="nowrap">
00439 <b><?php echo sprintf($strTables, number_format($num_tables, 0, $number_decimal_separator, $number_thousands_separator)); ?></b>
00440 </th>
00441 <th colspan="6" align="center">
00442 <b><?php echo $strSum; ?></b>
00443 </th>
00444 <th align="right" nowrap="nowrap">
00445 <b><?php echo number_format($sum_entries, 0, $number_decimal_separator, $number_thousands_separator); ?></b>
00446 </th>
00447 <?php
00448 if (!($cfg['PropertiesNumColumns'] > 1)) {
00449 echo ' <th align="center">' . "\n"
00450 . ' <b>--</b>' . "\n"
00451 . ' </th>' . "\n";
00452 if (PMA_MYSQL_INT_VERSION >= 40100) {
00453 echo ' <th align="center">' . "\n"
00454 . ' <b><dfn title="' . PMA_getCollationDescr($db_collation) . '">' . $db_collation . '</dfn></b> ' . "\n"
00455 . ' </th>' . "\n";
00456 }
00457 }
00458
00459 if ($cfg['ShowStats']) {
00460 echo "\n";
00461 ?>
00462 <th align="right" nowrap="nowrap">
00463
00464 <b><?php echo $sum_formated . ' ' . $unit; ?></b>
00465 </th>
00466 <th align="right" nowrap="nowrap">
00467
00468 <b><?php echo $overhead_formated . ' ' . $overhead_unit; ?></b>
00469 </th>
00470 <?php
00471 }
00472 echo "\n";
00473 ?>
00474 </tr>
00475
00476 <?php
00477
00478 $checkall_url = 'db_details_structure.php?' . PMA_generate_common_url($db);
00479 echo "\n";
00480 ?>
00481 <tr>
00482 <td colspan="<?php echo (($cfg['ShowStats']) ? '11' : '10'); ?>" valign="bottom">
00483 <img src="./images/arrow_<?php echo $text_dir; ?>.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
00484 <a href="<?php echo $checkall_url; ?>&checkall=1" onclick="setCheckboxes('tablesForm', true); return false;">
00485 <?php echo $strCheckAll; ?></a>
00486 /
00487 <a href="<?php echo $checkall_url; ?>" onclick="setCheckboxes('tablesForm', false); return false;">
00488 <?php echo $strUncheckAll; ?></a>
00489 <?php if ($overhead_check != '') { ?>
00490 /
00491 <a href="#" onclick="setCheckboxes('tablesForm', false); <?php echo $overhead_check; ?> return false;">
00492 <?php echo $strCheckOverhead; ?></a>
00493 <?php } ?>
00494
00495 <img src="./images/spacer.gif" border="0" width="38" height="1" alt="" />
00496 <select name="submit_mult" dir="ltr" onchange="this.form.submit();">
00497 <?php
00498 echo "\n";
00499 echo ' <option value="' . $strWithChecked . '" selected="selected">'
00500 . $strWithChecked . '</option>' . "\n";
00501 echo ' <option value="' . $strDrop . '" >'
00502 . $strDrop . '</option>' . "\n";
00503 echo ' <option value="' . $strEmpty . '" >'
00504 . $strEmpty . '</option>' . "\n";
00505 echo ' <option value="' . $strPrintView . '" >'
00506 . $strPrintView . '</option>' . "\n";
00507 echo ' <option value="' . $strCheckTable . '" >'
00508 . $strCheckTable . '</option>' . "\n";
00509 echo ' <option value="' . $strOptimizeTable . '" >'
00510 . $strOptimizeTable . '</option>' . "\n";
00511 echo ' <option value="' . $strRepairTable . '" >'
00512 . $strRepairTable . '</option>' . "\n";
00513 echo ' <option value="' . $strAnalyzeTable . '" >'
00514 . $strAnalyzeTable . '</option>' . "\n";
00515 ?>
00516 </select>
00517 <script type="text/javascript" language="javascript">
00518 <!--
00519
00520
00521 </script>
00522 <noscript>
00523 <input type="submit" value="<?php echo $strGo; ?>" />
00524 </noscript>
00525 </td>
00526 </tr>
00527 </table>
00528 <?php
00529 if ($cfg['PropertiesNumColumns'] > 1) {
00530 ?>
00531 </td>
00532 </tr>
00533 </table>
00534 <?php
00535 }
00536 ?>
00537 </form>
00538 <?php
00539 }
00540
00541 echo "\n";
00542 ?>
00543 <hr />
00544
00545 <?php
00549 ?>
00550 <!-- DATABASE WORK -->
00551 <ul>
00552
00553 <?php
00554 if ($num_tables > 0) {
00555 ?>
00556 <!-- Printable view of a table -->
00557 <li>
00558 <div style="margin-bottom: 10px"><a href="db_printview.php?<?php echo $url_query; ?>"><?php echo $strPrintView; ?></a></div>
00559 </li>
00560 <li>
00561 <div style="margin-bottom: 10px"><a href="./db_datadict.php?<?php echo $url_query; ?>"><?php echo $strDataDict; ?></a></div>
00562 </li>
00563 <?php
00564 }
00565 ?>
00566
00567 <?php
00568 if ($cfgRelation['commwork']) {
00569 ?>
00570 <!-- Alter/Enter db-comment -->
00571 <li>
00572 <form method="post" action="db_details_structure.php">
00573 <?php echo $strDBComment; ?>
00574 <input type="hidden" name="db_comment" value="true" />
00575 <?php echo PMA_generate_common_hidden_inputs($db); ?>
00576 <input type="text" name="comment" class="textfield" value="<?php echo (isset($comment) && is_array($comment) ? htmlspecialchars(implode(' ', $comment)) : ''); ?>" />
00577 <input type="submit" value="<?php echo $strGo; ?>" />
00578 </form>
00579 </li>
00580 <?php
00581 }
00582 ?>
00583
00584 <!-- Create a new table -->
00585 <li>
00586 <form method="post" action="tbl_create.php"
00587 onsubmit="return (emptyFormElements(this, 'table') && checkFormElementInRange(this, 'num_fields', 1))">
00588 <?php echo PMA_generate_common_hidden_inputs($db); ?>
00589 <?php
00590 echo ' ' . sprintf($strCreateNewTable, htmlspecialchars($db)) . ' :<br />' . "\n";
00591 echo ' ' . $strName . ' : ' . "\n";
00592 echo ' ' . '<input type="text" name="table" maxlength="64" class="textfield" />' . "\n";
00593 echo ' ' . '<br />' . "\n";
00594 echo ' ' . $strFields . ' : ' . "\n";
00595 echo ' ' . '<input type="text" name="num_fields" size="2" class="textfield" />' . "\n";
00596 echo ' ' . ' <input type="submit" value="' . $strGo . '" />' . "\n";
00597 ?>
00598 </form>
00599 </li>
00600
00601 <?php
00602
00603 if (PMA_MYSQL_INT_VERSION >= 40101) {
00604
00605
00606 echo ' <!-- Change database charset -->' . "\n"
00607 . ' <li>' . "\n"
00608 . ' <form method="post" action="./db_details_structure.php">' . "\n"
00609 . PMA_generate_common_hidden_inputs($db, $table, 3)
00610 . ' ' . $strCharset . ' : ' . "\n"
00611 . ' <select name="db_charset" style="vertical-align: middle">' . "\n";
00612 $real_charset = strpos($db_collation, '_') ? substr($db_collation, 0, strpos($db_collation, '_')) : $db_collation;
00613 for ($i = 1; isset($mysql_charsets[$i]); $i++) {
00614 echo ' <option value="' . $mysql_charsets[$i] . '"' . ($mysql_charsets[$i] == $real_charset ? ' selected="selected"' : '') . '>' . $mysql_charsets[$i] . '</option>' . "\n";
00615 }
00616 unset($i, $real_charset);
00617 echo ' </select> ' . "\n"
00618 . ' <input type="submit" name="submitcharset" value="' . $strGo . '" style="vertical-align: middle" /> ' . "\n"
00619 . ' </form>' . "\n"
00620 . ' </li>' . "\n\n";
00621 }
00622
00623 if ($num_tables > 0
00624 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
00625 echo ' <li>' . "\n";
00626 echo ' <div style="margin-bottom: 10px">' . "\n";
00627 echo ' <font color="red">' . $strError . '</font><br />' . "\n";
00628 $url_to_goto = '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">';
00629 echo ' ' . sprintf($strRelationNotWorking, $url_to_goto, '</a>') . "\n";
00630 echo ' </div>' . "\n";
00631 echo ' </li>' . "\n";
00632 }
00633
00634
00635 if ($num_tables > 0) {
00636 $takeaway = $url_query . '&table=' . urlencode($table);
00637 }
00638
00639 if ($cfgRelation['pdfwork'] && $num_tables > 0) {
00640 ?>
00641 <!-- Work on PDF Pages -->
00642 <li>
00643 <div style="margin-bottom: 10px"><a href="pdf_pages.php?<?php echo $takeaway; ?>"><?php echo $strEditPDFPages; ?></a></div>
00644 </li>
00645
00646 <!-- PDF schema -->
00647 <?php
00648
00649
00650 $test_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
00651 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
00652 $test_rs = PMA_query_as_cu($test_query);
00653 if ($test_rs && mysql_num_rows($test_rs) > 0) {
00654 echo "\n";
00655 ?>
00656 <li>
00657 <form method="post" action="pdf_schema.php">
00658 <?php echo PMA_generate_common_hidden_inputs($db); ?>
00659 <?php echo $strDisplayPDF; ?> :<br />
00660 <?php echo $strPageNumber; ?>
00661 <select name="pdf_page_number">
00662 <?php
00663 while ($pages = @PMA_mysql_fetch_array($test_rs)) {
00664 echo "\n" . ' '
00665 . '<option value="' . $pages['page_nr'] . '">' . $pages['page_nr'] . ': ' . $pages['page_descr'] . '</option>';
00666 }
00667 echo "\n";
00668 ?>
00669 </select><br />
00670 <input type="checkbox" name="show_grid" id="show_grid_opt" />
00671 <label for="show_grid_opt"><?php echo $strShowGrid; ?></label><br />
00672 <input type="checkbox" name="show_color" id="show_color_opt" checked="checked" />
00673 <label for="show_color_opt"><?php echo $strShowColor; ?></label><br />
00674 <input type="checkbox" name="show_table_dimension" id="show_table_dim_opt" />
00675 <label for="show_table_dim_opt"><?php echo $strShowTableDimension; ?></label><br />
00676 <input type="checkbox" name="all_tab_same_wide" id="all_tab_same_wide" />
00677 <label for="all_tab_same_wide"><?php echo $strAllTableSameWidth; ?></label> <br />
00678 <input type="checkbox" name="with_doc" id="with_doc" checked="checked" />
00679 <label for="with_doc"><?php echo $strDataDict; ?></label> <br />
00680 <?php echo $strShowDatadictAs; ?>
00681 <select name="orientation">
00682 <option value="L"><?php echo $strLandscape;?></option>
00683 <option value="P"><?php echo $strPortrait;?></option>
00684 </select><br />
00685 <?php echo $strPaperSize; ?>
00686 <select name="paper">
00687 <?php
00688 foreach($cfg['PDFPageSizes'] AS $key => $val) {
00689 echo '<option value="' . $val . '"';
00690 if ($val == $cfg['PDFDefaultPageSize']) {
00691 echo ' selected="selected"';
00692 }
00693 echo ' >' . $val . '</option>' . "\n";
00694 }
00695 ?>
00696 </select><br />
00697 <input type="submit" value="<?php echo $strGo; ?>" />
00698 </form>
00699 </li>
00700 <?php
00701 }
00702 }
00703
00704 if ($num_tables > 0
00705 && $cfgRelation['relwork'] && $cfgRelation['commwork']
00706 && isset($cfg['docSQLDir']) && !empty($cfg['docSQLDir'])
00707 ) {
00708 ?>
00709 <!-- import docSQL files -->
00710 <li>
00711 <div style="margin-bottom: 10px"><a href="db_details_importdocsql.php?<?php echo $takeaway . '">' . $strImportDocSQL; ?></a></div>
00712 </li>
00713 <?php
00714 }
00715 echo "\n" . '</ul>';
00716
00717
00721 echo "\n";
00722 require_once('./footer.inc.php');
00723 ?>