lang
[phpmyadmin/crack.git] / db_details_structure.php3
blob1e9ecf37f149f58e68b6e497abb60dbb943cef83
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Prepares the tables list if the user where not redirected to this script
8 * because there is no table in the database ($is_info is TRUE)
9 */
10 if (empty($is_info)) {
11 if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
12 include('./libraries/grab_globals.lib.php3');
14 if (!defined('PMA_COMMON_LIB_INCLUDED')) {
15 include('./libraries/common.lib.php3');
18 // Drops/deletes/etc. multiple tables if required
19 if ((!empty($submit_mult) && isset($selected_tbl))
20 || isset($mult_btn)) {
21 $action = 'db_details_structure.php3';
22 include('./mult_submits.inc.php3');
24 include('./db_details_common.php3');
25 $url_query .= '&amp;goto=db_details_structure.php3';
27 // Gets the database structure
28 $sub_part = '_structure';
29 include('./db_details_db_info.php3');
30 echo "\n";
32 /**
33 * Show result of multi submit operation
35 if ((!empty($submit_mult) && isset($selected_tbl))
36 || isset($mult_btn)) {
37 PMA_showMessage($strSuccess);
42 /**
43 * Settings for relations stuff
45 require('./libraries/relation.lib.php3');
46 $cfgRelation = PMA_getRelationsParam();
48 /**
49 * Check if comments were updated
51 if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') {
52 PMA_SetComment($db, '', '(db_comment)', $comment);
55 /**
56 * Displays the tables list
60 <!-- TABLE LIST -->
62 <?php
63 // 1. No tables
64 if ($num_tables == 0) {
65 echo $strNoTablesFound . "\n";
68 // 2. Shows table informations on mysql >= 3.23.03 - staybyte - 11 June 2001
69 else if (PMA_MYSQL_INT_VERSION >= 32303) {
71 // Get additional information about tables for tooltip
72 if ($cfg['ShowTooltip']) {
73 $tooltip_truename = array();
74 $tooltip_aliasname = array();
76 $result = PMA_mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db));
77 while ($tmp = PMA_mysql_fetch_array($result)) {
78 $tooltip_truename[$tmp['Name']] = ($cfg['ShowTooltipAliasTB'] ? (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : $tmp['Name']) : $tmp['Name']);
79 $tooltip_aliasname[$tmp['Name']] = ($cfg['ShowTooltipAliasTB'] ? $tmp['Name'] : (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : ''));
80 if (isset($tmp['Create_time']) && !empty($tmp['Create_time'])) {
81 $tooltip_aliasname[$tmp['Name']] .= ', ' . $strStatCreateTime . ': ' . PMA_localisedDate(strtotime($tmp['Create_time']));
84 if (isset($tmp['Update_time']) && !empty($tmp['Update_time'])) {
85 $tooltip_aliasname[$tmp['Name']] .= ', ' . $strStatUpdateTime . ': ' . PMA_localisedDate(strtotime($tmp['Update_time']));
88 if (isset($tmp['Check_time']) && !empty($tmp['Check_time'])) {
89 $tooltip_aliasname[$tmp['Name']] .= ', ' . $strStatCheckTime . ': ' . PMA_localisedDate(strtotime($tmp['Check_time']));
92 } // end while
93 } // end if
95 if ($cfgRelation['commwork']) {
96 $comment = PMA_getComments($db);
98 /**
99 * Displays table comment
101 if (is_array($comment)) {
103 <!-- DB comment -->
104 <p><i>
105 <?php echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?>
106 </i></p>
107 <?php
108 } // end if
111 <form method="post" action="db_details_structure.php3" name="tablesForm">
112 <?php echo PMA_generate_common_hidden_inputs($db); ?>
114 <table border="<?php echo $cfg['Border']; ?>">
115 <tr>
116 <td></td>
117 <th>&nbsp;<?php echo $strTable; ?>&nbsp;</th>
118 <th colspan="6"><?php echo $strAction; ?></th>
119 <th><?php echo $strRecords; ?></th>
120 <th><?php echo $strType; ?></th>
121 <?php
122 if ($cfg['ShowStats']) {
123 echo '<th>' . $strSize . '</th>';
125 echo "\n";
127 </tr>
128 <?php
129 $i = $sum_entries = 0;
130 (double) $sum_size = 0;
131 $checked = (!empty($checkall) ? ' checked="checked"' : '');
132 while (list($keyname, $sts_data) = each($tables)) {
133 $table = $sts_data['Name'];
134 $table_encoded = urlencode($table);
135 $table_name = htmlspecialchars($table);
137 $alias = (!empty($tooltip_aliasname) && isset($tooltip_aliasname[$table]))
138 ? htmlspecialchars($tooltip_aliasname[$table])
139 : htmlspecialchars($sts_data['Name']);
140 $truename = (!empty($tooltip_truename) && isset($tooltip_truename[$table]))
141 ? htmlspecialchars($tooltip_truename[$table])
142 : htmlspecialchars($sts_data['Name']);
144 // Sets parameters for links
145 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
146 $bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
147 echo "\n";
149 <tr>
150 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
151 <input type="checkbox" name="selected_tbl[]" value="<?php echo $table_encoded; ?>" id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> />
152 </td>
153 <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
154 &nbsp;<b><label for="checkbox_tbl_<?php echo $i; ?>" title="<?php echo $alias; ?>"><?php echo $truename; ?></label>&nbsp;</b>&nbsp;
155 </td>
156 <td bgcolor="<?php echo $bgcolor; ?>">
157 <?php
158 include('./libraries/bookmark.lib.php3');
159 $book_sql_query = PMA_queryBookmarks($db, $cfg['Bookmark'], '\'' . PMA_sqlAddslashes($table) . '\'', 'label');
161 if (!empty($sts_data['Rows'])) {
162 echo '<a href="sql.php3?' . $tbl_url_query . '&amp;sql_query='
163 . (isset($book_sql_query) && $book_sql_query != FALSE ? urlencode($book_sql_query) : urlencode('SELECT * FROM ' . PMA_backquote($table)))
164 . '&amp;pos=0">' . $strBrowse . '</a>';
165 } else {
166 echo $strBrowse;
169 </td>
170 <td bgcolor="<?php echo $bgcolor; ?>">
171 <?php
172 if (!empty($sts_data['Rows'])) {
173 echo '<a href="tbl_select.php3?' . $tbl_url_query . '">'
174 . $strSelect . '</a>';
175 } else {
176 echo $strSelect;
179 </td>
180 <td bgcolor="<?php echo $bgcolor; ?>">
181 <a href="tbl_change.php3?<?php echo $tbl_url_query; ?>">
182 <?php echo $strInsert; ?></a>
183 </td>
184 <td bgcolor="<?php echo $bgcolor; ?>">
185 <a href="tbl_properties_structure.php3?<?php echo $tbl_url_query; ?>">
186 <?php echo $strProperties; ?></a>
187 </td>
188 <td bgcolor="<?php echo $bgcolor; ?>">
189 <a href="sql.php3?<?php echo $tbl_url_query; ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, htmlspecialchars($table))); ?>"
190 onclick="return confirmLink(this, 'DROP TABLE <?php echo PMA_jsFormat($table); ?>')">
191 <?php echo $strDrop; ?></a>
192 </td>
193 <td bgcolor="<?php echo $bgcolor; ?>">
194 <?php
195 if (!empty($sts_data['Rows'])) {
196 echo '<a href="sql.php3?' . $tbl_url_query
197 . '&amp;sql_query=';
198 if (PMA_MYSQL_INT_VERSION >= 40000) {
199 echo urlencode('TRUNCATE ' . PMA_backquote($table))
200 . '&amp;zero_rows='
201 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
202 . '" onclick="return confirmLink(this, \'TRUNCATE ';
203 } else {
204 echo urlencode('DELETE FROM ' . PMA_backquote($table))
205 . '&amp;zero_rows='
206 . urlencode(sprintf($strTableHasBeenEmptied, htmlspecialchars($table)))
207 . '" onclick="return confirmLink(this, \'DELETE FROM ';
209 echo PMA_jsFormat($table) . '\')">' . $strEmpty . '</a>';
210 } else {
211 echo $strEmpty;
214 </td>
215 <?php
216 echo "\n";
218 // loic1: Patch from Joshua Nye <josh at boxcarmedia.com> to get valid
219 // statistics whatever is the table type
220 if (isset($sts_data['Rows'])) {
221 // MyISAM, ISAM or Heap table: Row count, data size and index size
222 // is accurate.
223 if (isset($sts_data['Type']) && ereg('^(MyISAM|ISAM|HEAP)$', $sts_data['Type'])) {
224 if ($cfg['ShowStats']) {
225 $tblsize = doubleval($sts_data['Data_length']) + doubleval($sts_data['Index_length']);
226 $sum_size += $tblsize;
227 list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
229 $sum_entries += $sts_data['Rows'];
230 $display_rows = number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator);
233 // InnoDB table: Row count is not accurate but data and index
234 // sizes are.
235 else if (isset($sts_data['Type']) && $sts_data['Type'] == 'InnoDB') {
236 if ($cfg['ShowStats']) {
237 $tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
238 $sum_size += $tblsize;
239 list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);
241 //$display_rows = '&nbsp;-&nbsp;';
242 // get row count with another method
243 $local_query = 'SELECT COUNT(*) AS count FROM '
244 . PMA_backquote($db) . '.'
245 . PMA_backquote($table);
246 $table_info_result = PMA_mysql_query($local_query)
247 or PMA_mysqlDie('', $local_query, '', $err_url_0);
248 $row_count = PMA_mysql_result($table_info_result, 0, 'count');
249 $sum_entries += $row_count;
250 $display_rows = number_format($row_count, 0, $number_decimal_separator, $number_thousands_separator);
253 // Merge or BerkleyDB table: Only row count is accurate.
254 else if (isset($sts_data['Type']) && ereg('^(MRG_MyISAM|BerkeleyDB)$', $sts_data['Type'])) {
255 if ($cfg['ShowStats']) {
256 $formated_size = '&nbsp;-&nbsp;';
257 $unit = '';
259 $sum_entries += $sts_data['Rows'];
260 $display_rows = number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator);
263 // Unknown table type.
264 else {
265 if ($cfg['ShowStats']) {
266 $formated_size = 'unknown';
267 $unit = '';
269 $display_rows = 'unknown';
272 <td align="right" bgcolor="<?php echo $bgcolor; ?>">
273 <?php
274 echo "\n" . ' ' . $display_rows . "\n";
276 </td>
277 <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
278 &nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp;
279 </td>
280 <?php
281 if ($cfg['ShowStats']) {
282 echo "\n";
284 <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
285 &nbsp;&nbsp;
286 <a href="tbl_properties_structure.php3?<?php echo $tbl_url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
287 </td>
288 <?php
289 echo "\n";
290 } // end if
291 } else {
293 <td colspan="3" align="center" bgcolor="<?php echo $bgcolor; ?>">
294 <?php echo $strInUse . "\n"; ?>
295 </td>
296 <?php
298 echo "\n";
300 </tr>
301 <?php
303 // Show Summary
304 if ($cfg['ShowStats']) {
305 list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1);
307 echo "\n";
309 <tr>
310 <td></td>
311 <th align="center" nowrap="nowrap">
312 &nbsp;<b><?php echo sprintf($strTables, number_format($num_tables, 0, $number_decimal_separator, $number_thousands_separator)); ?></b>&nbsp;
313 </th>
314 <th colspan="6" align="center">
315 <b><?php echo $strSum; ?></b>
316 </th>
317 <th align="right" nowrap="nowrap">
318 <b><?php echo number_format($sum_entries, 0, $number_decimal_separator, $number_thousands_separator); ?></b>
319 </th>
320 <th align="center">
321 <b>--</b>
322 </th>
323 <?php
324 if ($cfg['ShowStats']) {
325 echo "\n";
327 <th align="right" nowrap="nowrap">
328 &nbsp;
329 <b><?php echo $sum_formated . ' ' . $unit; ?></b>
330 </th>
331 <?php
333 echo "\n";
335 </tr>
337 <?php
338 // Check all tables url
339 $checkall_url = 'db_details_structure.php3?' . PMA_generate_common_url($db);
340 echo "\n";
342 <tr>
343 <td colspan="<?php echo (($cfg['ShowStats']) ? '11' : '10'); ?>" valign="bottom">
344 <img src="./images/arrow_<?php echo $text_dir; ?>.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
345 <a href="<?php echo $checkall_url; ?>&amp;checkall=1" onclick="setCheckboxes('tablesForm', true); return false;">
346 <?php echo $strCheckAll; ?></a>
347 &nbsp;/&nbsp;
348 <a href="<?php echo $checkall_url; ?>" onclick="setCheckboxes('tablesForm', false); return false;">
349 <?php echo $strUncheckAll; ?></a>
350 &nbsp;&nbsp;&nbsp;
351 <img src="./images/spacer.gif" border="0" width="38" height="1" alt="" />
352 <select name="submit_mult" dir="ltr" onchange="this.form.submit();">
353 <?php
354 echo "\n";
355 echo ' <option value="' . $strWithChecked . '" selected="selected">'
356 . $strWithChecked . '</option>' . "\n";
357 echo ' <option value="' . $strDrop . '" >'
358 . $strDrop . '</option>' . "\n";
359 echo ' <option value="' . $strEmpty . '" >'
360 . $strEmpty . '</option>' . "\n";
361 echo ' <option value="' . $strPrintView . '" >'
362 . $strPrintView . '</option>' . "\n";
363 echo ' <option value="' . $strCheckTable . '" >'
364 . $strCheckTable . '</option>' . "\n";
365 echo ' <option value="' . $strOptimizeTable . '" >'
366 . $strOptimizeTable . '</option>' . "\n";
367 echo ' <option value="' . $strRepairTable . '" >'
368 . $strRepairTable . '</option>' . "\n";
369 echo ' <option value="' . $strAnalyzeTable . '" >'
370 . $strAnalyzeTable . '</option>' . "\n";
372 </select>
373 <script type="text/javascript" language="javascript">
374 <!--
375 // Fake js to allow the use of the <noscript> tag
376 //-->
377 </script>
378 <noscript>
379 <input type="submit" value="<?php echo $strGo; ?>" />
380 </noscript>
381 </td>
382 </tr>
383 </table>
385 </form>
386 <?php
387 } // end case mysql >= 3.23.03
389 // 3. Shows tables list mysql < 3.23.03
390 else {
391 if ($cfgRelation['commwork']) {
392 $comment = PMA_getComments($db);
395 * Displays table comment
397 if (is_array($comment)) {
399 <!-- DB comment -->
400 <p><i>
401 <?php echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?>
402 </i></p>
403 <?php
404 } // end if
407 $i = 0;
408 echo "\n";
410 <form action="db_details_structure.php3">
411 <?php echo PMA_generate_common_hidden_inputs($db); ?>
413 <table border="<?php echo $cfg['Border']; ?>">
414 <tr>
415 <td></td>
416 <th>&nbsp;<?php echo $strTable; ?>&nbsp;</th>
417 <th colspan="6"><?php echo $strAction; ?></th>
418 <th><?php echo $strRecords; ?></th>
419 </tr>
420 <?php
421 $checked = (!empty($checkall) ? ' checked="checked"' : '');
422 while ($i < $num_tables) {
423 $table = $tables[$i];
424 $table_encoded = urlencode($table);
425 $table_name = htmlspecialchars($table);
427 // Sets parameters for links
428 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
429 $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
430 echo "\n";
432 <tr>
433 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
434 <input type="checkbox" name="selected_tbl[]" value="<?php echo $table_encoded; ?>" id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> />
435 </td>
436 <td bgcolor="<?php echo $bgcolor; ?>" class="data">
437 <b>&nbsp;<label for="checkbox_tbl_<?php echo $i; ?>"><?php echo $table_name; ?></label>&nbsp;</b>
438 </td>
439 <td bgcolor="<?php echo $bgcolor; ?>">
440 <a href="sql.php3?<?php echo $tbl_url_query; ?>&amp;sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&amp;pos=0"><?php echo $strBrowse; ?></a>
441 </td>
442 <td bgcolor="<?php echo $bgcolor; ?>">
443 <a href="tbl_select.php3?<?php echo $tbl_url_query; ?>"><?php echo $strSelect; ?></a>
444 </td>
445 <td bgcolor="<?php echo $bgcolor; ?>">
446 <a href="tbl_change.php3?<?php echo $tbl_url_query; ?>"><?php echo $strInsert; ?></a>
447 </td>
448 <td bgcolor="<?php echo $bgcolor; ?>">
449 <a href="tbl_properties.php3?<?php echo $tbl_url_query; ?>"><?php echo $strProperties; ?></a>
450 </td>
451 <td bgcolor="<?php echo $bgcolor; ?>">
452 <a href="sql.php3?<?php echo $tbl_url_query; ?>&amp;reload=1&amp;purge=1&amp;sql_query=<?php echo urlencode('DROP TABLE ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenDropped, $table_name)); ?>"><?php echo $strDrop; ?></a>
453 </td>
454 <td bgcolor="<?php echo $bgcolor; ?>">
455 <a href="sql.php3?<?php echo $tbl_url_query; ?>&amp;sql_query=<?php echo urlencode('DELETE FROM ' . PMA_backquote($table)); ?>&amp;zero_rows=<?php echo urlencode(sprintf($strTableHasBeenEmptied, $table_name)); ?>"><?php echo $strEmpty; ?></a>
456 </td>
457 <td align="right" bgcolor="<?php echo $bgcolor; ?>">
458 <?php PMA_countRecords($db, $table); echo "\n"; ?>
459 </td>
460 </tr>
461 <?php
462 $i++;
463 } // end while
464 echo "\n";
466 // Check all tables url
467 $checkall_url = 'db_details_structure.php3?' . PMA_generate_common_url($db);
469 <tr>
470 <td colspan="9">
471 <img src="./images/arrow_<?php echo $text_dir; ?>.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
472 <a href="<?php echo $checkall_url; ?>&amp;checkall=1" onclick="setCheckboxes('tablesForm', true); return false;">
473 <?php echo $strCheckAll; ?></a>
474 &nbsp;/&nbsp;
475 <a href="<?php echo $checkall_url; ?>" onclick="setCheckboxes('tablesForm', false); return false;">
476 <?php echo $strUncheckAll; ?></a>
477 </td>
478 </tr>
480 <tr>
481 <td colspan="9">
482 <img src="./images/spacer.gif" border="0" width="38" height="1" alt="" />
483 <i><?php echo $strWithChecked; ?></i>&nbsp;&nbsp;
484 <input type="submit" name="submit_mult" value="<?php echo $strDrop; ?>" />
485 &nbsp;<?php $strOr . "\n"; ?>&nbsp;
486 <input type="submit" name="submit_mult" value="<?php echo $strEmpty; ?>" />
487 </td>
488 </tr>
489 </table>
491 </form>
492 <?php
493 } // end case mysql < 3.23.03
495 echo "\n";
497 <hr />
500 <?php
502 * Work on the database
505 <!-- DATABASE WORK -->
506 <ul>
508 <?php
509 if ($num_tables > 0) {
511 <!-- Printable view of a table -->
512 <li>
513 <div style="margin-bottom: 10px"><a href="db_printview.php3?<?php echo $url_query; ?>"><?php echo $strPrintView; ?></a></div>
514 </li>
515 <li>
516 <div style="margin-bottom: 10px"><a href="./db_datadict.php3?<?php echo $url_query; ?>"><?php echo $strDataDict; ?></a></div>
517 </li>
518 <?php
519 } // end if
522 <?php
523 if ($cfgRelation['commwork']) {
525 <!-- Alter/Enter db-comment -->
526 <li>
527 <form method="post" action="db_details_structure.php3">
528 <?php echo $strDBComment; ?>
529 <input type="hidden" name="db_comment" value="true" />
530 <?php echo PMA_generate_common_hidden_inputs($db); ?>
531 <input type="text" name="comment" class="textfield" value="<?php echo (isset($comment) && is_array($comment) ? htmlspecialchars(implode(' ', $comment)) : ''); ?>" />
532 <input type="submit" value="<?php echo $strGo; ?>" />
533 </form>
534 </li>
535 <?php
539 <!-- Create a new table -->
540 <li>
541 <form method="post" action="tbl_create.php3"
542 onsubmit="return (emptyFormElements(this, 'table') && checkFormElementInRange(this, 'num_fields', 1))">
543 <?php echo PMA_generate_common_hidden_inputs($db); ?>
544 <?php
545 echo ' ' . sprintf($strCreateNewTable, htmlspecialchars($db)) . '&nbsp;:<br />' . "\n";
546 echo ' ' . $strName . '&nbsp;:&nbsp;' . "\n";
547 echo ' ' . '<input type="text" name="table" maxlength="64" class="textfield" />' . "\n";
548 echo ' ' . '<br />' . "\n";
549 echo ' ' . $strFields . '&nbsp;:&nbsp;' . "\n";
550 echo ' ' . '<input type="text" name="num_fields" size="2" class="textfield" />' . "\n";
551 echo ' ' . '&nbsp;<input type="submit" value="' . $strGo . '" />' . "\n";
553 </form>
554 </li>
556 <?php
557 if ($num_tables > 0
558 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
559 echo ' <li>' . "\n";
560 echo ' <div style="margin-bottom: 10px">' . "\n";
561 echo ' <font color="red">' . $strError . '</font><br />' . "\n";
562 $url_to_goto = '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php3?' . $url_query . '">';
563 echo ' ' . sprintf($strRelationNotWorking, $url_to_goto, '</a>') . "\n";
564 echo ' </div>' . "\n";
565 echo ' </li>' . "\n";
566 } // end if
568 // is this OK to check for 'class' support?
569 $takeaway = $url_query . '&amp;table=' . urlencode($table);
570 if ($cfgRelation['pdfwork'] && $num_tables > 0) {
572 <!-- Work on PDF Pages -->
573 <li>
574 <div style="margin-bottom: 10px"><a href="pdf_pages.php3?<?php echo $takeaway; ?>"><?php echo $strEditPDFPages; ?></a></div>
575 </li>
577 <!-- PDF schema -->
578 <?php
579 // We only show this if we find something in the new pdf_pages table
581 $test_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
582 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
583 $test_rs = PMA_query_as_cu($test_query);
584 if ($test_rs && mysql_num_rows($test_rs) > 0) {
585 echo "\n";
587 <li>
588 <form method="post" action="pdf_schema.php3">
589 <?php echo PMA_generate_common_hidden_inputs($db); ?>
590 <?php echo $strDisplayPDF; ?>&nbsp;:<br />
591 <?php echo $strPageNumber; ?>&nbsp;
592 <select name="pdf_page_number">
593 <?php
594 while ($pages = @PMA_mysql_fetch_array($test_rs)) {
595 echo "\n" . ' '
596 . '<option value="' . $pages['page_nr'] . '">' . $pages['page_nr'] . ': ' . $pages['page_descr'] . '</option>';
597 } // end while
598 echo "\n";
600 </select><br />
601 <input type="checkbox" name="show_grid" id="show_grid_opt" />
602 <label for="show_grid_opt"><?php echo $strShowGrid; ?></label><br />
603 <input type="checkbox" name="show_color" id="show_color_opt" checked="checked" />
604 <label for="show_color_opt"><?php echo $strShowColor; ?></label><br />
605 <input type="checkbox" name="show_table_dimension" id="show_table_dim_opt" />
606 <label for="show_table_dim_opt"><?php echo $strShowTableDimension; ?></label><br />
607 <input type="checkbox" name="all_tab_same_wide" id="all_tab_same_wide" />
608 <label for="all_tab_same_wide"><?php echo $strAllTableSameWidth; ?></label> <br />
609 <input type="checkbox" name="with_doc" id="with_doc" checked="checked" />
610 <label for="with_doc"><?php echo $strDataDict; ?></label> <br />
611 <?php echo $strShowDatadictAs; ?>
612 <select name="orientation">
613 <option value="L"><?php echo $strLandscape;?></option>
614 <option value="P"><?php echo $strPortrait;?></option>
615 </select>
616 &nbsp;&nbsp;<input type="submit" value="<?php echo $strGo; ?>" />
617 </form>
618 </li>
619 <?php
620 } // end if
621 } // end if
623 if ($num_tables > 0
624 && $cfgRelation['relwork'] && $cfgRelation['commwork']) {
626 <!-- import docSQL files -->
627 <li>
628 <div style="margin-bottom: 10px"><a href="db_details_importdocsql.php3?<?php echo $takeaway . '">' . $strImportDocSQL; ?></a></div>
629 </li>
630 <?php
632 echo "\n" . '</ul>';
636 * Displays the footer
638 echo "\n";
639 require('./footer.inc.php3');