typo
[phpmyadmin/crack.git] / db_details_structure.php3
blob2dd407a95ed6f4735d7773e77585aab1afd1bf30
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 if ($sts_data['Rows'] < $cfg['MaxExactCount']) {
244 $local_query = 'SELECT COUNT(*) AS count FROM '
245 . PMA_backquote($db) . '.'
246 . PMA_backquote($table);
247 $table_info_result = PMA_mysql_query($local_query)
248 or PMA_mysqlDie('', $local_query, '', $err_url_0);
249 $row_count = PMA_mysql_result($table_info_result, 0, 'count');
250 $sum_entries += $row_count;
251 } else {
252 $row_count = $sts_data['Rows'];
253 $sum_entries += $sts_data['Rows'];
255 $display_rows = number_format($row_count, 0, $number_decimal_separator, $number_thousands_separator);
258 // Merge or BerkleyDB table: Only row count is accurate.
259 else if (isset($sts_data['Type']) && ereg('^(MRG_MyISAM|BerkeleyDB)$', $sts_data['Type'])) {
260 if ($cfg['ShowStats']) {
261 $formated_size = '&nbsp;-&nbsp;';
262 $unit = '';
264 $sum_entries += $sts_data['Rows'];
265 $display_rows = number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator);
268 // Unknown table type.
269 else {
270 if ($cfg['ShowStats']) {
271 $formated_size = 'unknown';
272 $unit = '';
274 $display_rows = 'unknown';
277 <td align="right" bgcolor="<?php echo $bgcolor; ?>">
278 <?php
279 echo "\n" . ' ' . $display_rows . "\n";
281 </td>
282 <td bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
283 &nbsp;<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : '&nbsp;'); ?>&nbsp;
284 </td>
285 <?php
286 if ($cfg['ShowStats']) {
287 echo "\n";
289 <td align="right" bgcolor="<?php echo $bgcolor; ?>" nowrap="nowrap">
290 &nbsp;&nbsp;
291 <a href="tbl_properties_structure.php3?<?php echo $tbl_url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
292 </td>
293 <?php
294 echo "\n";
295 } // end if
296 } else {
298 <td colspan="3" align="center" bgcolor="<?php echo $bgcolor; ?>">
299 <?php echo $strInUse . "\n"; ?>
300 </td>
301 <?php
303 echo "\n";
305 </tr>
306 <?php
308 // Show Summary
309 if ($cfg['ShowStats']) {
310 list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1);
312 echo "\n";
314 <tr>
315 <td></td>
316 <th align="center" nowrap="nowrap">
317 &nbsp;<b><?php echo sprintf($strTables, number_format($num_tables, 0, $number_decimal_separator, $number_thousands_separator)); ?></b>&nbsp;
318 </th>
319 <th colspan="6" align="center">
320 <b><?php echo $strSum; ?></b>
321 </th>
322 <th align="right" nowrap="nowrap">
323 <b><?php echo number_format($sum_entries, 0, $number_decimal_separator, $number_thousands_separator); ?></b>
324 </th>
325 <th align="center">
326 <b>--</b>
327 </th>
328 <?php
329 if ($cfg['ShowStats']) {
330 echo "\n";
332 <th align="right" nowrap="nowrap">
333 &nbsp;
334 <b><?php echo $sum_formated . ' ' . $unit; ?></b>
335 </th>
336 <?php
338 echo "\n";
340 </tr>
342 <?php
343 // Check all tables url
344 $checkall_url = 'db_details_structure.php3?' . PMA_generate_common_url($db);
345 echo "\n";
347 <tr>
348 <td colspan="<?php echo (($cfg['ShowStats']) ? '11' : '10'); ?>" valign="bottom">
349 <img src="./images/arrow_<?php echo $text_dir; ?>.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
350 <a href="<?php echo $checkall_url; ?>&amp;checkall=1" onclick="setCheckboxes('tablesForm', true); return false;">
351 <?php echo $strCheckAll; ?></a>
352 &nbsp;/&nbsp;
353 <a href="<?php echo $checkall_url; ?>" onclick="setCheckboxes('tablesForm', false); return false;">
354 <?php echo $strUncheckAll; ?></a>
355 &nbsp;&nbsp;&nbsp;
356 <img src="./images/spacer.gif" border="0" width="38" height="1" alt="" />
357 <select name="submit_mult" dir="ltr" onchange="this.form.submit();">
358 <?php
359 echo "\n";
360 echo ' <option value="' . $strWithChecked . '" selected="selected">'
361 . $strWithChecked . '</option>' . "\n";
362 echo ' <option value="' . $strDrop . '" >'
363 . $strDrop . '</option>' . "\n";
364 echo ' <option value="' . $strEmpty . '" >'
365 . $strEmpty . '</option>' . "\n";
366 echo ' <option value="' . $strPrintView . '" >'
367 . $strPrintView . '</option>' . "\n";
368 echo ' <option value="' . $strCheckTable . '" >'
369 . $strCheckTable . '</option>' . "\n";
370 echo ' <option value="' . $strOptimizeTable . '" >'
371 . $strOptimizeTable . '</option>' . "\n";
372 echo ' <option value="' . $strRepairTable . '" >'
373 . $strRepairTable . '</option>' . "\n";
374 echo ' <option value="' . $strAnalyzeTable . '" >'
375 . $strAnalyzeTable . '</option>' . "\n";
377 </select>
378 <script type="text/javascript" language="javascript">
379 <!--
380 // Fake js to allow the use of the <noscript> tag
381 //-->
382 </script>
383 <noscript>
384 <input type="submit" value="<?php echo $strGo; ?>" />
385 </noscript>
386 </td>
387 </tr>
388 </table>
390 </form>
391 <?php
392 } // end case mysql >= 3.23.03
394 // 3. Shows tables list mysql < 3.23.03
395 else {
396 if ($cfgRelation['commwork']) {
397 $comment = PMA_getComments($db);
400 * Displays table comment
402 if (is_array($comment)) {
404 <!-- DB comment -->
405 <p><i>
406 <?php echo htmlspecialchars(implode(' ', $comment)) . "\n"; ?>
407 </i></p>
408 <?php
409 } // end if
412 $i = 0;
413 echo "\n";
415 <form action="db_details_structure.php3">
416 <?php echo PMA_generate_common_hidden_inputs($db); ?>
418 <table border="<?php echo $cfg['Border']; ?>">
419 <tr>
420 <td></td>
421 <th>&nbsp;<?php echo $strTable; ?>&nbsp;</th>
422 <th colspan="6"><?php echo $strAction; ?></th>
423 <th><?php echo $strRecords; ?></th>
424 </tr>
425 <?php
426 $checked = (!empty($checkall) ? ' checked="checked"' : '');
427 while ($i < $num_tables) {
428 $table = $tables[$i];
429 $table_encoded = urlencode($table);
430 $table_name = htmlspecialchars($table);
432 // Sets parameters for links
433 $tbl_url_query = $url_query . '&amp;table=' . $table_encoded;
434 $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo'];
435 echo "\n";
437 <tr>
438 <td align="center" bgcolor="<?php echo $bgcolor; ?>">
439 <input type="checkbox" name="selected_tbl[]" value="<?php echo $table_encoded; ?>" id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> />
440 </td>
441 <td bgcolor="<?php echo $bgcolor; ?>" class="data">
442 <b>&nbsp;<label for="checkbox_tbl_<?php echo $i; ?>"><?php echo $table_name; ?></label>&nbsp;</b>
443 </td>
444 <td bgcolor="<?php echo $bgcolor; ?>">
445 <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>
446 </td>
447 <td bgcolor="<?php echo $bgcolor; ?>">
448 <a href="tbl_select.php3?<?php echo $tbl_url_query; ?>"><?php echo $strSelect; ?></a>
449 </td>
450 <td bgcolor="<?php echo $bgcolor; ?>">
451 <a href="tbl_change.php3?<?php echo $tbl_url_query; ?>"><?php echo $strInsert; ?></a>
452 </td>
453 <td bgcolor="<?php echo $bgcolor; ?>">
454 <a href="tbl_properties.php3?<?php echo $tbl_url_query; ?>"><?php echo $strProperties; ?></a>
455 </td>
456 <td bgcolor="<?php echo $bgcolor; ?>">
457 <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>
458 </td>
459 <td bgcolor="<?php echo $bgcolor; ?>">
460 <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>
461 </td>
462 <td align="right" bgcolor="<?php echo $bgcolor; ?>">
463 <?php PMA_countRecords($db, $table); echo "\n"; ?>
464 </td>
465 </tr>
466 <?php
467 $i++;
468 } // end while
469 echo "\n";
471 // Check all tables url
472 $checkall_url = 'db_details_structure.php3?' . PMA_generate_common_url($db);
474 <tr>
475 <td colspan="9">
476 <img src="./images/arrow_<?php echo $text_dir; ?>.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
477 <a href="<?php echo $checkall_url; ?>&amp;checkall=1" onclick="setCheckboxes('tablesForm', true); return false;">
478 <?php echo $strCheckAll; ?></a>
479 &nbsp;/&nbsp;
480 <a href="<?php echo $checkall_url; ?>" onclick="setCheckboxes('tablesForm', false); return false;">
481 <?php echo $strUncheckAll; ?></a>
482 </td>
483 </tr>
485 <tr>
486 <td colspan="9">
487 <img src="./images/spacer.gif" border="0" width="38" height="1" alt="" />
488 <i><?php echo $strWithChecked; ?></i>&nbsp;&nbsp;
489 <input type="submit" name="submit_mult" value="<?php echo $strDrop; ?>" />
490 &nbsp;<?php $strOr . "\n"; ?>&nbsp;
491 <input type="submit" name="submit_mult" value="<?php echo $strEmpty; ?>" />
492 </td>
493 </tr>
494 </table>
496 </form>
497 <?php
498 } // end case mysql < 3.23.03
500 echo "\n";
502 <hr />
505 <?php
507 * Work on the database
510 <!-- DATABASE WORK -->
511 <ul>
513 <?php
514 if ($num_tables > 0) {
516 <!-- Printable view of a table -->
517 <li>
518 <div style="margin-bottom: 10px"><a href="db_printview.php3?<?php echo $url_query; ?>"><?php echo $strPrintView; ?></a></div>
519 </li>
520 <li>
521 <div style="margin-bottom: 10px"><a href="./db_datadict.php3?<?php echo $url_query; ?>"><?php echo $strDataDict; ?></a></div>
522 </li>
523 <?php
524 } // end if
527 <?php
528 if ($cfgRelation['commwork']) {
530 <!-- Alter/Enter db-comment -->
531 <li>
532 <form method="post" action="db_details_structure.php3">
533 <?php echo $strDBComment; ?>
534 <input type="hidden" name="db_comment" value="true" />
535 <?php echo PMA_generate_common_hidden_inputs($db); ?>
536 <input type="text" name="comment" class="textfield" value="<?php echo (isset($comment) && is_array($comment) ? htmlspecialchars(implode(' ', $comment)) : ''); ?>" />
537 <input type="submit" value="<?php echo $strGo; ?>" />
538 </form>
539 </li>
540 <?php
544 <!-- Create a new table -->
545 <li>
546 <form method="post" action="tbl_create.php3"
547 onsubmit="return (emptyFormElements(this, 'table') && checkFormElementInRange(this, 'num_fields', 1))">
548 <?php echo PMA_generate_common_hidden_inputs($db); ?>
549 <?php
550 echo ' ' . sprintf($strCreateNewTable, htmlspecialchars($db)) . '&nbsp;:<br />' . "\n";
551 echo ' ' . $strName . '&nbsp;:&nbsp;' . "\n";
552 echo ' ' . '<input type="text" name="table" maxlength="64" class="textfield" />' . "\n";
553 echo ' ' . '<br />' . "\n";
554 echo ' ' . $strFields . '&nbsp;:&nbsp;' . "\n";
555 echo ' ' . '<input type="text" name="num_fields" size="2" class="textfield" />' . "\n";
556 echo ' ' . '&nbsp;<input type="submit" value="' . $strGo . '" />' . "\n";
558 </form>
559 </li>
561 <?php
562 if ($num_tables > 0
563 && !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == FALSE) {
564 echo ' <li>' . "\n";
565 echo ' <div style="margin-bottom: 10px">' . "\n";
566 echo ' <font color="red">' . $strError . '</font><br />' . "\n";
567 $url_to_goto = '<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php3?' . $url_query . '">';
568 echo ' ' . sprintf($strRelationNotWorking, $url_to_goto, '</a>') . "\n";
569 echo ' </div>' . "\n";
570 echo ' </li>' . "\n";
571 } // end if
573 // is this OK to check for 'class' support?
574 if ($num_tables > 0) {
575 $takeaway = $url_query . '&amp;table=' . urlencode($table);
578 if ($cfgRelation['pdfwork'] && $num_tables > 0) {
580 <!-- Work on PDF Pages -->
581 <li>
582 <div style="margin-bottom: 10px"><a href="pdf_pages.php3?<?php echo $takeaway; ?>"><?php echo $strEditPDFPages; ?></a></div>
583 </li>
585 <!-- PDF schema -->
586 <?php
587 // We only show this if we find something in the new pdf_pages table
589 $test_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
590 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
591 $test_rs = PMA_query_as_cu($test_query);
592 if ($test_rs && mysql_num_rows($test_rs) > 0) {
593 echo "\n";
595 <li>
596 <form method="post" action="pdf_schema.php3">
597 <?php echo PMA_generate_common_hidden_inputs($db); ?>
598 <?php echo $strDisplayPDF; ?>&nbsp;:<br />
599 <?php echo $strPageNumber; ?>&nbsp;
600 <select name="pdf_page_number">
601 <?php
602 while ($pages = @PMA_mysql_fetch_array($test_rs)) {
603 echo "\n" . ' '
604 . '<option value="' . $pages['page_nr'] . '">' . $pages['page_nr'] . ': ' . $pages['page_descr'] . '</option>';
605 } // end while
606 echo "\n";
608 </select><br />
609 <input type="checkbox" name="show_grid" id="show_grid_opt" />
610 <label for="show_grid_opt"><?php echo $strShowGrid; ?></label><br />
611 <input type="checkbox" name="show_color" id="show_color_opt" checked="checked" />
612 <label for="show_color_opt"><?php echo $strShowColor; ?></label><br />
613 <input type="checkbox" name="show_table_dimension" id="show_table_dim_opt" />
614 <label for="show_table_dim_opt"><?php echo $strShowTableDimension; ?></label><br />
615 <input type="checkbox" name="all_tab_same_wide" id="all_tab_same_wide" />
616 <label for="all_tab_same_wide"><?php echo $strAllTableSameWidth; ?></label> <br />
617 <input type="checkbox" name="with_doc" id="with_doc" checked="checked" />
618 <label for="with_doc"><?php echo $strDataDict; ?></label> <br />
619 <?php echo $strShowDatadictAs; ?>
620 <select name="orientation">
621 <option value="L"><?php echo $strLandscape;?></option>
622 <option value="P"><?php echo $strPortrait;?></option>
623 </select>
624 &nbsp;&nbsp;<input type="submit" value="<?php echo $strGo; ?>" />
625 </form>
626 </li>
627 <?php
628 } // end if
629 } // end if
631 if ($num_tables > 0
632 && $cfgRelation['relwork'] && $cfgRelation['commwork']) {
634 <!-- import docSQL files -->
635 <li>
636 <div style="margin-bottom: 10px"><a href="db_details_importdocsql.php3?<?php echo $takeaway . '">' . $strImportDocSQL; ?></a></div>
637 </li>
638 <?php
640 echo "\n" . '</ul>';
644 * Displays the footer
646 echo "\n";
647 require('./footer.inc.php3');