Documentation TYPO3 par Ameos

display_export.lib.php

00001 <?php
00002 /* $Id: display_export.lib.php,v 2.32 2005/08/22 21:41:20 nijel Exp $ */
00003 // vim: expandtab sw=4 ts=4 sts=4:
00004 
00005 // Get relations & co. status
00006 require_once('./libraries/relation.lib.php');
00007 $cfgRelation = PMA_getRelationsParam();
00008 
00009 // Check if we have native MS Excel export using PEAR class Spreadsheet_Excel_Writer
00010 if (!empty($GLOBALS['cfg']['TempDir'])) {
00011     @include_once('Spreadsheet/Excel/Writer.php');
00012     if (class_exists('Spreadsheet_Excel_Writer')) {
00013         $xls = TRUE;
00014     } else {
00015         $xls = FALSE;
00016     }
00017 } else {
00018     $xls = FALSE;
00019 }
00020 
00021 function PMA_exportCheckboxCheck($str) {
00022     if (isset($GLOBALS['cfg']['Export'][$str]) && $GLOBALS['cfg']['Export'][$str]) {
00023         echo ' checked="checked"';
00024     }
00025 }
00026 
00027 function PMA_exportIsActive($what, $val) {
00028     if (isset($GLOBALS['cfg']['Export'][$what]) &&  $GLOBALS['cfg']['Export'][$what] == $val) {
00029         echo ' checked="checked"';
00030     }
00031 }
00032 
00033 ?>
00034 <form method="post" action="export.php" name="dump">
00035 <?php
00036 $hide_structure = false;
00037 $hide_sql       = false;
00038 $hide_xml       = empty($db);
00039 if ($export_type == 'server') {
00040     echo PMA_generate_common_hidden_inputs('', '', 1);
00041 } elseif ($export_type == 'database') {
00042     echo PMA_generate_common_hidden_inputs($db, '', 1);
00043 } else {
00044     echo PMA_generate_common_hidden_inputs($db, $table, 1);
00045     if (!isset($single_table)) {
00046         $hide_structure = true;
00047         $hide_sql       = true;
00048     } else {
00049         // just to keep this value for possible next display of this form after saving on server
00050         echo '    <input type="hidden" name="single_table" value="TRUE" />';
00051     }
00052 }
00053 echo '    <input type="hidden" name="export_type" value="' . $export_type . '" />';
00054 
00055 if (isset($sql_query)) {
00056     echo '    <input type="hidden" name="sql_query" value="' . htmlspecialchars($sql_query) . '" />';
00057 }
00058 ?>
00059 
00060     <script type="text/javascript">
00061     <!--
00062     function hide_them_all() {
00063         getElement("csv_options").style.display = 'none';
00064         getElement("excel_options").style.display = 'none';
00065         getElement("latex_options").style.display = 'none';
00066         getElement("htmlexcel_options").style.display = 'none';
00067         getElement("htmlword_options").style.display = 'none';
00068 <?php if ($xls) { ?>
00069         getElement("xls_options").style.display = 'none';
00070 <?php } ?>
00071 <?php if (!$hide_sql) { ?>
00072         getElement("sql_options").style.display = 'none';
00073 <?php } ?>
00074         getElement("none_options").style.display = 'none';
00075     }
00076 
00077     function show_checked_option() {
00078         hide_them_all();
00079         if (getElement('radio_dump_latex').checked) {
00080             getElement('latex_options').style.display = 'block';
00081         } else if (getElement('radio_dump_htmlexcel').checked) {
00082             getElement('htmlexcel_options').style.display = 'block';
00083         } else if (getElement('radio_dump_htmlword').checked) {
00084             getElement('htmlword_options').style.display = 'block';
00085 <?php if ($xls) { ?>
00086         } else if (getElement('radio_dump_xls').checked) {
00087             getElement('xls_options').style.display = 'block';
00088 <?php } ?>
00089 <?php if (!$hide_sql) { ?>
00090         } else if (getElement('radio_dump_sql').checked) {
00091             getElement('sql_options').style.display = 'block';
00092 <?php } ?>
00093 <?php if (!$hide_xml) { ?>
00094         } else if (getElement('radio_dump_xml').checked) {
00095             getElement('none_options').style.display = 'block';
00096 <?php } ?>
00097         } else if (getElement('radio_dump_csv').checked) {
00098             getElement('csv_options').style.display = 'block';
00099         } else if (getElement('radio_dump_excel').checked) {
00100             getElement('excel_options').style.display = 'block';
00101         } else {
00102             if (getElement('radio_dump_sql')) {
00103                 getElement('radio_dump_sql').checked = true;
00104                 getElement('sql_options').style.display = 'block';
00105             } else if (getElement('radio_dump_csv')) {
00106                 getElement('radio_dump_csv').checked = true;
00107                 getElement('csv_options').style.display = 'block';
00108             } else {
00109                 getElement('none_options').style.display = 'block';
00110             }
00111         }
00112     }
00113     //-->
00114     </script>
00115 
00116     <table cellpadding="3" border="0" cellspacing="0">
00117     <tr>
00118         <th colspan="3" valign="top" nowrap="nowrap" class="tblHeaders"><?php echo $export_page_title; ?></th>
00119     </tr>
00120     <tr>
00121         <!-- Formats to export to -->
00122         <td nowrap="nowrap" valign="top" onclick="if (typeof(window.opera) != 'undefined')setTimeout('show_checked_option()', 1); return true">
00123             <table border="0" cellpadding="3" cellspacing="1">
00124                 <tr><th align="left"><?php echo $strExport; ?></th></tr>
00125             <?php
00126             if (isset($multi_values) && $multi_values != '') {
00127                 echo '                <tr><td bgcolor="' . $cfg['BgcolorOne'] . '">';
00128                 echo $multi_values;
00129                 echo '                </td></tr>';
00130             }
00131             ?>
00132 
00133 <?php if (!$hide_sql) { ?>
00134             <!-- SQL -->
00135                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00136                     <input type="radio" name="what" value="sql" id="radio_dump_sql" onclick="if (this.checked) { hide_them_all(); getElement('sql_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'sql'); ?> style="vertical-align: middle" /><label for="radio_dump_sql"><?php echo $strSQL; ?>&nbsp;</label>
00137                 </td></tr>
00138 <?php } ?>
00139 
00140             <!-- LaTeX table -->
00141                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00142                     <input type="radio" name="what" value="latex" id="radio_dump_latex"  onclick="if (this.checked) { hide_them_all(); getElement('latex_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'latex'); ?> style="vertical-align: middle" /><label for="radio_dump_latex"><?php echo $strLaTeX; ?>&nbsp;</label>
00143                 </td></tr>
00144 
00145 
00146             <!-- HTML Excel -->
00147                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00148                     <input type="radio" name="what" value="htmlexcel" id="radio_dump_htmlexcel"  onclick="if (this.checked) { hide_them_all(); getElement('htmlexcel_options').style.display = 'block'; getElement('checkbox_dump_asfile').checked = true;};  return true" <?php PMA_exportIsActive('format', 'htmlexcel'); ?> /><label for="radio_dump_htmlexcel"><?php echo $strHTMLExcel; ?></label>
00149                </td></tr>
00150 
00151             <!-- HTML Word -->
00152                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00153                     <input type="radio" name="what" value="htmlword" id="radio_dump_htmlword"  onclick="if (this.checked) { hide_them_all(); getElement('htmlword_options').style.display = 'block'; getElement('checkbox_dump_asfile').checked = true;};  return true" <?php PMA_exportIsActive('format', 'htmlword'); ?> /><label for="radio_dump_htmlword"><?php echo $strHTMLWord; ?></label>
00154                </td></tr>
00155 
00156 <?php if ($xls) { ?>
00157             <!-- Native Excel -->
00158                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00159                     <input type="radio" name="what" value="xls" id="radio_dump_xls"  onclick="if (this.checked) { hide_them_all(); getElement('xls_options').style.display = 'block'; getElement('checkbox_dump_asfile').checked = true;};  return true" <?php PMA_exportIsActive('format', 'xls'); ?> /><label for="radio_dump_xls"><?php echo $strStrucNativeExcel; ?></label>
00160                </td></tr>
00161 <?php } ?>
00162 
00163             <!-- Excel CSV -->
00164                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00165                     <input type="radio" name="what" value="excel" id="radio_dump_excel"  onclick="if (this.checked) { hide_them_all(); getElement('excel_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'excel'); ?> style="vertical-align: middle" /><label for="radio_dump_excel"><?php echo $strStrucExcelCSV; ?>&nbsp;</label>
00166                 </td></tr>
00167 
00168             <!-- General CSV -->
00169                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00170                     <input type="radio" name="what" value="csv" id="radio_dump_csv"  onclick="if (this.checked) { hide_them_all(); getElement('csv_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'csv'); ?> style="vertical-align: middle" /><label for="radio_dump_csv"><?php echo $strStrucCSV;?>&nbsp;</label>
00171                 </td></tr>
00172 
00173 <?php if (!$hide_xml) { ?>
00174             <!-- XML -->
00175                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00176                     <input type="radio" name="what" value="xml" id="radio_dump_xml" onclick="if (this.checked) { hide_them_all(); getElement('none_options').style.display = 'block'; }; return true" <?php PMA_exportIsActive('format', 'xml'); ?> style="vertical-align: middle" /><label for="radio_dump_xml"><?php echo $strXML; ?>&nbsp;</label>
00177                 </td></tr>
00178 <?php } ?>
00179             </table>
00180         </td>
00181         <!-- ltr item -->
00182         <td valign="top"><img src="<?php echo $pmaThemeImage . 'item_ltr.png'; ?>" border="0" hspace="2" vspace="5" /></td>
00183         <!-- Options -->
00184         <td valign="top" id="options_td" width="400">
00185 
00186 <?php if (!$hide_sql) { ?>
00187             <!-- SQL options -->
00188             <div id="sql_options">
00189             <table width="400" border="0" cellpadding="3" cellspacing="1">
00190                 <tr>
00191                     <th align="left">
00192                     <?php
00193                     echo $strSQLOptions;
00194                     $goto_documentation = '<a href="./Documentation.html#faqexport" target="documentation">';
00195                     echo ($cfg['ReplaceHelpImg'] ? '' : '(')
00196                        . $goto_documentation
00197                        . ($cfg['ReplaceHelpImg'] ? '<img src="' . $pmaThemeImage . 'b_help.png" border="0" alt="' .$strDocu . '" width="11" height="11" hspace="2" align="middle" />' : $strDocu)
00198                        . '</a>' . ($cfg['ReplaceHelpImg'] ? '' : ')');
00199                     ?>
00200                     </th>
00201                 </tr>
00202                 <tr>
00203                     <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00204                         <?php echo $strAddHeaderComment; ?>: <input type="text" name="header_comment" value="<?php echo $cfg['Export']['sql_header_comment']; ?>" class="textfield" size="30" style="vertical-align: middle" /><br />
00205                         <input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" <?php PMA_exportCheckboxCheck('sql_use_transaction'); ?> style="vertical-align: middle" /><label for="checkbox_use_transaction"><?php echo $strEncloseInTransaction; ?></label><br />
00206 
00207                         <input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" <?php PMA_exportCheckboxCheck('sql_disable_fk'); ?> style="vertical-align: middle" /><label for="checkbox_disable_fk"><?php echo $strDisableForeignChecks; ?></label><br />
00208                     </td>
00209                 </tr>
00210 <?php
00211 if ($export_type == 'server') {
00212 ?>
00213                 <!-- For databases -->
00214                 <tr>
00215                     <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00216                         <b><?php echo $strDatabaseExportOptions; ?>:</b><br />
00217                         <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" <?php PMA_exportCheckboxCheck('sql_drop_database'); ?> style="vertical-align: middle" /><label for="checkbox_drop_database"><?php echo $strAddDropDatabase; ?></label>
00218                     </td>
00219                 </tr>
00220 
00221 <?php
00222 }
00223 if (!$hide_structure) { ?>
00224                 <!-- For structure -->
00225                 <tr>
00226                     <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00227                         <input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" <?php PMA_exportCheckboxCheck('sql_structure'); ?> onclick="if (!this.checked &amp;&amp; !getElement('checkbox_sql_data').checked) return false; else return true;" /><label for="checkbox_sql_structure"><b><?php echo $strStructure; ?>:</b></label><br />
00228 
00229                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" <?php PMA_exportCheckboxCheck('sql_drop_table'); ?> style="vertical-align: middle" /><label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label><br />
00230 
00231                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="if_not_exists" value="1" id="checkbox_dump_if_not_exists" <?php PMA_exportCheckboxCheck('sql_if_not_exists'); ?> style="vertical-align: middle" /><label for="checkbox_dump_if_not_exists"><?php echo $strAddIfNotExists; ?></label><br />
00232 
00233                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="auto_increment" value="1" id="checkbox_auto_increment" <?php PMA_exportCheckboxCheck('sql_auto_increment'); ?> style="vertical-align: middle" /><label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />
00234 
00235                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" <?php PMA_exportCheckboxCheck('sql_backquotes'); ?> style="vertical-align: middle" /><label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label><br />
00236 
00237                         &nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo $strAddIntoComments; ?></b><br />
00238 
00239                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="sql_dates" value="yes" id="checkbox_sql_dates" <?php PMA_exportCheckboxCheck('sql_dates'); ?> style="vertical-align: middle" /><label for="checkbox_sql_dates"><?php echo $strCreationDates; ?></label><br />
00240 <?php
00241     if (!empty($cfgRelation['relation'])) {
00242 ?>
00243                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="sql_relation" value="yes" id="checkbox_sql_use_relation" <?php PMA_exportCheckboxCheck('sql_relation'); ?> style="vertical-align: middle" /><label for="checkbox_sql_use_relation"><?php echo $strRelations; ?></label><br />
00244 <?php
00245     } // end relation
00246     if (!empty($cfgRelation['commwork']) && PMA_MYSQL_INT_VERSION < 40100) {
00247 ?>
00248                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="sql_comments" value="yes" id="checkbox_sql_use_comments" <?php PMA_exportCheckboxCheck('sql_comments'); ?> style="vertical-align: middle" /><label for="checkbox_sql_use_comments"><?php echo $strComments; ?></label><br />
00249 <?php
00250     } // end comments
00251     if ($cfgRelation['mimework']) {
00252 ?>
00253                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="sql_mime" value="yes" id="checkbox_sql_use_mime" <?php PMA_exportCheckboxCheck('sql_mime'); ?> style="vertical-align: middle" /><label for="checkbox_sql_use_mime"><?php echo $strMIME_MIMEtype; ?></label><br />
00254 <?php
00255     } // end MIME
00256     if (PMA_MYSQL_INT_VERSION >= 40100) {
00257 ?>
00258                         <label for="select_sql_compat"><?php echo $strSQLExportCompatibility; ?>:&nbsp;</label><select name="sql_compat" id="select_sql_compat" style="vertical-align: middle">
00259                         <?php
00260                         $compats = array('NONE');
00261                         if (PMA_MYSQL_INT_VERSION >= 40101) {
00262                             $compats[] = 'ANSI';
00263                             $compats[] = 'DB2';
00264                             $compats[] = 'MAXDB';
00265                             $compats[] = 'MYSQL323';
00266                             $compats[] = 'MYSQL40';
00267                             $compats[] = 'MSSQL';
00268                             $compats[] = 'ORACLE';
00269                             $compats[] = 'POSTGRESQL';
00270                             if (PMA_MYSQL_INT_VERSION >= 50001) {
00271                                 $compats[] = 'TRADITIONAL';
00272                             }
00273                         }
00274                         foreach ($compats as $x) {
00275                             echo '<option value="' . $x . '"' . ($cfg['Export']['sql_compat'] == $x ? ' selected="selected"' : '' ) . '>' . $x . '</option>' . "\n";
00276                         }
00277                         ?>
00278                         </select>
00279                         <?php echo PMA_showMySQLDocu('manual_MySQL_Database_Administration', 'Server_SQL_mode') . "\n";
00280     }
00281     ?>
00282                     </td>
00283                 </tr>
00284 <?php
00285 } // end STRUCTURE
00286 ?>
00287 
00288                 <!-- For data -->
00289                 <tr>
00290                     <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00291                         <input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" <?php PMA_exportCheckboxCheck('sql_data'); ?> onclick="if (!this.checked &amp;&amp; (!getElement('checkbox_sql_structure') || !getElement('checkbox_sql_structure').checked)) return false; else return true;" style="vertical-align: middle" /><label for="checkbox_sql_data"><b><?php echo $strData; ?>:</b></label><br />
00292 
00293                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" <?php PMA_exportCheckboxCheck('sql_columns'); ?> style="vertical-align: middle" /><label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label><br />
00294 
00295                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" <?php PMA_exportCheckboxCheck('sql_extended'); ?> style="vertical-align: middle" /><label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label><br />
00296 
00297                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="delayed" value="yes" id="checkbox_dump_delayed" <?php PMA_exportCheckboxCheck('sql_delayed'); ?> style="vertical-align: middle" /><label for="checkbox_dump_delayed"><?php echo $strDelayedInserts; ?></label><br />
00298 
00299                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="sql_ignore" value="yes" id="checkbox_dump_ignore" <?php PMA_exportCheckboxCheck('sql_ignore'); ?> style="vertical-align: middle" /><label for="checkbox_dump_ignore"><?php echo $strIgnoreInserts; ?></label><br />
00300 
00301                         &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="hexforbinary" value="yes" id="checkbox_hexforbinary" <?php PMA_exportCheckboxCheck('sql_hex_for_binary'); ?> style="vertical-align: middle" /><label for="checkbox_hexforbinary"><?php echo $strHexForBinary; ?></label><br />
00302 
00303                         <label for="select_sql_type"><?php echo $strSQLExportType; ?>:&nbsp;</label><select name="sql_type" id="select_sql_type" style="vertical-align: middle">
00304                             <option value="insert"<?php echo $cfg['Export']['sql_type'] == 'insert' ? ' selected="selected"' : ''; ?>>INSERT</option>
00305                             <option value="update"<?php echo $cfg['Export']['sql_type'] == 'update' ? ' selected="selected"' : ''; ?>>UPDATE</option>
00306                             <option value="replace"<?php echo $cfg['Export']['sql_type'] == 'replace' ? ' selected="selected"' : ''; ?>>REPLACE</option>
00307                         </select>
00308                     </td>
00309                 </tr>
00310                 </table>
00311             </div>
00312 <?php
00313 } // end SQL-OPTIONS
00314 ?>
00315 
00316             <!-- LaTeX options -->
00317             <div id="latex_options">
00318             <table width="400" border="0" cellpadding="3" cellspacing="1">
00319                 <tr><th align="left"><?php echo $strLaTeXOptions; ?></th></tr>
00320                 <tr>
00321                     <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00322                         <input type="checkbox" name="latex_caption" value="yes" id="checkbox_latex_show_caption" <?php PMA_exportCheckboxCheck('latex_caption'); ?> style="vertical-align: middle" /><label for="checkbox_latex_show_caption"><?php echo $strLatexIncludeCaption; ?></label><br />
00323                     </td>
00324                 </tr>
00325 
00326 <?php if (!$hide_structure) { ?>
00327                 <!-- For structure -->
00328                 <tr>
00329                     <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00330                     <input type="checkbox" name="latex_structure" value="structure" id="checkbox_latex_structure" <?php PMA_exportCheckboxCheck('latex_structure'); ?> onclick="if (!this.checked &amp;&amp; !getElement('checkbox_latex_data').checked) return false; else return true;" style="vertical-align: middle" /><label for="checkbox_latex_structure"><b><?php echo $strStructure; ?></b></label><br />
00331                     <table border="0" cellspacing="1" cellpadding="0">
00332                         <tr>
00333                             <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
00334                             <td><?php echo $strLatexCaption; ?>&nbsp;</td>
00335                             <td>
00336                                 <input type="text" name="latex_structure_caption" size="30" value="<?php echo $strLatexStructure; ?>" class="textfield" style="vertical-align: middle" />
00337                             </td>
00338                         </tr>
00339                         <tr>
00340                             <td>&nbsp;</td>
00341                             <td><?php echo $strLatexContinuedCaption; ?>&nbsp;</td>
00342                             <td>
00343                                 <input type="text" name="latex_structure_continued_caption" size="30" value="<?php echo $strLatexStructure . ' ' . $strLatexContinued; ?>" class="textfield" style="vertical-align: middle" />
00344                             </td>
00345                         </tr>
00346                         <tr>
00347                             <td>&nbsp;</td>
00348                             <td><?php echo $strLatexLabel; ?>&nbsp;</td>
00349                             <td>
00350                                 <input type="text" name="latex_structure_label" size="30" value="<?php echo $cfg['Export']['latex_structure_label']; ?>" class="textfield" style="vertical-align: middle" />
00351                             </td>
00352                         </tr>
00353                     </table>
00354 <?php
00355     if (!empty($cfgRelation['relation'])) {
00356 ?>
00357                     &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="latex_relation" value="yes" id="checkbox_latex_use_relation" <?php PMA_exportCheckboxCheck('latex_relation'); ?> style="vertical-align: middle" /><label for="checkbox_latex_use_relation"><?php echo $strRelations; ?></label><br />
00358 <?php
00359     } // end relation
00360     if ($cfgRelation['commwork']) {
00361 ?>
00362                     &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="latex_comments" value="yes" id="checkbox_latex_use_comments" <?php PMA_exportCheckboxCheck('latex_comments'); ?> style="vertical-align: middle" /><label for="checkbox_latex_use_comments"><?php echo $strComments; ?></label><br />
00363 <?php
00364     } // end comments
00365     if ($cfgRelation['mimework']) {
00366 ?>
00367                     &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="latex_mime" value="yes" id="checkbox_latex_use_mime" <?php PMA_exportCheckboxCheck('latex_mime'); ?> style="vertical-align: middle" /><label for="checkbox_latex_use_mime"><?php echo $strMIME_MIMEtype; ?></label><br />
00368 <?php
00369     } // end MIME
00370 ?>
00371                 </td>
00372             </tr>
00373 <?php
00374 } // end STRUCTURE
00375 ?>
00376             <!-- For data -->
00377             <tr>
00378                 <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00379                     <input type="checkbox" name="latex_data" value="data" id="checkbox_latex_data" <?php PMA_exportCheckboxCheck('latex_data'); ?> onclick="if (!this.checked &amp;&amp; (!getElement('checkbox_latex_structure') || !getElement('checkbox_latex_structure').checked)) return false; else return true;" style="vertical-align: middle" /><label for="checkbox_latex_data"><b><?php echo $strData; ?>:</b></label><br />
00380                     &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="latex_showcolumns" value="yes" id="ch_latex_showcolumns" <?php PMA_exportCheckboxCheck('latex_columns'); ?> style="vertical-align: middle" /><label for="ch_latex_showcolumns"><?php echo $strColumnNames; ?></label><br />
00381                     <table border="0" cellspacing="1" cellpadding="0">
00382                         <tr>
00383                             <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
00384                             <td><?php echo $strLatexCaption; ?>&nbsp;</td>
00385                             <td>
00386                                 <input type="text" name="latex_data_caption" size="30" value="<?php echo $strLatexContent; ?>" class="textfield" style="vertical-align: middle" />
00387                             </td>
00388                         </tr>
00389                         <tr>
00390                             <td>&nbsp;</td>
00391                             <td><?php echo $strLatexContinuedCaption; ?>&nbsp;</td>
00392                             <td>
00393                                 <input type="text" name="latex_data_continued_caption" size="30" value="<?php echo $strLatexContent . ' ' . $strLatexContinued; ?>" class="textfield" style="vertical-align: middle" />
00394                             </td>
00395                         </tr>
00396                         <tr>
00397                             <td>&nbsp;</td>
00398                             <td><?php echo $strLatexLabel; ?>&nbsp;</td>
00399                             <td>
00400                                 <input type="text" name="latex_data_label" size="30" value="<?php echo $cfg['Export']['latex_data_label']; ?>" class="textfield" style="vertical-align: middle" />
00401                             </td>
00402                         </tr>
00403                         <tr>
00404                             <td>&nbsp;</td>
00405                             <td><?php echo $strReplaceNULLBy; ?>&nbsp;</td>
00406                             <td>
00407                                 <input type="text" name="latex_replace_null" size="20" value="<?php echo $cfg['Export']['latex_null']; ?>" class="textfield" style="vertical-align: middle" />
00408                             </td>
00409                         </tr>
00410                     </table>
00411                 </td>
00412             </tr>
00413             </table>
00414             </div>
00415 
00416             <!-- CSV options -->
00417             <div id="csv_options">
00418             <table width="400" border="0" cellpadding="3" cellspacing="1">
00419                 <tr><th align="left">
00420                     <?php echo $strCSVOptions; ?><input type="hidden" name="csv_data" value="csv_data" />
00421                 </th></tr>
00422                 <tr>
00423                     <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00424                     <table border="0" cellspacing="1" cellpadding="0">
00425                     <tr>
00426                         <td>
00427                             <?php echo $strFieldsTerminatedBy; ?>&nbsp;
00428                         </td>
00429                         <td>
00430                             <input type="text" name="separator" size="2" value="<?php echo $cfg['Export']['csv_separator']; ?>" class="textfield" style="vertical-align: middle" />
00431                         </td>
00432                     </tr>
00433                     <tr>
00434                         <td>
00435                             <?php echo $strFieldsEnclosedBy; ?>&nbsp;
00436                         </td>
00437                         <td>
00438                             <input type="text" name="enclosed" size="2" value="<?php echo $cfg['Export']['csv_enclosed']; ?>" class="textfield" style="vertical-align: middle" />
00439                         </td>
00440                     </tr>
00441                     <tr>
00442                         <td>
00443                             <?php echo $strFieldsEscapedBy; ?>&nbsp;
00444                         </td>
00445                         <td>
00446                             <input type="text" name="escaped" size="2" value="<?php echo $cfg['Export']['csv_escaped']; ?>" class="textfield" style="vertical-align: middle" />
00447                         </td>
00448                     </tr>
00449                     <tr>
00450                         <td>
00451                             <?php echo $strLinesTerminatedBy; ?>&nbsp;
00452                         </td>
00453                         <td>
00454                             <input type="text" name="add_character" size="2" value="<?php if ($cfg['Export']['csv_terminated'] == 'AUTO') echo ((PMA_whichCrlf() == "\n") ? '\n' : '\r\n'); else echo $cfg['Export']['csv_terminated']; ?>" class="textfield" style="vertical-align: middle" />
00455                         </td>
00456                     </tr>
00457                     <tr>
00458                         <td>
00459                             <?php echo $strReplaceNULLBy; ?>&nbsp;
00460                         </td>
00461                         <td>
00462                             <input type="text" name="csv_replace_null" size="20" value="<?php echo $cfg['Export']['csv_null']; ?>" class="textfield" style="vertical-align: middle" />
00463                         </td>
00464                     </tr>
00465                 </table>
00466                 <input type="checkbox" name="showcsvnames" value="yes" id="checkbox_dump_showcsvnames" <?php PMA_exportCheckboxCheck('csv_columns'); ?> style="vertical-align: middle" /><label for="checkbox_dump_showcsvnames"><?php echo $strPutColNames; ?></label>
00467             </td>
00468         </tr>
00469         </table>
00470         </div>
00471 
00472         <!-- Excel options -->
00473         <div id="excel_options">
00474         <table width="400" border="0" cellpadding="3" cellspacing="1">
00475                 <tr><th align="left">
00476                     <?php echo $strExcelOptions; ?>
00477                     <input type="hidden" name="excel_data" value="excel_data" />
00478                 </th></tr>
00479                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00480                 <table border="0" cellspacing="1" cellpadding="0">
00481                     <tr>
00482                         <td>
00483                             <?php echo $strReplaceNULLBy; ?>&nbsp;
00484                         </td>
00485                         <td>
00486                             <input type="text" name="excel_replace_null" size="20" value="<?php echo $cfg['Export']['excel_null']; ?>" class="textfield" style="vertical-align: middle" />
00487                         </td>
00488                     </tr>
00489                     <tr>
00490                         <td colspan="2">
00491                             <input type="checkbox" name="showexcelnames" value="yes" id="checkbox_dump_showexcelnames" <?php PMA_exportCheckboxCheck('excel_columns'); ?> style="vertical-align: middle" /><label for="checkbox_dump_showexcelnames"><?php echo $strPutColNames; ?></label>
00492                         </td>
00493                     </tr>
00494                     <tr>
00495                         <td>
00496                             <label for="select_excel_edition">
00497                                 <?php echo $strExcelEdition; ?>:&nbsp;
00498                             </label>
00499                         </td>
00500                         <td>
00501                             <select name="excel_edition" id="select_excel_edition" style="vertical-align: middle">
00502                                 <option value="win"<?php echo $cfg['Export']['excel_edition'] == 'win' ? ' selected="selected"' : ''; ?>>Windows</option>
00503                                 <option value="mac"<?php echo $cfg['Export']['excel_edition'] == 'mac' ? ' selected="selected"' : ''; ?>>Excel 2003 / Macintosh</option>
00504                             </select>
00505                         </td>
00506                     </tr>
00507                 </table>
00508                 </td></tr>
00509             </table>
00510             </div>
00511 
00512 
00513             <!-- HTML Excel options -->
00514             <div id="htmlexcel_options">
00515                 <table border="0" cellspacing="1" cellpadding="0" width="400">
00516                     <tr>
00517                         <th align="left">
00518                            <b><?php echo $strHTMLExcelOptions; ?></b>
00519                            <input type="hidden" name="htmlexcel_data" value="htmlexcel_data" />
00520                         </th>
00521                    </tr>
00522                    <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00523                 <table border="0" cellspacing="1" cellpadding="0">
00524                        <tr>
00525                            <td>
00526                             <?php echo $strReplaceNULLBy; ?>&nbsp;
00527                         </td>
00528                         <td>
00529                             <input type="text" name="htmlexcel_replace_null" size="20" value="<?php echo $cfg['Export']['htmlexcel_null']; ?>" class="textfield" />
00530                         </td>
00531                     </tr>
00532                     <tr>
00533                         <td>
00534                             <input type="checkbox" name="htmlexcel_shownames" value="yes" id="checkbox_dump_htmlexcel_shownames" <?php PMA_exportCheckboxCheck('htmlexcel_columns'); ?> /><label for="checkbox_dump_htmlexcel_shownames"><?php echo $strPutColNames; ?></label>
00535                         </td>
00536                     </tr>
00537                 </table>
00538                     </td></tr>
00539                </table>
00540             </div>
00541 
00542 
00543             <!-- HTML Word options -->
00544             <div id="htmlword_options">
00545                 <table border="0" cellspacing="1" cellpadding="0" width="400">
00546                     <tr>
00547                         <th align="left">
00548                            <b><?php echo $strHTMLWordOptions; ?></b>
00549                         </th>
00550                    </tr>
00551                    <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00552                     <input type="checkbox" name="htmlword_structure" value="structure" id="checkbox_htmlword_structure" <?php PMA_exportCheckboxCheck('htmlword_structure'); ?> onclick="if (!this.checked &amp;&amp; (!getElement('checkbox_htmlword_data') || !getElement('checkbox_htmlword_data').checked)) return false; else return true;" style="vertical-align: middle" /><label for="checkbox_htmlword_structure"><b><?php echo $strStructure; ?></b></label><br />
00553                     </td></tr>
00554                    <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00555                     <input type="checkbox" name="htmlword_data" value="data" id="checkbox_htmlword_data" <?php PMA_exportCheckboxCheck('htmlword_data'); ?> onclick="if (!this.checked &amp;&amp; (!getElement('checkbox_htmlword_structure') || !getElement('checkbox_htmlword_structure').checked)) return false; else return true;" style="vertical-align: middle" /><label for="checkbox_htmlword_data"><b><?php echo $strData; ?>:</b></label><br />
00556                 <table border="0" cellspacing="1" cellpadding="0">
00557                        <tr>
00558                            <td>
00559                             &nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strReplaceNULLBy; ?>&nbsp;
00560                         </td>
00561                         <td>
00562                             <input type="text" name="htmlword_replace_null" size="20" value="<?php echo $cfg['Export']['htmlword_null']; ?>" class="textfield" />
00563                         </td>
00564                     </tr>
00565                     <tr>
00566                         <td>
00567                             &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="htmlword_shownames" value="yes" id="checkbox_dump_htmlword_shownames" <?php PMA_exportCheckboxCheck('htmlword_columns'); ?> /><label for="checkbox_dump_htmlword_shownames"><?php echo $strPutColNames; ?></label>
00568                         </td>
00569                     </tr>
00570                 </table>
00571                     </td></tr>
00572                </table>
00573             </div>
00574 
00575 
00576 <?php if ($xls) { ?>
00577             <!-- Native Excel options -->
00578             <div id="xls_options">
00579                 <table border="0" cellspacing="1" cellpadding="0" width="400">
00580                     <tr>
00581                         <th align="left">
00582                            <b><?php echo $strExcelOptions; ?></b>
00583                            <input type="hidden" name="xls_data" value="xls_data" />
00584                         </th>
00585                    </tr>
00586                    <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00587                 <table border="0" cellspacing="1" cellpadding="0">
00588                        <tr>
00589                            <td>
00590                             <?php echo $strReplaceNULLBy; ?>&nbsp;
00591                         </td>
00592                         <td>
00593                             <input type="text" name="xls_replace_null" size="20" value="<?php echo $cfg['Export']['xls_null']; ?>" class="textfield" />
00594                         </td>
00595                     </tr>
00596                     <tr>
00597                         <td>
00598                             <input type="checkbox" name="xls_shownames" value="yes" id="checkbox_dump_xls_shownames" <?php PMA_exportCheckboxCheck('xls_columns'); ?> /><label for="checkbox_dump_xls_shownames"><?php echo $strPutColNames; ?></label>
00599                         </td>
00600                     </tr>
00601                 </table>
00602                     </td></tr>
00603                </table>
00604             </div>
00605 <?php } ?>
00606 
00607             <div id="none_options">
00608             <table width="400" border="0" cellpadding="3" cellspacing="1">
00609                 <tr><th align="left"><?php echo $strXML; ?></th></tr>
00610                 <tr><td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00611                     <?php echo $strNoOptions; ?>
00612                     <input type="hidden" name="xml_data" value="xml_data" />
00613                 </td></tr>
00614             </table>
00615             </div>
00616             <script type="text/javascript">
00617             <!--
00618                 show_checked_option();
00619             //-->
00620             </script>
00621         </td>
00622     </tr>
00623 <?php
00624 if (isset($table) && !empty($table) && !isset($num_tables)) {
00625 ?>
00626     <tr>
00627         <td colspan="3" align="center">
00628           <div style="background-color: <?php echo $cfg['BgcolorOne']; ?>; padding: 3px; margin: 1px;">
00629            <b><?php echo sprintf($strDumpXRows , '<input type="text" name="limit_to" size="5" value="' . (isset($unlim_num_rows)?$unlim_num_rows: PMA_countRecords($db, $table, TRUE)) . '" class="textfield" style="vertical-align: middle" onfocus="this.select()" style="vertical-align: middle; text-align: center;" />' , '<input type="text" name="limit_from" value="0" size="5" class="textfield" style="vertical-align: middle" onfocus="this.select()" style="vertical-align: middle; text-align: center;" />') . "\n"; ?></b>
00630           </div>
00631         </td>
00632     </tr>
00633 <?php
00634 }
00635 ?>
00636 
00637     <tr>
00638         <!-- Export to screen or to file -->
00639         <td colspan="3">
00640         <table width="100%" border="0" cellpadding="3" cellspacing="1">
00641         <tr>
00642             <th align="left">
00643             <input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" <?php PMA_exportCheckboxCheck('asfile'); ?> style="vertical-align: middle" /><label for="checkbox_dump_asfile"><b><?php echo $strSend; ?></b></label>
00644             </th>
00645         </tr>
00646         <tr>
00647             <td bgcolor="<?php echo $cfg['BgcolorOne']; ?>">
00648                 <?php if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) { ?>
00649                 &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="onserver" value="saveit" id="checkbox_dump_onserver"  onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportCheckboxCheck('onserver'); ?> style="vertical-align: middle" /><label for="checkbox_dump_onserver"><?php echo sprintf($strSaveOnServer, htmlspecialchars($cfg['SaveDir'])); ?></label>,<br />
00650                 &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" name="onserverover" value="saveitover" id="checkbox_dump_onserverover"  onclick="getElement('checkbox_dump_onserver').checked = true;getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportCheckboxCheck('onserver_overwrite'); ?> style="vertical-align: middle" /><label for="checkbox_dump_onserverover"><?php echo $strOverwriteExisting; ?></label>
00651                 <br />
00652                 <?php } ?>
00653 
00654                 &nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFileNameTemplate; ?>:&nbsp;
00655                 <input type="text" name="filename_template"
00656                 <?php
00657                     echo ' value="';
00658                     if ($export_type == 'database') {
00659                         if (isset($_COOKIE) && !empty($_COOKIE['pma_db_filename_template'])) {
00660                             echo $_COOKIE['pma_db_filename_template'];
00661                         } else {
00662                             echo $GLOBALS['cfg']['Export']['file_template_database'];
00663                         }
00664                     } elseif ($export_type == 'table') {
00665                         if (isset($_COOKIE) && !empty($_COOKIE['pma_table_filename_template'])) {
00666                             echo $_COOKIE['pma_table_filename_template'];
00667                         } else {
00668                             echo $GLOBALS['cfg']['Export']['file_template_table'];
00669                         }
00670                     } else {
00671                         if (isset($_COOKIE) && !empty($_COOKIE['pma_server_filename_template'])) {
00672                             echo $_COOKIE['pma_server_filename_template'];
00673                         } else {
00674                             echo $GLOBALS['cfg']['Export']['file_template_server'];
00675                         }
00676                     }
00677                     echo '" ';
00678                 ?> style="vertical-align: middle" />
00679                 (
00680                 <input type="checkbox" name="remember_template" id="checkbox_remember_template" <?php PMA_exportCheckboxCheck('remember_file_template'); ?> style="vertical-align: middle" /><label for="checkbox_remember_template"><?php echo $strFileNameTemplateRemember; ?></label>
00681                 )*
00682 
00683                 <?php
00684                 // charset of file
00685                 if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
00686                     echo '<br /><label for="select_charset_of_file">' . $strCharsetOfFile . '</label>';
00687                     echo "\n";
00688 
00689                     $temp_charset = reset($cfg['AvailableCharsets']);
00690                     echo '<select id="select_charset_of_file" name="charset_of_file" size="1">' . "\n";
00691                     foreach($cfg['AvailableCharsets'] as $key => $temp_charset) {
00692                         echo '                <option value="' . $temp_charset . '"';
00693                         if ((empty($cfg['Export']['charset']) && $temp_charset == $charset) || $temp_charset == $cfg['Export']['charset']) {
00694                             echo ' selected="selected"';
00695                         }
00696                         echo '>' . $temp_charset . '</option>' . "\n";
00697                     } // end foreach
00698                     echo '            </select>';
00699                 } // end if
00700                 echo "\n";
00701                 ?>
00702                 <br />
00703                 &nbsp;&nbsp;&nbsp;&nbsp;<b><?php echo $strCompression; ?></b><br />
00704                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="compression" value="none" id="radio_compression_none" onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportIsActive('compression', 'none'); ?> style="vertical-align: middle" /><label for="radio_compression_none"><?php echo $strNone; ?></label>
00705 &nbsp;&nbsp;
00706 
00707 <?php
00708 
00709 // zip, gzip and bzip2 encode features
00710 $is_zip  = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
00711 $is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
00712 $is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
00713 if ($is_zip || $is_gzip || $is_bzip) {
00714     if ($is_zip) {
00715         ?>
00716                 <input type="radio" name="compression" value="zip" id="radio_compression_zip" onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportIsActive('compression', 'zip'); ?> style="vertical-align: middle" /><label for="radio_compression_zip"><?php echo $strZip; ?></label><?php echo (($is_gzip || $is_bzip) ? '&nbsp;&nbsp;' : ''); ?>
00717         <?php
00718     }
00719     if ($is_gzip) {
00720         echo "\n"
00721         ?>
00722                 <input type="radio" name="compression" value="gzip" id="radio_compression_gzip" onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportIsActive('compression', 'gzip'); ?> style="vertical-align: middle" /><label for="radio_compression_gzip"><?php echo $strGzip; ?></label><?php echo ($is_bzip ? '&nbsp;&nbsp;' : ''); ?>
00723         <?php
00724     }
00725     if ($is_bzip) {
00726         echo "\n"
00727         ?>
00728                 <input type="radio" name="compression" value="bzip" id="radio_compression_bzip" onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportIsActive('compression', 'bzip'); ?> style="vertical-align: middle" /><label for="radio_compression_bzip"><?php echo $strBzip; ?></label>
00729         <?php
00730     }
00731 }
00732 echo "\n";
00733 ?>
00734             </td>
00735         </tr>
00736         </table>
00737         </td>
00738     </tr>
00739 
00740 <?php
00741 // Encoding setting form appended by Y.Kawada
00742 if (function_exists('PMA_set_enc_form')) {
00743     ?>
00744     <tr>
00745         <!-- Japanese encoding setting -->
00746         <td colspan="3" align="center">
00747     <?php
00748     echo PMA_set_enc_form('            ');
00749     ?>
00750         </td>
00751     </tr>
00752     <?php
00753 }
00754 echo "\n";
00755 ?>
00756     <tr>
00757         <td colspan="3" align="right" class="tblFooters">
00758             <input type="submit" value="<?php echo $strGo; ?>" id="buttonGo" />
00759         </td>
00760     </tr>
00761     </table>
00762 </form>
00763 <br />
00764 <table border="0" cellpadding="0" cellspacing="0" width="600">
00765 <tr>
00766     <td valign="top">*&nbsp;</td>
00767     <td>
00768         <?php echo sprintf($strFileNameTemplateHelp, '<a href="http://www.php.net/manual/function.strftime.php" target="documentation" title="' . $strDocu . '">', '</a>') . "\n"; ?>
00769 
00770     </td>
00771 </tr>
00772 </table>


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6