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