Documentation TYPO3 par Ameos

pdf_pages.php

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


Généré par L'expert TYPO3 avec  doxygen 1.4.6