Documentation TYPO3 par Ameos

pdf_pages.php

00001 <?php
00002 /* $Id: pdf_pages.php,v 2.15 2005/07/28 16:50:37 lem9 Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00008 require_once('./libraries/grab_globals.lib.php');
00009 require_once('./libraries/common.lib.php');
00010 require_once('./db_details_common.php');
00011 
00012 
00016 require_once('./libraries/relation.lib.php');
00017 $cfgRelation = PMA_getRelationsParam();
00018 
00019 // This is to avoid "Command out of sync" errors. Before switching this to
00020 // a value of 0 (for MYSQLI_USE_RESULT), please check the logic
00021 // to free results wherever needed.
00022 $query_default_option = PMA_DBI_QUERY_STORE;
00023 
00032 if (!$cfgRelation['relwork']) {
00033     echo sprintf($strNotSet, 'relation', 'config.inc.php') . '<br />' . "\n"
00034          . '<a href="./Documentation.html#relation" target="documentation">' . $strDocu . '</a>' . "\n";
00035     require_once('./footer.inc.php');
00036 }
00037 
00038 if (!$cfgRelation['displaywork']) {
00039     echo sprintf($strNotSet, 'table_info', 'config.inc.php') . '<br />' . "\n"
00040          . '<a href="./Documentation.html#table_info" target="documentation">' . $strDocu . '</a>' . "\n";
00041     require_once('./footer.inc.php');
00042 }
00043 
00044 if (!isset($cfgRelation['table_coords'])){
00045     echo sprintf($strNotSet, 'table_coords', 'config.inc.php') . '<br />' . "\n"
00046          . '<a href="./Documentation.html#table_coords" target="documentation">' . $strDocu . '</a>' . "\n";
00047     exit();
00048 }
00049 if (!isset($cfgRelation['pdf_pages'])) {
00050     echo sprintf($strNotSet, 'pdf_page', 'config.inc.php') . '<br />' . "\n"
00051          . '<a href="./Documentation.html#pdf_pages" target="documentation">' . $strDocu . '</a>' . "\n";
00052     exit();
00053 }
00054 
00055 if ($cfgRelation['pdfwork']) {
00056     // Now is the time to work on all changes
00057     if (isset($do)) {
00058         switch ($do) {
00059             case 'choosepage':
00060                 if ($action_choose=="1") {
00061                     $ch_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_coords'])
00062                               .   ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
00063                               .   ' AND   pdf_page_number = ' . $chpage;
00064                     PMA_query_as_cu($ch_query, FALSE, $query_default_option);
00065 
00066                     $ch_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
00067                               .   ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
00068                               .   ' AND   page_nr = ' . $chpage;
00069                     PMA_query_as_cu($ch_query, FALSE, $query_default_option);
00070 
00071                     unset($chpage);
00072                 }
00073                 break;
00074             case 'createpage':
00075                 if (!isset($newpage) || $newpage == '') {
00076                     $newpage = $strNoDescription;
00077                 }
00078                 $ins_query   = 'INSERT INTO ' . PMA_backquote($cfgRelation['pdf_pages'])
00079                              . ' (db_name, page_descr)'
00080                              . ' VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($newpage) . '\')';
00081                 PMA_query_as_cu($ins_query, FALSE, $query_default_option);
00082 
00083                 // A u t o m a t i c    l a y o u t
00084                 //
00085                 // TODO: support InnoDB
00086 
00087                 if (isset($autolayout)) {
00088                     // save the page number
00089                     $pdf_page_number = PMA_DBI_insert_id((isset($dbh)?$dbh:''));
00090 
00091                     // get the tables that have relations, by descending
00092                     // number of links
00093                     $master_tables = 'SELECT COUNT(master_table), master_table'
00094                                 . ' FROM ' . PMA_backquote($cfgRelation['relation'])
00095                                 . ' WHERE master_db = \'' . $db . '\''
00096                                 . ' GROUP BY master_table'
00097                                 . ' ORDER BY ' . PMA_backquote('COUNT(master_table)') . ' DESC ';
00098                     $master_tables_rs = PMA_query_as_cu($master_tables, FALSE, $query_default_option);
00099                     if ($master_tables_rs && PMA_DBI_num_rows($master_tables_rs) > 0) {
00100                         // first put all the master tables at beginning
00101                         // of the list, so they are near the center of
00102                         // the schema
00103                         while (list(,$master_table) = PMA_DBI_fetch_row($master_tables_rs)) {
00104                             $all_tables[] = $master_table;
00105                         }
00106 
00107                         // then for each master, add its foreigns into an array
00108                         // of foreign tables, if not already there
00109                         // (a foreign might be foreign for more than
00110                         // one table, and might be a master itself)
00111 
00112                         $foreign_tables = array();
00113                         foreach ($all_tables AS $master_table) {
00114                             $foreigners = PMA_getForeigners($db, $master_table);
00115                             foreach ($foreigners AS $foreigner) {
00116                                 if (!in_array($foreigner['foreign_table'], $foreign_tables)) {
00117                                     $foreign_tables[] = $foreigner['foreign_table'];
00118                                 }
00119                             }
00120                         }
00121 
00122                         // then merge the arrays
00123                         foreach ($foreign_tables AS $foreign_table) {
00124                             if (!in_array($foreign_table, $all_tables)) {
00125                                 $all_tables[] = $foreign_table;
00126                             }
00127 
00128                         }
00129                         // now generate the coordinates for the schema,
00130                         // in a clockwise spiral
00131 
00132                         $pos_x = 300;
00133                         $pos_y = 300;
00134                         $delta = 50;
00135                         $delta_mult = 1.34;
00136                         $direction = "right";
00137                         foreach ($all_tables AS $current_table) {
00138 
00139                             // save current table's coordinates
00140                             $insert_query = 'INSERT INTO ' . PMA_backquote($cfgRelation['table_coords']) . ' '
00141                                           . '(db_name, table_name, pdf_page_number, x, y) '
00142                                           . 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($current_table) . '\',' . $pdf_page_number . ',' . $pos_x . ',' . $pos_y . ')';
00143                             PMA_query_as_cu($insert_query, FALSE, $query_default_option);
00144 
00145                             // compute for the next table
00146                             switch ($direction) {
00147                                 case 'right':
00148                                     $pos_x += $delta;
00149                                     $direction = "down";
00150                                     $delta *= $delta_mult;
00151                                     break;
00152                                 case 'down':
00153                                     $pos_y += $delta;
00154                                     $direction = "left";
00155                                     $delta *= $delta_mult;
00156                                     break;
00157                                 case 'left':
00158                                     $pos_x -= $delta;
00159                                     $direction = "up";
00160                                     $delta *= $delta_mult;
00161                                     break;
00162                                 case 'up':
00163                                     $pos_y -= $delta;
00164                                     $direction = "right";
00165                                     $delta *= $delta_mult;
00166                                     break;
00167                             } // end switch
00168                         } // end while
00169                     } // end if there are master tables
00170 
00171                     $chpage = $pdf_page_number;
00172                 } // end if isset autolayout
00173 
00174                 break;
00175 
00176             case 'edcoord':
00177                 for ($i = 0; $i < $c_table_rows; $i++) {
00178                     $arrvalue = 'c_table_' . $i;
00179                     $arrvalue = $$arrvalue;
00180                     if (!isset($arrvalue['x']) || $arrvalue['x'] == '') {
00181                         $arrvalue['x'] = 0;
00182                     }
00183                     if (!isset($arrvalue['y']) || $arrvalue['y'] == '') {
00184                         $arrvalue['y'] = 0;
00185                     }
00186                     if (isset($arrvalue['name']) && $arrvalue['name'] != '--') {
00187                         $test_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['table_coords'])
00188                                     .   ' WHERE db_name = \'' .  PMA_sqlAddslashes($db) . '\''
00189                                     .   ' AND   table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
00190                                     .   ' AND   pdf_page_number = ' . $chpage;
00191                         $test_rs    = PMA_query_as_cu($test_query, FALSE, $query_default_option);
00192                         if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
00193                             if (isset($arrvalue['delete']) && $arrvalue['delete'] == 'y') {
00194                                 $ch_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_coords'])
00195                                           .   ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
00196                                           .   ' AND   table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
00197                                           .   ' AND   pdf_page_number = ' . $chpage;
00198                             } else {
00199                                 $ch_query = 'UPDATE ' . PMA_backquote($cfgRelation['table_coords']) . ' '
00200                                           . 'SET x = ' . $arrvalue['x'] . ', y= ' . $arrvalue['y']
00201                                           .   ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
00202                                           .   ' AND   table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
00203                                           .   ' AND   pdf_page_number = ' . $chpage;
00204                             }
00205                         } else {
00206                             $ch_query     = 'INSERT INTO ' . PMA_backquote($cfgRelation['table_coords']) . ' '
00207                                           . '(db_name, table_name, pdf_page_number, x, y) '
00208                                           . 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($arrvalue['name']) . '\',' . $chpage . ',' . $arrvalue['x'] . ',' . $arrvalue['y'] . ')';
00209                         }
00210                         PMA_query_as_cu($ch_query, FALSE, $query_default_option);
00211                     } // end if
00212                 } // end for
00213                 break;
00214             case 'deleteCrap':
00215                 foreach ($delrow AS $current_row) {
00216                     $d_query = 'DELETE FROM ' . PMA_backquote($cfgRelation['table_coords']) . ' ' . "\n"
00217                              .   ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'' . "\n"
00218                              .   ' AND   table_name = \'' . PMA_sqlAddslashes($current_row) . '\'' . "\n"
00219                              .   ' AND   pdf_page_number = ' . $chpage;
00220                     PMA_query_as_cu($d_query, FALSE, $query_default_option);
00221                 }
00222                 break;
00223         } // end switch
00224     } // end if (isset($do))
00225 
00226     // We will need an array of all tables in this db
00227     $selectboxall = array('--');
00228     $alltab_rs    = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', NULL, PMA_DBI_QUERY_STORE);
00229     while ($val = @PMA_DBI_fetch_row($alltab_rs)) {
00230         $selectboxall[] = $val[0];
00231     }
00232 
00233     // Now first show some possibility to choose a page for the pdf
00234     $page_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
00235                 . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
00236     $page_rs    = PMA_query_as_cu($page_query, FALSE, $query_default_option);
00237 
00238     if ($page_rs && PMA_DBI_num_rows($page_rs) > 0) {
00239         ?>
00240 <form method="get" action="pdf_pages.php" name="selpage">
00241     <?php echo $strChoosePage . "\n"; ?>
00242     <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
00243     <input type="hidden" name="do" value="choosepage" />
00244     <select name="chpage" onchange="this.form.submit()">
00245         <?php
00246         while ($curr_page = PMA_DBI_fetch_assoc($page_rs)) {
00247             echo "\n" . '        '
00248                  . '<option value="' . $curr_page['page_nr'] . '"';
00249             if (isset($chpage) && $chpage == $curr_page['page_nr']) {
00250                 echo ' selected="selected"';
00251             }
00252             echo '>' . $curr_page['page_nr'] . ': ' . $curr_page['page_descr'] . '</option>';
00253         } // end while
00254         echo "\n";
00255         ?>
00256     </select>
00257     <input type="radio" name="action_choose" value="0" id="radio_choose0" checked="checked" style="vertical-align: middle" /><label for="radio_choose0">
00258 <?php echo $strEdit; ?> </label>
00259     <input type="radio" name="action_choose" value="1" id="radio_choose1"  style="vertical-align: middle" /><label for="radio_choose1">
00260 <?php echo $strDelete; ?> </label>
00261 
00262     <input type="submit" value="<?php echo $strGo; ?>" />
00263 </form>
00264         <?php
00265     }
00266     echo "\n";
00267 
00268     // Possibility to create a new page:
00269     ?>
00270 <form method="post" action="pdf_pages.php" name="crpage">
00271     <?php echo $strCreatePage . "\n"; ?>
00272     <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
00273     <input type="hidden" name="do" value="createpage" />
00274     <input type="text" name="newpage" size="20" maxlength="50" />
00275     <input type="checkbox" name="autolayout" />
00276     <?php echo '(' . $strAutomaticLayout . ')' . "\n"; ?>
00277     <input type="submit" value="<?php echo $strGo; ?>" />
00278 </form>
00279     <?php
00280     // Now if we already have chosen a page number then we should show the
00281     // tables involved
00282     if (isset($chpage) && $chpage > 0) {
00283         echo "\n";
00284         ?>
00285 <hr />
00286 
00287 <h2><?php echo $strSelectTables ;?></h2>
00288 
00289 <?php
00290 $page_query = 'SELECT * FROM ' . PMA_backquote($cfgRelation['table_coords'])
00291             . ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
00292             . ' AND pdf_page_number = ' . $chpage;
00293 $page_rs    = PMA_query_as_cu($page_query, FALSE, $query_default_option);
00294 $array_sh_page = array();
00295 $draginit = '';
00296 $reset_draginit = '';
00297 $i = 0;
00298 while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
00299     $array_sh_page[] = $temp_sh_page;
00300 }
00301 
00302 // garvin: Display WYSIWYG-PDF parts?
00303 if ($cfg['WYSIWYG-PDF']) {
00304     if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
00305         $with_field_names = TRUE;
00306     }
00307 ?>
00308 <script type="text/javascript" src="./libraries/dom-drag.js"></script>
00309 <form method="post" action="pdf_pages.php" name="dragdrop">
00310 <input type="button" name="dragdrop" value="<?php echo $strToggleScratchboard; ?>" onclick="ToggleDragDrop('pdflayout');" />
00311  <input type="button" name="dragdropreset" value="<?php echo $strReset; ?>" onclick="resetDrag();" />
00312 </form>
00313 <div id="pdflayout" class="pdflayout" style="visibility: hidden;">
00314 <?php
00315 foreach ($array_sh_page AS $key => $temp_sh_page) {
00316     $drag_x = $temp_sh_page['x'];
00317     $drag_y = $temp_sh_page['y'];
00318 
00319     $draginit       .= '    Drag.init(getElement("table_' . $i . '"), null, 0, parseInt(myid.style.width)-2, 0, parseInt(myid.style.height)-5);' . "\n";
00320     $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";
00321     $draginit       .= '    getElement("table_' . $i . '").style.left = "' . $drag_x . 'px";' . "\n";
00322     $draginit       .= '    getElement("table_' . $i . '").style.top  = "' . $drag_y . 'px";' . "\n";
00323     $reset_draginit .= '    getElement("table_' . $i . '").style.left = "2px";' . "\n";
00324     $reset_draginit .= '    getElement("table_' . $i . '").style.top  = "' . (15 * $i) . 'px";' . "\n";
00325     $reset_draginit .= '    document.edcoord.elements["c_table_' . $i . '[x]"].value = "2"' . "\n";
00326     $reset_draginit .= '    document.edcoord.elements["c_table_' . $i . '[y]"].value = "' . (15 * $i) . '"' . "\n";
00327 
00328     $local_query = 'SHOW FIELDS FROM '
00329                  .  PMA_backquote($temp_sh_page['table_name'] )
00330                 . ' FROM ' . PMA_backquote($db);
00331     $fields_rs = PMA_DBI_query($local_query);
00332     unset($local_query);
00333     $fields_cnt = PMA_DBI_num_rows($fields_rs);
00334 
00335     echo '<div id="table_' . $i . '" class="pdflayout_table"><u>' . $temp_sh_page['table_name'] . '</u>';
00336     if (isset($with_field_names)) {
00337         while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
00338             echo '<br />' . htmlspecialchars($row['Field']) . "\n";
00339         }
00340     }
00341     echo '</div>' . "\n";
00342     PMA_DBI_free_result($fields_rs);
00343     unset($fields_rs);
00344 
00345     $i++;
00346 }
00347 ?>
00348 </div>
00349 <script type="text/javascript">
00350 <!--
00351 function init() {
00352     refreshLayout();
00353     myid = getElement('pdflayout');
00354     <?php echo $draginit; ?>
00355 }
00356 
00357 function resetDrag() {
00358     <?php echo $reset_draginit; ?>
00359 }
00360 // -->
00361 </script>
00362 <?php
00363 } // end if WYSIWYG-PDF
00364 ?>
00365 
00366 <form method="post" action="pdf_pages.php" name="edcoord">
00367     <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
00368     <input type="hidden" name="chpage" value="<?php echo $chpage; ?>" />
00369     <input type="hidden" name="do" value="edcoord" />
00370     <table border="0">
00371     <tr>
00372         <th><?php echo $strTable; ?></th>
00373         <th><?php echo $strDelete; ?></th>
00374         <th>X</th>
00375         <th>Y</th>
00376     </tr>
00377         <?php
00378         if (isset($ctable)) {
00379             unset($ctable);
00380         }
00381 
00382 
00383         $i = 0;
00384         foreach ($array_sh_page AS $dummy_sh_page => $sh_page) {
00385             $_mtab       = $sh_page['table_name'];
00386             $tabExist[$_mtab] = FALSE;
00387             echo "\n" . '    <tr ';
00388             if ($i % 2 == 0) {
00389                 echo 'bgcolor="' . $cfg['BgcolorOne'] . '"';
00390             } else {
00391                 echo 'bgcolor="' . $cfg['BgcolorTwo'] . '"';
00392             }
00393             echo '>';
00394             echo "\n" . '        <td>'
00395                  . "\n" . '            <select name="c_table_' . $i . '[name]">';
00396             foreach ($selectboxall AS $key => $value) {
00397                 echo "\n" . '                <option value="' . $value . '"';
00398                 if ($value == $sh_page['table_name']) {
00399                     echo ' selected="selected"';
00400                     $tabExist[$_mtab] = TRUE;
00401                 }
00402                 echo '>' . $value . '</option>';
00403             } // end while
00404             echo "\n" . '            </select>'
00405                  . "\n" . '        </td>';
00406             echo "\n" . '        <td>'
00407                  . "\n" . '            <input type="checkbox" name="c_table_' . $i . '[delete]" value="y" />' . $strDelete;
00408             echo "\n" . '        </td>';
00409             echo "\n" . '        <td>'
00410                  . "\n" . '            <input type="text" ' . ($cfg['WYSIWYG-PDF'] ? 'onchange="dragPlace(' . $i . ', \'x\', this.value)"' : '') . ' name="c_table_' . $i . '[x]" value="' . $sh_page['x'] . '" />';
00411             echo "\n" . '        </td>';
00412             echo "\n" . '        <td>'
00413                  . "\n" . '            <input type="text" ' . ($cfg['WYSIWYG-PDF'] ? 'onchange="dragPlace(' . $i . ', \'y\', this.value)"' : '') . ' name="c_table_' . $i . '[y]" value="' . $sh_page['y'] . '" />';
00414             echo "\n" . '        </td>';
00415             echo "\n" . '    </tr>';
00416             $i++;
00417         } // end while
00418         // Do one more empty row
00419         echo "\n" . '    <tr ';
00420         if ($i % 2 == 0) {
00421             echo 'bgcolor="' . $cfg['BgcolorOne'] . '"';
00422         } else {
00423             echo 'bgcolor="' . $cfg['BgcolorTwo'] . '"';
00424         }
00425         echo '>';
00426         echo "\n" . '        <td>'
00427              . "\n" . '            <select name="c_table_' . $i . '[name]">';
00428         foreach ($selectboxall AS $key => $value) {
00429             echo "\n" . '                <option value="' . $value . '">' . $value . '</option>';
00430         }
00431         echo "\n" . '            </select>'
00432              . "\n" . '        </td>';
00433         echo "\n" . '        <td>'
00434              . "\n" . '            <input type="checkbox" name="c_table_' . $i . '[delete]" value="y" />' . $strDelete;
00435         echo "\n" . '        </td>';
00436         echo "\n" . '        <td>'
00437              . "\n" . '            <input type="text" name="c_table_' . $i . '[x]" value="' . (isset($sh_page['x'])?$sh_page['x']:'') . '" />';
00438         echo "\n" . '        </td>';
00439         echo "\n" . '        <td>'
00440              . "\n" . '            <input type="text" name="c_table_' . $i . '[y]" value="' . (isset($sh_page['y'])?$sh_page['y']:'') . '" />';
00441         echo "\n" . '        </td>';
00442         echo "\n" . '    </tr>';
00443         echo "\n" . '    </table>' . "\n";
00444 
00445         echo "\n" . '    <input type="hidden" name="c_table_rows" value="' . ($i + 1) . '" />';
00446         echo ($cfg['WYSIWYG-PDF'] ? "\n" . '    <input type="hidden" name="showwysiwyg" value="' . ((isset($showwysiwyg) && $showwysiwyg == '1') ? '1' : '0') . '" />' : '');
00447         echo "\n" . '    <input type="checkbox" name="with_field_names" ' . (isset($with_field_names) ? 'checked="checked"' : ''). ' />' . $strColumnNames . '<br />';
00448         echo "\n" . '    <input type="submit" value="' . $strSave . '" />';
00449         echo "\n" . '</form>' . "\n\n";
00450     } // end if
00451 
00452     //  Check if there are tables that need to be deleted,
00453     //  if there are, ask the user for allowance
00454     $_strtrans  = '';
00455     $_strname   = '';
00456     $shoot      = FALSE;
00457     if (!empty($tabExist) && is_array($tabExist)) {
00458         foreach ($tabExist AS $key => $value) {
00459             if (!$value) {
00460                 $_strtrans  .= '<input type="hidden" name="delrow[]" value="' . $key . '" />' . "\n";
00461                 $_strname   .= '<li>' . $key . '</li>' . "\n";
00462                 $shoot       = TRUE;
00463             }
00464         }
00465         if ($shoot) {
00466             echo '<form action="pdf_pages.php" method="post">' . "\n"
00467                . PMA_generate_common_hidden_inputs($db, $table)
00468                . '<input type="hidden" name="do" value="deleteCrap" />' . "\n"
00469                . '<input type="hidden" name="chpage" value="' . $chpage . '" />' . "\n"
00470                . $strDelOld
00471                . '<ul>' . "\n"
00472                . $_strname
00473                . '</ul>' . "\n"
00474                . $_strtrans
00475                . '<input type="submit" value="' . $strGo . '" />' . "\n"
00476                . '</form>';
00477         }
00478     }
00479     //    ------------------------------------
00480     //    d i s p l a y   p d f    s c h e m a
00481     //    ------------------------------------
00482 
00483     if (isset($do)
00484     && ($do == 'edcoord'
00485        || ($do == 'choosepage' && isset($chpage))
00486        || ($do == 'createpage' && isset($chpage)))) {
00487         ?>
00488 <form method="post" action="pdf_schema.php" name="pdfoptions">
00489     <?php echo PMA_generate_common_hidden_inputs($db); ?>
00490     <input type="hidden" name="pdf_page_number" value="<?php echo $chpage; ?>" />
00491 
00492     <?php echo '<br /><b>' . $strDisplayPDF . '</b>'; ?>:&nbsp;<br />
00493     <input type="checkbox" name="show_grid" id="show_grid_opt" /><label for="show_grid_opt"><?php echo $strShowGrid; ?></label><br />
00494     <input type="checkbox" name="show_color" id="show_color_opt" checked="checked" /><label for="show_color_opt"><?php echo $strShowColor; ?></label><br />
00495     <input type="checkbox" name="show_table_dimension" id="show_table_dim_opt" /><label for="show_table_dim_opt"><?php echo $strShowTableDimension; ?></label><br />
00496     <input type="checkbox" name="all_tab_same_wide" id="all_tab_same_wide" /><label for="all_tab_same_wide"><?php echo $strAllTableSameWidth; ?></label><br />
00497     <input type="checkbox" name="with_doc" id="with_doc" checked="checked" /><label for="with_doc"><?php echo $strDataDict; ?></label>
00498     <br />
00499     <label for="orientation_opt"><?php echo $strShowDatadictAs; ?></label>
00500     <select id="orientation_opt" name="orientation" <?php echo ($cfg['WYSIWYG-PDF'] ? 'onchange="refreshDragOption(\'pdflayout\');"' : ''); ?>>
00501         <option value="L"><?php echo $strLandscape;?></option>
00502         <option value="P"><?php echo $strPortrait;?></option>
00503     </select><br />
00504 
00505     <label for="paper_opt"><?php echo $strPaperSize; ?></label>
00506     <select id="paper_opt" name="paper" <?php echo ($cfg['WYSIWYG-PDF'] ? 'onchange="refreshDragOption(\'pdflayout\');"' : ''); ?>>
00507 <?php
00508         foreach ($cfg['PDFPageSizes'] AS $key => $val) {
00509             echo '<option value="' . $val . '"';
00510             if ($val == $cfg['PDFDefaultPageSize']) {
00511                 echo ' selected="selected"';
00512             }
00513             echo ' >' . $val . '</option>' . "\n";
00514         }
00515 ?>
00516     </select><br />
00517     &nbsp;&nbsp;<input type="submit" value="<?php echo $strGo; ?>" />
00518 </form>
00519 <?php
00520         if ((isset($showwysiwyg) && $showwysiwyg == '1')) {
00521 ?>
00522 <script type="text/javascript">
00523 <!--
00524 ToggleDragDrop('pdflayout');
00525 // -->
00526 </script>
00527 <?php
00528         }
00529     } // end if
00530 } // end if ($cfgRelation['pdfwork'])
00531 
00532 
00536 echo "\n";
00537 require_once('./footer.inc.php');
00538 ?>


Généré par Le spécialiste TYPO3 avec  doxygen 1.4.6