add unique numbers to $strFileCouldNotBeRead to improve support when someone gets...
[phpmyadmin/crack.git] / pdf_pages.php
blob134d96400991dfec09594b5690a854214d421f7f
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
5 /**
6 * Gets some core libraries
7 */
8 require_once('./libraries/grab_globals.lib.php');
9 require_once('./libraries/common.lib.php');
10 require_once('./db_details_common.php');
13 /**
14 * Settings for relation stuff
16 require_once('./libraries/relation.lib.php');
17 $cfgRelation = PMA_getRelationsParam();
19 // This is to avoid "Command out of sync" errors. Before switching this to
20 // a value of 0 (for MYSQLI_USE_RESULT), please check the logic
21 // to free results wherever needed.
22 $query_default_option = PMA_DBI_QUERY_STORE;
24 /**
25 * Now in ./libraries/relation.lib.php we check for all tables
26 * that we need, but if we don't find them we are quiet about it
27 * so people can work without.
28 * This page is absolutely useless if you didn't set up your tables
29 * correctly, so it is a good place to see which tables we can and
30 * complain ;-)
32 if (!$cfgRelation['relwork']) {
33 echo sprintf($strNotSet, 'relation', 'config.inc.php') . '<br />' . "\n"
34 . '<a href="./Documentation.html#relation" target="documentation">' . $strDocu . '</a>' . "\n";
35 require_once('./footer.inc.php');
38 if (!$cfgRelation['displaywork']) {
39 echo sprintf($strNotSet, 'table_info', 'config.inc.php') . '<br />' . "\n"
40 . '<a href="./Documentation.html#table_info" target="documentation">' . $strDocu . '</a>' . "\n";
41 require_once('./footer.inc.php');
44 if (!isset($cfgRelation['table_coords'])){
45 echo sprintf($strNotSet, 'table_coords', 'config.inc.php') . '<br />' . "\n"
46 . '<a href="./Documentation.html#table_coords" target="documentation">' . $strDocu . '</a>' . "\n";
47 exit();
49 if (!isset($cfgRelation['pdf_pages'])) {
50 echo sprintf($strNotSet, 'pdf_page', 'config.inc.php') . '<br />' . "\n"
51 . '<a href="./Documentation.html#pdf_pages" target="documentation">' . $strDocu . '</a>' . "\n";
52 exit();
55 if ($cfgRelation['pdfwork']) {
56 // Now is the time to work on all changes
57 if (isset($do)) {
58 switch ($do) {
59 case 'choosepage':
60 if ($action_choose=="1") {
61 $ch_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_coords'])
62 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
63 . ' AND pdf_page_number = ' . $chpage;
64 PMA_query_as_cu($ch_query, FALSE, $query_default_option);
66 $ch_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
67 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
68 . ' AND page_nr = ' . $chpage;
69 PMA_query_as_cu($ch_query, FALSE, $query_default_option);
71 unset($chpage);
73 break;
74 case 'createpage':
75 if (!isset($newpage) || $newpage == '') {
76 $newpage = $strNoDescription;
78 $ins_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['pdf_pages'])
79 . ' (db_name, page_descr)'
80 . ' VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($newpage) . '\')';
81 PMA_query_as_cu($ins_query, FALSE, $query_default_option);
83 // A u t o m a t i c l a y o u t
85 // TODO: support InnoDB
87 if (isset($autolayout)) {
88 // save the page number
89 $pdf_page_number = PMA_DBI_insert_id((isset($dbh)?$dbh:''));
91 // get the tables that have relations, by descending
92 // number of links
93 $master_tables = 'SELECT COUNT(master_table), master_table'
94 . ' FROM ' . PMA_backquote($cfgRelation['relation'])
95 . ' WHERE master_db = \'' . $db . '\''
96 . ' GROUP BY master_table'
97 . ' ORDER BY ' . PMA_backquote('COUNT(master_table)') . ' DESC ';
98 $master_tables_rs = PMA_query_as_cu($master_tables, FALSE, $query_default_option);
99 if ($master_tables_rs && PMA_DBI_num_rows($master_tables_rs) > 0) {
100 // first put all the master tables at beginning
101 // of the list, so they are near the center of
102 // the schema
103 while (list(,$master_table) = PMA_DBI_fetch_row($master_tables_rs)) {
104 $all_tables[] = $master_table;
107 // then for each master, add its foreigns into an array
108 // of foreign tables, if not already there
109 // (a foreign might be foreign for more than
110 // one table, and might be a master itself)
112 $foreign_tables = array();
113 foreach ($all_tables AS $master_table) {
114 $foreigners = PMA_getForeigners($db, $master_table);
115 foreach ($foreigners AS $foreigner) {
116 if (!in_array($foreigner['foreign_table'], $foreign_tables)) {
117 $foreign_tables[] = $foreigner['foreign_table'];
122 // then merge the arrays
123 foreach ($foreign_tables AS $foreign_table) {
124 if (!in_array($foreign_table, $all_tables)) {
125 $all_tables[] = $foreign_table;
129 // now generate the coordinates for the schema,
130 // in a clockwise spiral
132 $pos_x = 300;
133 $pos_y = 300;
134 $delta = 50;
135 $delta_mult = 1.34;
136 $direction = "right";
137 foreach ($all_tables AS $current_table) {
139 // save current table's coordinates
140 $insert_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['table_coords']) . ' '
141 . '(db_name, table_name, pdf_page_number, x, y) '
142 . 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($current_table) . '\',' . $pdf_page_number . ',' . $pos_x . ',' . $pos_y . ')';
143 PMA_query_as_cu($insert_query, FALSE, $query_default_option);
145 // compute for the next table
146 switch ($direction) {
147 case 'right':
148 $pos_x += $delta;
149 $direction = "down";
150 $delta *= $delta_mult;
151 break;
152 case 'down':
153 $pos_y += $delta;
154 $direction = "left";
155 $delta *= $delta_mult;
156 break;
157 case 'left':
158 $pos_x -= $delta;
159 $direction = "up";
160 $delta *= $delta_mult;
161 break;
162 case 'up':
163 $pos_y -= $delta;
164 $direction = "right";
165 $delta *= $delta_mult;
166 break;
167 } // end switch
168 } // end while
169 } // end if there are master tables
171 $chpage = $pdf_page_number;
172 } // end if isset autolayout
174 break;
176 case 'edcoord':
177 for ($i = 0; $i < $c_table_rows; $i++) {
178 $arrvalue = 'c_table_' . $i;
179 $arrvalue = $$arrvalue;
180 if (!isset($arrvalue['x']) || $arrvalue['x'] == '') {
181 $arrvalue['x'] = 0;
183 if (!isset($arrvalue['y']) || $arrvalue['y'] == '') {
184 $arrvalue['y'] = 0;
186 if (isset($arrvalue['name']) && $arrvalue['name'] != '--') {
187 $test_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['table_coords'])
188 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
189 . ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
190 . ' AND pdf_page_number = ' . $chpage;
191 $test_rs = PMA_query_as_cu($test_query, FALSE, $query_default_option);
192 if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
193 if (isset($arrvalue['delete']) && $arrvalue['delete'] == 'y') {
194 $ch_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_coords'])
195 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
196 . ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
197 . ' AND pdf_page_number = ' . $chpage;
198 } else {
199 $ch_query = 'UPDATE ' . PMA_backquote($cfgRelation['table_coords']) . ' '
200 . 'SET x = ' . $arrvalue['x'] . ', y= ' . $arrvalue['y']
201 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
202 . ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
203 . ' AND pdf_page_number = ' . $chpage;
205 } else {
206 $ch_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['table_coords']) . ' '
207 . '(db_name, table_name, pdf_page_number, x, y) '
208 . 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($arrvalue['name']) . '\',' . $chpage . ',' . $arrvalue['x'] . ',' . $arrvalue['y'] . ')';
210 PMA_query_as_cu($ch_query, FALSE, $query_default_option);
211 } // end if
212 } // end for
213 break;
214 case 'deleteCrap':
215 foreach ($delrow AS $current_row) {
216 $d_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_coords']) . ' ' . "\n"
217 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . "\n"
218 . ' AND table_name = \'' . PMA_sqlAddslashes($current_row) . '\'' . "\n"
219 . ' AND pdf_page_number = ' . $chpage;
220 PMA_query_as_cu($d_query, FALSE, $query_default_option);
222 break;
223 } // end switch
224 } // end if (isset($do))
226 // We will need an array of all tables in this db
227 $selectboxall = array('--');
228 $alltab_rs = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', NULL, PMA_DBI_QUERY_STORE);
229 while ($val = @PMA_DBI_fetch_row($alltab_rs)) {
230 $selectboxall[] = $val[0];
233 // Now first show some possibility to choose a page for the pdf
234 $page_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
235 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
236 $page_rs = PMA_query_as_cu($page_query, FALSE, $query_default_option);
238 if ($page_rs && PMA_DBI_num_rows($page_rs) > 0) {
240 <form method="get" action="pdf_pages.php" name="selpage">
241 <?php echo $strChoosePage . "\n"; ?>
242 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
243 <input type="hidden" name="do" value="choosepage" />
244 <select name="chpage" onchange="this.form.submit()">
245 <?php
246 while ($curr_page = PMA_DBI_fetch_assoc($page_rs)) {
247 echo "\n" . ' '
248 . '<option value="' . $curr_page['page_nr'] . '"';
249 if (isset($chpage) && $chpage == $curr_page['page_nr']) {
250 echo ' selected="selected"';
252 echo '>' . $curr_page['page_nr'] . ': ' . $curr_page['page_descr'] . '</option>';
253 } // end while
254 echo "\n";
256 </select>
257 <input type="radio" name="action_choose" value="0" id="radio_choose0" checked="checked" style="vertical-align: middle" /><label for="radio_choose0">
258 <?php echo $strEdit; ?> </label>
259 <input type="radio" name="action_choose" value="1" id="radio_choose1" style="vertical-align: middle" /><label for="radio_choose1">
260 <?php echo $strDelete; ?> </label>
262 <input type="submit" value="<?php echo $strGo; ?>" />
263 </form>
264 <?php
266 echo "\n";
268 // Possibility to create a new page:
270 <form method="post" action="pdf_pages.php" name="crpage">
271 <?php echo $strCreatePage . "\n"; ?>
272 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
273 <input type="hidden" name="do" value="createpage" />
274 <input type="text" name="newpage" size="20" maxlength="50" />
275 <input type="checkbox" name="autolayout" />
276 <?php echo '(' . $strAutomaticLayout . ')' . "\n"; ?>
277 <input type="submit" value="<?php echo $strGo; ?>" />
278 </form>
279 <?php
280 // Now if we already have chosen a page number then we should show the
281 // tables involved
282 if (isset($chpage) && $chpage > 0) {
283 echo "\n";
285 <hr />
287 <h2><?php echo $strSelectTables ;?></h2>
289 <?php
290 $page_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['table_coords'])
291 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
292 . ' AND pdf_page_number = ' . $chpage;
293 $page_rs = PMA_query_as_cu($page_query, FALSE, $query_default_option);
294 $array_sh_page = array();
295 $draginit = '';
296 $reset_draginit = '';
297 $i = 0;
298 while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
299 $array_sh_page[] = $temp_sh_page;
302 // garvin: Display WYSIWYG-PDF parts?
303 if ($cfg['WYSIWYG-PDF']) {
304 if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
305 $with_field_names = TRUE;
308 <script type="text/javascript" src="./libraries/dom-drag.js"></script>
309 <form method="post" action="pdf_pages.php" name="dragdrop">
310 <input type="button" name="dragdrop" value="<?php echo $strToggleScratchboard; ?>" onclick="ToggleDragDrop('pdflayout');" />
311 <input type="button" name="dragdropreset" value="<?php echo $strReset; ?>" onclick="resetDrag();" />
312 </form>
313 <div id="pdflayout" class="pdflayout" style="visibility: hidden;">
314 <?php
315 foreach ($array_sh_page AS $key => $temp_sh_page) {
316 $drag_x = $temp_sh_page['x'];
317 $drag_y = $temp_sh_page['y'];
319 $draginit .= ' Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
320 $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";
321 $draginit .= ' getElement("table_' . $i . '").style.left = "' . $drag_x . 'px";' . "\n";
322 $draginit .= ' getElement("table_' . $i . '").style.top = "' . $drag_y . 'px";' . "\n";
323 $reset_draginit .= ' getElement("table_' . $i . '").style.left = "2px";' . "\n";
324 $reset_draginit .= ' getElement("table_' . $i . '").style.top = "' . (15 * $i) . 'px";' . "\n";
325 $reset_draginit .= ' document.edcoord.elements["c_table_' . $i . '[x]"].value = "2"' . "\n";
326 $reset_draginit .= ' document.edcoord.elements["c_table_' . $i . '[y]"].value = "' . (15 * $i) . '"' . "\n";
328 $local_query = 'SHOW FIELDS FROM '
329 . PMA_backquote($temp_sh_page['table_name'] )
330 . ' FROM ' . PMA_backquote($db);
331 $fields_rs = PMA_DBI_query($local_query);
332 unset($local_query);
333 $fields_cnt = PMA_DBI_num_rows($fields_rs);
335 echo '<div id="table_' . $i . '" class="pdflayout_table"><u>' . $temp_sh_page['table_name'] . '</u>';
336 if (isset($with_field_names)) {
337 while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
338 echo '<br />' . htmlspecialchars($row['Field']) . "\n";
341 echo '</div>' . "\n";
342 PMA_DBI_free_result($fields_rs);
343 unset($fields_rs);
345 $i++;
348 </div>
349 <script type="text/javascript">
350 <!--
351 function init() {
352 refreshLayout();
353 myid = getElement('pdflayout');
354 <?php echo $draginit; ?>
357 function resetDrag() {
358 <?php echo $reset_draginit; ?>
360 // -->
361 </script>
362 <?php
363 } // end if WYSIWYG-PDF
366 <form method="post" action="pdf_pages.php" name="edcoord">
367 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
368 <input type="hidden" name="chpage" value="<?php echo $chpage; ?>" />
369 <input type="hidden" name="do" value="edcoord" />
370 <table border="0">
371 <tr>
372 <th><?php echo $strTable; ?></th>
373 <th><?php echo $strDelete; ?></th>
374 <th>X</th>
375 <th>Y</th>
376 </tr>
377 <?php
378 if (isset($ctable)) {
379 unset($ctable);
383 $i = 0;
384 foreach ($array_sh_page AS $dummy_sh_page => $sh_page) {
385 $_mtab = $sh_page['table_name'];
386 $tabExist[$_mtab] = FALSE;
387 echo "\n" . ' <tr ';
388 if ($i % 2 == 0) {
389 echo 'bgcolor="' . $cfg['BgcolorOne'] . '"';
390 } else {
391 echo 'bgcolor="' . $cfg['BgcolorTwo'] . '"';
393 echo '>';
394 echo "\n" . ' <td>'
395 . "\n" . ' <select name="c_table_' . $i . '[name]">';
396 foreach ($selectboxall AS $key => $value) {
397 echo "\n" . ' <option value="' . $value . '"';
398 if ($value == $sh_page['table_name']) {
399 echo ' selected="selected"';
400 $tabExist[$_mtab] = TRUE;
402 echo '>' . $value . '</option>';
403 } // end while
404 echo "\n" . ' </select>'
405 . "\n" . ' </td>';
406 echo "\n" . ' <td>'
407 . "\n" . ' <input type="checkbox" name="c_table_' . $i . '[delete]" value="y" />' . $strDelete;
408 echo "\n" . ' </td>';
409 echo "\n" . ' <td>'
410 . "\n" . ' <input type="text" ' . ($cfg['WYSIWYG-PDF'] ? 'onchange="dragPlace(' . $i . ', \'x\', this.value)"' : '') . ' name="c_table_' . $i . '[x]" value="' . $sh_page['x'] . '" />';
411 echo "\n" . ' </td>';
412 echo "\n" . ' <td>'
413 . "\n" . ' <input type="text" ' . ($cfg['WYSIWYG-PDF'] ? 'onchange="dragPlace(' . $i . ', \'y\', this.value)"' : '') . ' name="c_table_' . $i . '[y]" value="' . $sh_page['y'] . '" />';
414 echo "\n" . ' </td>';
415 echo "\n" . ' </tr>';
416 $i++;
417 } // end while
418 // Do one more empty row
419 echo "\n" . ' <tr ';
420 if ($i % 2 == 0) {
421 echo 'bgcolor="' . $cfg['BgcolorOne'] . '"';
422 } else {
423 echo 'bgcolor="' . $cfg['BgcolorTwo'] . '"';
425 echo '>';
426 echo "\n" . ' <td>'
427 . "\n" . ' <select name="c_table_' . $i . '[name]">';
428 foreach ($selectboxall AS $key => $value) {
429 echo "\n" . ' <option value="' . $value . '">' . $value . '</option>';
431 echo "\n" . ' </select>'
432 . "\n" . ' </td>';
433 echo "\n" . ' <td>'
434 . "\n" . ' <input type="checkbox" name="c_table_' . $i . '[delete]" value="y" />' . $strDelete;
435 echo "\n" . ' </td>';
436 echo "\n" . ' <td>'
437 . "\n" . ' <input type="text" name="c_table_' . $i . '[x]" value="' . (isset($sh_page['x'])?$sh_page['x']:'') . '" />';
438 echo "\n" . ' </td>';
439 echo "\n" . ' <td>'
440 . "\n" . ' <input type="text" name="c_table_' . $i . '[y]" value="' . (isset($sh_page['y'])?$sh_page['y']:'') . '" />';
441 echo "\n" . ' </td>';
442 echo "\n" . ' </tr>';
443 echo "\n" . ' </table>' . "\n";
445 echo "\n" . ' <input type="hidden" name="c_table_rows" value="' . ($i + 1) . '" />';
446 echo ($cfg['WYSIWYG-PDF'] ? "\n" . ' <input type="hidden" name="showwysiwyg" value="' . ((isset($showwysiwyg) && $showwysiwyg == '1') ? '1' : '0') . '" />' : '');
447 echo "\n" . ' <input type="checkbox" name="with_field_names" ' . (isset($with_field_names) ? 'checked="checked"' : ''). ' />' . $strColumnNames . '<br />';
448 echo "\n" . ' <input type="submit" value="' . $strSave . '" />';
449 echo "\n" . '</form>' . "\n\n";
450 } // end if
452 // Check if there are tables that need to be deleted,
453 // if there are, ask the user for allowance
454 $_strtrans = '';
455 $_strname = '';
456 $shoot = FALSE;
457 if (!empty($tabExist) && is_array($tabExist)) {
458 foreach ($tabExist AS $key => $value) {
459 if (!$value) {
460 $_strtrans .= '<input type="hidden" name="delrow[]" value="' . $key . '" />' . "\n";
461 $_strname .= '<li>' . $key . '</li>' . "\n";
462 $shoot = TRUE;
465 if ($shoot) {
466 echo '<form action="pdf_pages.php" method="post">' . "\n"
467 . PMA_generate_common_hidden_inputs($db, $table)
468 . '<input type="hidden" name="do" value="deleteCrap" />' . "\n"
469 . '<input type="hidden" name="chpage" value="' . $chpage . '" />' . "\n"
470 . $strDelOld
471 . '<ul>' . "\n"
472 . $_strname
473 . '</ul>' . "\n"
474 . $_strtrans
475 . '<input type="submit" value="' . $strGo . '" />' . "\n"
476 . '</form>';
479 // ------------------------------------
480 // d i s p l a y p d f s c h e m a
481 // ------------------------------------
483 if (isset($do)
484 && ($do == 'edcoord'
485 || ($do == 'choosepage' && isset($chpage))
486 || ($do == 'createpage' && isset($chpage)))) {
488 <form method="post" action="pdf_schema.php" name="pdfoptions">
489 <?php echo PMA_generate_common_hidden_inputs($db); ?>
490 <input type="hidden" name="pdf_page_number" value="<?php echo $chpage; ?>" />
492 <?php echo '<br /><b>' . $strDisplayPDF . '</b>'; ?>:&nbsp;<br />
493 <input type="checkbox" name="show_grid" id="show_grid_opt" /><label for="show_grid_opt"><?php echo $strShowGrid; ?></label><br />
494 <input type="checkbox" name="show_color" id="show_color_opt" checked="checked" /><label for="show_color_opt"><?php echo $strShowColor; ?></label><br />
495 <input type="checkbox" name="show_table_dimension" id="show_table_dim_opt" /><label for="show_table_dim_opt"><?php echo $strShowTableDimension; ?></label><br />
496 <input type="checkbox" name="all_tab_same_wide" id="all_tab_same_wide" /><label for="all_tab_same_wide"><?php echo $strAllTableSameWidth; ?></label><br />
497 <input type="checkbox" name="with_doc" id="with_doc" checked="checked" /><label for="with_doc"><?php echo $strDataDict; ?></label>
498 <br />
499 <label for="orientation_opt"><?php echo $strShowDatadictAs; ?></label>
500 <select id="orientation_opt" name="orientation" <?php echo ($cfg['WYSIWYG-PDF'] ? 'onchange="refreshDragOption(\'pdflayout\');"' : ''); ?>>
501 <option value="L"><?php echo $strLandscape;?></option>
502 <option value="P"><?php echo $strPortrait;?></option>
503 </select><br />
505 <label for="paper_opt"><?php echo $strPaperSize; ?></label>
506 <select id="paper_opt" name="paper" <?php echo ($cfg['WYSIWYG-PDF'] ? 'onchange="refreshDragOption(\'pdflayout\');"' : ''); ?>>
507 <?php
508 foreach ($cfg['PDFPageSizes'] AS $key => $val) {
509 echo '<option value="' . $val . '"';
510 if ($val == $cfg['PDFDefaultPageSize']) {
511 echo ' selected="selected"';
513 echo ' >' . $val . '</option>' . "\n";
516 </select><br />
517 &nbsp;&nbsp;<input type="submit" value="<?php echo $strGo; ?>" />
518 </form>
519 <?php
520 if ((isset($showwysiwyg) && $showwysiwyg == '1')) {
522 <script type="text/javascript">
523 <!--
524 ToggleDragDrop('pdflayout');
525 // -->
526 </script>
527 <?php
529 } // end if
530 } // end if ($cfgRelation['pdfwork'])
534 * Displays the footer
536 echo "\n";
537 require_once('./footer.inc.php');