Translation update done using Pootle.
[phpmyadmin/crack.git] / pdf_pages.php
blob2e907b8d5ca10e29c60cfb283949697326e4b932
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @version $Id$
6 * @package phpMyAdmin
7 */
9 /**
10 * Gets some core libraries
12 require_once './libraries/common.inc.php';
13 require_once './libraries/db_common.inc.php';
14 require './libraries/StorageEngine.class.php';
16 $active_page = 'db_operations.php';
17 require_once './libraries/db_common.inc.php';
18 $url_query .= '&amp;goto=pdf_pages.php';
19 require_once './libraries/db_info.inc.php';
21 /**
22 * Settings for relation stuff
24 require_once './libraries/relation.lib.php';
25 $cfgRelation = PMA_getRelationsParam();
27 // This is to avoid "Command out of sync" errors. Before switching this to
28 // a value of 0 (for MYSQLI_USE_RESULT), please check the logic
29 // to free results wherever needed.
30 $query_default_option = PMA_DBI_QUERY_STORE;
32 /**
33 * Now in ./libraries/relation.lib.php we check for all tables
34 * that we need, but if we don't find them we are quiet about it
35 * so people can work without.
36 * This page is absolutely useless if you didn't set up your tables
37 * correctly, so it is a good place to see which tables we can and
38 * complain ;-)
40 if (!$cfgRelation['relwork']) {
41 echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'relation', 'config.inc.php') . '<br />' . "\n"
42 . PMA_showDocu('relation') . "\n";
43 require_once './libraries/footer.inc.php';
46 if (!$cfgRelation['displaywork']) {
47 echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'table_info', 'config.inc.php') . '<br />' . "\n"
48 . PMA_showDocu('table_info') . "\n";
49 require_once './libraries/footer.inc.php';
52 if (!isset($cfgRelation['table_coords'])){
53 echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'table_coords', 'config.inc.php') . '<br />' . "\n"
54 . PMA_showDocu('table_coords') . "\n";
55 require_once './libraries/footer.inc.php';
57 if (!isset($cfgRelation['pdf_pages'])) {
58 echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'pdf_page', 'config.inc.php') . '<br />' . "\n"
59 . PMA_showDocu('pdf_pages') . "\n";
60 require_once './libraries/footer.inc.php';
63 if ($cfgRelation['pdfwork']) {
64 // Now is the time to work on all changes
65 if (isset($do)) {
66 switch ($do) {
67 case 'choosepage':
68 if ($action_choose=="1") {
69 $ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
70 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
71 . ' AND pdf_page_number = \'' . PMA_sqlAddslashes($chpage) . '\'';
72 PMA_query_as_controluser($ch_query, FALSE, $query_default_option);
74 $ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
75 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
76 . ' AND page_nr = \'' . PMA_sqlAddslashes($chpage) . '\'';
77 PMA_query_as_controluser($ch_query, FALSE, $query_default_option);
79 unset($chpage);
81 break;
82 case 'createpage':
83 $pdf_page_number = PMA_REL_create_page($newpage, $cfgRelation, $db, $query_default_option);
85 // A u t o m a t i c l a y o u t
86 // ================================
87 if (isset($auto_layout_internal) || isset($auto_layout_foreign)) {
88 $all_tables = array();
91 if (isset($auto_layout_foreign)) {
92 // get the tables list
93 $tables = PMA_DBI_get_tables_full($db);
94 // find the ones who support FOREIGN KEY; it's not
95 // important that we group together InnoDB tables
96 // and PBXT tables, as this logic is just to put
97 // the tables on the layout, not to determine relations
98 $foreignkey_tables = array();
99 foreach($tables as $table_name => $table_properties) {
100 if (PMA_foreignkey_supported($table_properties['ENGINE'])) {
101 $foreignkey_tables[] = $table_name;
104 $all_tables = $foreignkey_tables;
105 // could be improved by finding the tables which have the
106 // most references keys and placing them at the beginning
107 // of the array (so that they are all center of schema)
108 unset($tables, $foreignkey_tables);
109 } // endif auto_layout_foreign
111 if (isset($auto_layout_internal)) {
112 // get the tables that have relations, by descending
113 // number of links
114 $master_tables = 'SELECT COUNT(master_table), master_table'
115 . ' FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['relation'])
116 . ' WHERE master_db = \'' . $db . '\''
117 . ' GROUP BY master_table'
118 . ' ORDER BY ' . PMA_backquote('COUNT(master_table)') . ' DESC ';
119 $master_tables_rs = PMA_query_as_controluser($master_tables, FALSE, $query_default_option);
120 if ($master_tables_rs && PMA_DBI_num_rows($master_tables_rs) > 0) {
121 // first put all the master tables at beginning
122 // of the list, so they are near the center of
123 // the schema
124 while (list(, $master_table) = PMA_DBI_fetch_row($master_tables_rs)) {
125 $all_tables[] = $master_table;
128 // then for each master, add its foreigns into an array
129 // of foreign tables, if not already there
130 // (a foreign might be foreign for more than
131 // one table, and might be a master itself)
133 $foreign_tables = array();
134 foreach ($all_tables AS $master_table) {
135 $foreigners = PMA_getForeigners($db, $master_table);
136 foreach ($foreigners AS $foreigner) {
137 if (!in_array($foreigner['foreign_table'], $foreign_tables)) {
138 $foreign_tables[] = $foreigner['foreign_table'];
143 // then merge the arrays
144 foreach ($foreign_tables AS $foreign_table) {
145 if (!in_array($foreign_table, $all_tables)) {
146 $all_tables[] = $foreign_table;
149 } // endif there are master tables
150 } // endif auto_layout_internal
152 if (isset($auto_layout_internal) || isset($auto_layout_foreign)) {
153 // now generate the coordinates for the schema,
154 // in a clockwise spiral
156 $pos_x = 300;
157 $pos_y = 300;
158 $delta = 110;
159 $delta_mult = 1.10;
160 $direction = "right";
161 foreach ($all_tables AS $current_table) {
163 // save current table's coordinates
164 $insert_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords']) . ' '
165 . '(db_name, table_name, pdf_page_number, x, y) '
166 . 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($current_table) . '\',' . $pdf_page_number . ',' . $pos_x . ',' . $pos_y . ')';
167 PMA_query_as_controluser($insert_query, FALSE, $query_default_option);
169 // compute for the next table
170 switch ($direction) {
171 case 'right':
172 $pos_x += $delta;
173 $direction = "down";
174 $delta *= $delta_mult;
175 break;
176 case 'down':
177 $pos_y += $delta;
178 $direction = "left";
179 $delta *= $delta_mult;
180 break;
181 case 'left':
182 $pos_x -= $delta;
183 $direction = "up";
184 $delta *= $delta_mult;
185 break;
186 case 'up':
187 $pos_y -= $delta;
188 $direction = "right";
189 $delta *= $delta_mult;
190 break;
191 } // end switch
192 } // end foreach
193 } // end if some auto-layout to do
195 $chpage = $pdf_page_number;
197 break;
199 case 'edcoord':
200 for ($i = 0; $i < $c_table_rows; $i++) {
201 $arrvalue = 'c_table_' . $i;
202 $arrvalue = $$arrvalue;
203 if (!isset($arrvalue['x']) || $arrvalue['x'] == '') {
204 $arrvalue['x'] = 0;
206 if (!isset($arrvalue['y']) || $arrvalue['y'] == '') {
207 $arrvalue['y'] = 0;
209 if (isset($arrvalue['name']) && $arrvalue['name'] != '--') {
210 $test_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
211 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
212 . ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
213 . ' AND pdf_page_number = \'' . PMA_sqlAddslashes($chpage) . '\'';
214 $test_rs = PMA_query_as_controluser($test_query, FALSE, $query_default_option);
215 if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
216 if (isset($arrvalue['delete']) && $arrvalue['delete'] == 'y') {
217 $ch_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
218 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
219 . ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
220 . ' AND pdf_page_number = \'' . PMA_sqlAddslashes($chpage) . '\'';
221 } else {
222 $ch_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords']) . ' '
223 . 'SET x = ' . $arrvalue['x'] . ', y= ' . $arrvalue['y']
224 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
225 . ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
226 . ' AND pdf_page_number = \'' . PMA_sqlAddslashes($chpage) . '\'';
228 } else {
229 $ch_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords']) . ' '
230 . '(db_name, table_name, pdf_page_number, x, y) '
231 . 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($arrvalue['name']) . '\', \'' . PMA_sqlAddslashes($chpage) . '\',' . $arrvalue['x'] . ',' . $arrvalue['y'] . ')';
233 PMA_query_as_controluser($ch_query, FALSE, $query_default_option);
234 } // end if
235 } // end for
236 break;
237 case 'deleteCrap':
238 foreach ($delrow AS $current_row) {
239 $d_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords']) . ' ' . "\n"
240 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . "\n"
241 . ' AND table_name = \'' . PMA_sqlAddslashes($current_row) . '\'' . "\n"
242 . ' AND pdf_page_number = \'' . PMA_sqlAddslashes($chpage) . '\'';
243 PMA_query_as_controluser($d_query, FALSE, $query_default_option);
245 break;
246 } // end switch
247 } // end if (isset($do))
249 // We will need an array of all tables in this db
250 $selectboxall = array('--');
251 $alltab_rs = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', null, PMA_DBI_QUERY_STORE);
252 while ($val = @PMA_DBI_fetch_row($alltab_rs)) {
253 $selectboxall[] = $val[0];
256 // Now first show some possibility to choose a page for the pdf
257 $page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
258 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
259 $page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option);
261 if ($page_rs && PMA_DBI_num_rows($page_rs) > 0) {
263 <form method="get" action="pdf_pages.php" name="selpage">
264 <fieldset>
265 <legend>
266 <?php echo __('Please choose a page to edit') . "\n"; ?>
267 </legend>
268 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
269 <input type="hidden" name="do" value="choosepage" />
270 <select name="chpage" onchange="this.form.submit()">
271 <?php
272 while ($curr_page = PMA_DBI_fetch_assoc($page_rs)) {
273 echo "\n" . ' '
274 . '<option value="' . $curr_page['page_nr'] . '"';
275 if (isset($chpage) && $chpage == $curr_page['page_nr']) {
276 echo ' selected="selected"';
278 echo '>' . $curr_page['page_nr'] . ': ' . htmlspecialchars($curr_page['page_descr']) . '</option>';
279 } // end while
280 echo "\n";
282 </select>
283 <?php
284 $choices = array(
285 '0' => __('Edit'),
286 '1' => __('Delete'));
287 PMA_display_html_radio('action_choose', $choices, '0', false);
288 unset($choices);
290 </fieldset>
291 <fieldset class="tblFooters">
292 <input type="submit" value="<?php echo __('Go'); ?>" /><br />
293 </fieldset>
294 </form>
295 <?php
297 echo "\n";
299 // Possibility to create a new page:
301 <form method="post" action="pdf_pages.php" name="crpage">
302 <fieldset>
303 <legend>
304 <?php echo __('Create a page') . "\n"; ?>
305 </legend>
306 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
307 <input type="hidden" name="do" value="createpage" />
308 <table>
309 <tr>
310 <td><label for="id_newpage"><?php echo __('Page name'); ?></label></td>
311 <td><input type="text" name="newpage" id="id_newpage" size="20" maxlength="50" /></td>
312 </tr>
313 <tr>
314 <td><?php echo __('Automatic layout based on'); ?></td>
315 <td>
316 <input type="checkbox" name="auto_layout_internal" id="id_auto_layout_internal" /><label for="id_auto_layout_internal"><?php echo __('Internal relations'); ?></label><br />
317 <?php
318 if (PMA_StorageEngine::isValid('InnoDB') || PMA_StorageEngine::isValid('PBXT')) {
320 <input type="checkbox" name="auto_layout_foreign" id="id_auto_layout_foreign" /><label for="id_auto_layout_foreign">FOREIGN KEY</label><br />
321 <?php
324 </td></tr>
325 </table>
326 </fieldset>
327 <fieldset class="tblFooters">
328 <input type="submit" value="<?php echo __('Go'); ?>" />
329 </fieldset>
330 </form>
331 <?php
332 // Now if we already have chosen a page number then we should show the
333 // tables involved
334 if (isset($chpage) && $chpage > 0) {
335 echo "\n";
337 <hr />
339 <h2><?php echo __('Select Tables') ;?></h2>
341 <?php
342 $page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
343 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
344 . ' AND pdf_page_number = \'' . PMA_sqlAddslashes($chpage) . '\'';
345 $page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option);
346 $array_sh_page = array();
347 $draginit = '';
348 $reset_draginit = '';
349 $i = 0;
350 while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
351 $array_sh_page[] = $temp_sh_page;
354 // Display WYSIWYG-PDF parts?
355 if ($cfg['WYSIWYG-PDF']) {
356 if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
357 $with_field_names = TRUE;
360 <script type="text/javascript" src="./js/dom-drag.js"></script>
361 <form method="post" action="pdf_pages.php" name="dragdrop">
362 <input type="button" name="dragdrop" value="<?php echo __('Toggle scratchboard'); ?>" onclick="ToggleDragDrop('pdflayout');" />
363 <input type="button" name="dragdropreset" value="<?php echo __('Reset'); ?>" onclick="resetDrag();" />
364 </form>
365 <div id="pdflayout" class="pdflayout" style="visibility: hidden;">
366 <?php
367 foreach ($array_sh_page AS $key => $temp_sh_page) {
368 $drag_x = $temp_sh_page['x'];
369 $drag_y = $temp_sh_page['y'];
371 $draginit .= ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
372 $draginit .= ' getElement("table_' . $i . '").onDrag = function (x, y) { document.edcoord.elements["c_table_' . $i . '[x]"].value = parseInt(x); document.edcoord.elements["c_table_' . $i . '[y]"].value = parseInt(y) }' . "\n";
373 $draginit .= ' getElement("table_' . $i . '").style.left = "' . $drag_x . 'px";' . "\n";
374 $draginit .= ' getElement("table_' . $i . '").style.top = "' . $drag_y . 'px";' . "\n";
375 $reset_draginit .= ' getElement("table_' . $i . '").style.left = "2px";' . "\n";
376 $reset_draginit .= ' getElement("table_' . $i . '").style.top = "' . (15 * $i) . 'px";' . "\n";
377 $reset_draginit .= ' document.edcoord.elements["c_table_' . $i . '[x]"].value = "2"' . "\n";
378 $reset_draginit .= ' document.edcoord.elements["c_table_' . $i . '[y]"].value = "' . (15 * $i) . '"' . "\n";
380 $local_query = 'SHOW FIELDS FROM '
381 . PMA_backquote($temp_sh_page['table_name'])
382 . ' FROM ' . PMA_backquote($db);
383 $fields_rs = PMA_DBI_query($local_query);
384 unset($local_query);
385 $fields_cnt = PMA_DBI_num_rows($fields_rs);
387 echo '<div id="table_' . $i . '" class="pdflayout_table"><u>' . $temp_sh_page['table_name'] . '</u>';
388 if (isset($with_field_names)) {
389 while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
390 echo '<br />' . htmlspecialchars($row['Field']) . "\n";
393 echo '</div>' . "\n";
394 PMA_DBI_free_result($fields_rs);
395 unset($fields_rs);
397 $i++;
400 </div>
401 <script type="text/javascript">
402 //<![CDATA[
403 function PDFinit() {
404 refreshLayout();
405 myid = getElement('pdflayout');
406 <?php echo $draginit; ?>
409 function resetDrag() {
410 <?php echo $reset_draginit; ?>
412 //]]>
413 </script>
414 <?php
415 } // end if WYSIWYG-PDF
418 <form method="post" action="pdf_pages.php" name="edcoord">
419 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
420 <input type="hidden" name="chpage" value="<?php echo htmlspecialchars($chpage); ?>" />
421 <input type="hidden" name="do" value="edcoord" />
422 <table border="0">
423 <tr>
424 <th><?php echo __('Table'); ?></th>
425 <th><?php echo __('Delete'); ?></th>
426 <th>X</th>
427 <th>Y</th>
428 </tr>
429 <?php
430 if (isset($ctable)) {
431 unset($ctable);
435 $i = 0;
436 $odd_row = true;
437 foreach ($array_sh_page AS $dummy_sh_page => $sh_page) {
438 $_mtab = $sh_page['table_name'];
439 $tabExist[$_mtab] = FALSE;
440 echo "\n" . ' <tr class="';
441 if ($odd_row) {
442 echo 'odd';
443 } else {
444 echo 'even';
446 echo '">';
447 $odd_row != $odd_row;
448 echo "\n" . ' <td>'
449 . "\n" . ' <select name="c_table_' . $i . '[name]">';
450 foreach ($selectboxall AS $key => $value) {
451 echo "\n" . ' <option value="' . htmlspecialchars($value) . '"';
452 if ($value == $sh_page['table_name']) {
453 echo ' selected="selected"';
454 $tabExist[$_mtab] = TRUE;
456 echo '>' . htmlspecialchars($value) . '</option>';
457 } // end while
458 echo "\n" . ' </select>'
459 . "\n" . ' </td>';
460 echo "\n" . ' <td>'
461 . "\n" . ' <input type="checkbox" name="c_table_' . $i . '[delete]" value="y" />' . __('Delete');
462 echo "\n" . ' </td>';
463 echo "\n" . ' <td>'
464 . "\n" . ' <input type="text" ' . ($cfg['WYSIWYG-PDF'] ? 'onchange="dragPlace(' . $i . ', \'x\', this.value)"' : '') . ' name="c_table_' . $i . '[x]" value="' . $sh_page['x'] . '" />';
465 echo "\n" . ' </td>';
466 echo "\n" . ' <td>'
467 . "\n" . ' <input type="text" ' . ($cfg['WYSIWYG-PDF'] ? 'onchange="dragPlace(' . $i . ', \'y\', this.value)"' : '') . ' name="c_table_' . $i . '[y]" value="' . $sh_page['y'] . '" />';
468 echo "\n" . ' </td>';
469 echo "\n" . ' </tr>';
470 $i++;
471 } // end while
472 // Do one more empty row
473 echo "\n" . ' <tr class="';
474 if ($odd_row) {
475 echo 'odd';
476 } else {
477 echo 'even';
479 $odd_row != $odd_row;
480 echo '">';
481 echo "\n" . ' <td>'
482 . "\n" . ' <select name="c_table_' . $i . '[name]">';
483 foreach ($selectboxall AS $key => $value) {
484 echo "\n" . ' <option value="' . htmlspecialchars($value) . '">' . htmlspecialchars($value) . '</option>';
486 echo "\n" . ' </select>'
487 . "\n" . ' </td>';
488 echo "\n" . ' <td>'
489 . "\n" . ' <input type="checkbox" name="c_table_' . $i . '[delete]" value="y" />' . __('Delete');
490 echo "\n" . ' </td>';
491 echo "\n" . ' <td>'
492 . "\n" . ' <input type="text" name="c_table_' . $i . '[x]" value="' . (isset($sh_page['x'])?$sh_page['x']:'') . '" />';
493 echo "\n" . ' </td>';
494 echo "\n" . ' <td>'
495 . "\n" . ' <input type="text" name="c_table_' . $i . '[y]" value="' . (isset($sh_page['y'])?$sh_page['y']:'') . '" />';
496 echo "\n" . ' </td>';
497 echo "\n" . ' </tr>';
498 echo "\n" . ' </table>' . "\n";
500 echo "\n" . ' <input type="hidden" name="c_table_rows" value="' . ($i + 1) . '" />';
501 echo ($cfg['WYSIWYG-PDF'] ? "\n" . ' <input type="hidden" id="showwysiwyg" name="showwysiwyg" value="' . ((isset($showwysiwyg) && $showwysiwyg == '1') ? '1' : '0') . '" />' : '');
502 echo "\n" . ' <input type="checkbox" name="with_field_names" ' . (isset($with_field_names) ? 'checked="checked"' : ''). ' />' . __('Column names') . '<br />';
503 echo "\n" . ' <input type="submit" value="' . __('Save') . '" />';
504 echo "\n" . '</form>' . "\n\n";
505 } // end if
507 // Check if there are tables that need to be deleted,
508 // if there are, ask the user for allowance
509 $_strtrans = '';
510 $_strname = '';
511 $shoot = FALSE;
512 if (!empty($tabExist) && is_array($tabExist)) {
513 foreach ($tabExist AS $key => $value) {
514 if (!$value) {
515 $_strtrans .= '<input type="hidden" name="delrow[]" value="' . htmlspecialchars($key) . '" />' . "\n";
516 $_strname .= '<li>' . htmlspecialchars($key) . '</li>' . "\n";
517 $shoot = TRUE;
520 if ($shoot) {
521 echo '<form action="pdf_pages.php" method="post">' . "\n"
522 . PMA_generate_common_hidden_inputs($db, $table)
523 . '<input type="hidden" name="do" value="deleteCrap" />' . "\n"
524 . '<input type="hidden" name="chpage" value="' . htmlspecialchars($chpage) . '" />' . "\n"
525 . __('The current page has references to tables that no longer exist. Would you like to delete those references?')
526 . '<ul>' . "\n"
527 . $_strname
528 . '</ul>' . "\n"
529 . $_strtrans
530 . '<input type="submit" value="' . __('Go') . '" />' . "\n"
531 . '</form>';
534 // ------------------------------------
535 // d i s p l a y p d f s c h e m a
536 // ------------------------------------
538 if (isset($do)
539 && ($do == 'edcoord'
540 || ($do == 'choosepage' && isset($chpage))
541 || ($do == 'createpage' && isset($chpage)))) {
542 include('./libraries/display_pdf_schema.lib.php');
543 if ((isset($showwysiwyg) && $showwysiwyg == '1')) {
545 <script type="text/javascript">
546 //<![CDATA[
547 ToggleDragDrop('pdflayout');
548 //]]>
549 </script>
550 <?php
552 } // end if
553 } // end if ($cfgRelation['pdfwork'])
557 * Displays the footer
559 echo "\n";
560 require_once './libraries/footer.inc.php';