Documentation TYPO3 par Ameos

display_export.lib.php

00001 <?php
00002 /* $Id: display_export.lib.php,v 2.2 2003/11/26 22:52:23 rabus 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 function PMA_exportCheckboxCheck($str) {
00010     if (isset($GLOBALS['cfg']['Export'][$str]) && $GLOBALS['cfg']['Export'][$str]) {
00011         echo ' checked="checked"';
00012     }
00013 }
00014 
00015 function PMA_exportIsActive($what, $val) {
00016     if (isset($GLOBALS['cfg']['Export'][$what]) &&  $GLOBALS['cfg']['Export'][$what] == $val) {
00017         echo ' checked="checked"';
00018     }
00019 }
00020 
00021 ?>
00022 <form method="post" action="export.php" name="dump">
00023 <?php
00024 $hide_structure = false;
00025 $hide_sql       = false;
00026 $hide_xml       = empty($db);
00027 if ($export_type == 'server') {
00028     echo PMA_generate_common_hidden_inputs('', '', 1);
00029 } elseif ($export_type == 'database') {
00030     echo PMA_generate_common_hidden_inputs($db, '', 1);
00031 } else {
00032     echo PMA_generate_common_hidden_inputs($db, $table, 1);
00033     if (!isset($single_table)) {
00034         $hide_structure = true;
00035         $hide_sql       = true;
00036     }
00037 }
00038 echo '    <input type="hidden" name="export_type" value="' . $export_type . '" />';
00039 
00040 if (isset($sql_query)) {
00041     echo '    <input type="hidden" name="sql_query" value="' . htmlspecialchars($sql_query) . '" />';
00042 }
00043     ?>
00044 
00045     <script type="text/javascript">
00046     <!--
00047     function hide_them_all() {
00048         getElement("csv_options").style.display = 'none';
00049         getElement("excel_options").style.display = 'none';
00050         getElement("latex_options").style.display = 'none';
00051 <?php if (!$hide_sql) { ?>
00052         getElement("sql_options").style.display = 'none';
00053 <?php } ?>
00054         getElement("none_options").style.display = 'none';
00055     }
00056 
00057     function show_checked_option() {
00058         hide_them_all();
00059         if (getElement('radio_dump_latex').checked) {
00060             getElement('latex_options').style.display = 'block';
00061 <?php if (!$hide_sql) { ?>
00062         } else if (getElement('radio_dump_sql').checked) {
00063             getElement('sql_options').style.display = 'block';
00064 <?php } ?>
00065 <?php if (!$hide_xml) { ?>
00066         } else if (getElement('radio_dump_xml').checked) {
00067             getElement('none_options').style.display = 'block';
00068 <?php } ?>
00069         } else if (getElement('radio_dump_csv').checked) {
00070             getElement('csv_options').style.display = 'block';
00071         } else if (getElement('radio_dump_excel').checked) {
00072             getElement('excel_options').style.display = 'block';
00073         } else {
00074             if (getElement('radio_dump_sql')) {
00075                 getElement('radio_dump_sql').checked = true;
00076                 getElement('sql_options').style.display = 'block';
00077             } else if (getElement('radio_dump_csv')) {
00078                 getElement('radio_dump_csv').checked = true;
00079                 getElement('csv_options').style.display = 'block';
00080             } else {
00081                 getElement('none_options').style.display = 'block';
00082             }
00083         }
00084     }
00085     //-->
00086     </script>
00087 
00088     <table cellpadding="5" border="0" cellspacing="0" align="center">
00089     <tr>
00090 
00091         <!-- Formats to export to -->
00092         <td nowrap="nowrap" valign="top" onclick="if (typeof(window.opera) != 'undefined')setTimeout('show_checked_option()', 1); return true">
00093             <fieldset <?php echo ((!isset($multi_values) || isset($multi_values) && $multi_values == '') ? 'style="height: 220px;"' : ''); ?>>
00094             <legend><?php echo $strExport; ?></legend>
00095             <br>
00096             <?php
00097             if (isset($multi_values) && $multi_values != '') {
00098                 echo $multi_values;
00099             }
00100             ?>
00101 
00102 <?php if (!$hide_sql) { ?>
00103             <!-- SQL -->
00104             <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'); ?> />
00105             <label for="radio_dump_sql"><?php echo $strSQL; ?></label>
00106             <br /><br />
00107 <?php } ?>
00108 
00109             <!-- LaTeX table -->
00110             <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'); ?> />
00111             <label for="radio_dump_latex"><?php echo $strLaTeX; ?></label>
00112             <br /><br />
00113 
00114             <!-- Excel CSV -->
00115             <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'); ?> />
00116             <label for="radio_dump_excel"><?php echo $strStrucExcelCSV; ?></label>
00117             <br /><br />
00118             <!-- General CSV -->
00119             <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'); ?> />
00120             <label for="radio_dump_csv"><?php echo $strStrucCSV;?></label>
00121 
00122 
00123 <?php if (!$hide_xml) { ?>
00124             <br /><br />
00125 
00126             <!-- XML -->
00127             <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'); ?> />
00128             <label for="radio_dump_xml"><?php echo $strXML; ?></label>&nbsp;&nbsp;
00129 <?php } ?>
00130             </fieldset>
00131         </td>
00132         <!-- Options -->
00133         <td valign="top" id="options_td" width="400">
00134 
00135 <?php if (!$hide_sql) { ?>
00136             <!-- SQL options -->
00137             <fieldset id="sql_options">
00138                 <legend><?php echo $strSQLOptions; ?> (<a href="./Documentation.html#faqexport" target="documentation"><?php echo $strDocu; ?></a>)</legend>
00139 <?php
00140 if ($export_type == 'server') {
00141 ?>
00142                 <!-- For databases -->
00143                 <fieldset>
00144                     <legend>
00145                         <?php echo $strDatabaseExportOptions; ?>
00146                     </legend>
00147                     <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" <?php PMA_exportCheckboxCheck('sql_drop_database'); ?> />
00148                     <label for="checkbox_drop_database"><?php echo $strAddDropDatabase; ?></label><br />
00149                 </fieldset>
00150 <?php
00151 }
00152 ?>
00153 <?php if (!$hide_structure) { ?>
00154                 <!-- For structure -->
00155                 <fieldset>
00156                     <legend>
00157                         <input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" <?php PMA_exportCheckboxCheck('sql_structure'); ?> onclick="if(!this.checked && !getElement('checkbox_sql_data').checked) return false; else return true;" />
00158                         <label for="checkbox_sql_structure"><?php echo $strStructure; ?></label><br />
00159                     </legend>
00160 
00161                     <input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" <?php PMA_exportCheckboxCheck('sql_drop_table'); ?> />
00162                     <label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label><br />
00163                     <input type="checkbox" name="auto_increment" value="1" id="checkbox_auto_increment" <?php PMA_exportCheckboxCheck('sql_auto_increment'); ?> />
00164                     <label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />
00165                     <input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" <?php PMA_exportCheckboxCheck('sql_backquotes'); ?> />
00166                     <label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label><br />
00167                     <fieldset>
00168                         <legend><?php echo $strAddIntoComments; ?></legend>
00169                         <input type="checkbox" name="sql_dates" value="yes" id="checkbox_sql_dates" <?php PMA_exportCheckboxCheck('sql_dates'); ?> />
00170                         <label for="checkbox_sql_dates"><?php echo $strCreationDates; ?></label><br />
00171 <?php
00172 if (!empty($cfgRelation['relation'])) {
00173 ?>
00174                         <input type="checkbox" name="sql_relation" value="yes" id="checkbox_sql_use_relation" <?php PMA_exportCheckboxCheck('sql_relation'); ?> />
00175                         <label for="checkbox_sql_use_relation"><?php echo $strRelations; ?></label><br />
00176 <?php
00177  } // end relation
00178 
00179 if (!empty($cfgRelation['commwork'])) {
00180 ?>
00181                         <input type="checkbox" name="sql_comments" value="yes" id="checkbox_sql_use_comments" <?php PMA_exportCheckboxCheck('sql_comments'); ?> />
00182                         <label for="checkbox_sql_use_comments"><?php echo $strComments; ?></label><br />
00183 <?php
00184 } // end comments
00185 
00186 if ($cfgRelation['mimework']) {
00187      ?>
00188                         <input type="checkbox" name="sql_mime" value="yes" id="checkbox_sql_use_mime" <?php PMA_exportCheckboxCheck('sql_mime'); ?> />
00189                         <label for="checkbox_sql_use_mime"><?php echo $strMIME_MIMEtype; ?></label><br />
00190 <?php
00191 } // end MIME
00192 ?>
00193                      </fieldset>
00194                 </fieldset>
00195 <?php } ?>
00196 
00197                 <!-- For data -->
00198                 <fieldset>
00199                     <legend>
00200                         <input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" <?php PMA_exportCheckboxCheck('sql_data'); ?> onclick="if(!this.checked && (!getElement('checkbox_sql_structure') || !getElement('checkbox_sql_structure').checked)) return false; else return true;" />
00201                         <label for="checkbox_sql_data"><?php echo $strData; ?></label><br />
00202                     </legend>
00203                     <input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" <?php PMA_exportCheckboxCheck('sql_columns'); ?> />
00204                     <label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label><br />
00205                     <input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" <?php PMA_exportCheckboxCheck('sql_extended'); ?> />
00206                     <label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label><br />
00207                     <input type="checkbox" name="delayed" value="yes" id="checkbox_dump_delayed" <?php PMA_exportCheckboxCheck('sql_delayed'); ?> />
00208                     <label for="checkbox_dump_delayed"><?php echo $strDelayedInserts; ?></label><br />
00209 
00210                     <label for="select_sql_type">
00211                         <?php echo $strSQLExportType; ?>:&nbsp;
00212                     </label>
00213                     <select name="sql_type" id="select_sql_type" />
00214                         <option value="insert"<?php echo $cfg['Export']['sql_type'] == 'insert' ? ' selected="selected"' : ''; ?>>INSERT</option>
00215                         <option value="update"<?php echo $cfg['Export']['sql_type'] == 'update' ? ' selected="selected"' : ''; ?>>UPDATE</option>
00216                         <option value="replace"<?php echo $cfg['Export']['sql_type'] == 'replace' ? ' selected="selected"' : ''; ?>>REPLACE</option>
00217                     </select>
00218                 </fieldset>
00219             </fieldset>
00220 <?php } ?>
00221 
00222              <!-- LaTeX options -->
00223              <fieldset id="latex_options">
00224                  <legend><?php echo $strLaTeXOptions; ?></legend>
00225 
00226                      <input type="checkbox" name="latex_caption" value="yes" id="checkbox_latex_show_caption" <?php PMA_exportCheckboxCheck('latex_caption'); ?> />
00227                      <label for="checkbox_latex_show_caption"><?php echo $strLatexIncludeCaption; ?></label><br />
00228 
00229 <?php if (!$hide_structure) { ?>
00230                  <!-- For structure -->
00231                  <fieldset>
00232                      <legend>
00233                          <input type="checkbox" name="latex_structure" value="structure" id="checkbox_latex_structure" <?php PMA_exportCheckboxCheck('latex_structure'); ?> onclick="if(!this.checked && !getElement('checkbox_latex_data').checked) return false; else return true;" />
00234                          <label for="checkbox_latex_structure"><?php echo $strStructure; ?></label><br />
00235                      </legend>
00236                     <table border="0" cellspacing="1" cellpadding="0">
00237                         <tr>
00238                             <td>
00239                                 <?php echo $strLatexCaption; ?>&nbsp;
00240                             </td>
00241                             <td>
00242                                 <input type="text" name="latex_structure_caption" size="30" value="<?php echo $strLatexStructure; ?>" class="textfield" />
00243                             </td>
00244                         </tr>
00245                         <tr>
00246                             <td>
00247                                 <?php echo $strLatexContinuedCaption; ?>&nbsp;
00248                             </td>
00249                             <td>
00250                                 <input type="text" name="latex_structure_continued_caption" size="30" value="<?php echo $strLatexStructure . ' ' . $strLatexContinued; ?>" class="textfield" />
00251                             </td>
00252                         </tr>
00253                         <tr>
00254                             <td>
00255                                 <?php echo $strLatexLabel; ?>&nbsp;
00256                             </td>
00257                             <td>
00258                                 <input type="text" name="latex_structure_label" size="30" value="<?php echo $cfg['Export']['latex_structure_label']; ?>" class="textfield" />
00259                             </td>
00260                         </tr>
00261                     </table>
00262 <?php
00263 if (!empty($cfgRelation['relation'])) {
00264 ?>
00265                      <input type="checkbox" name="latex_relation" value="yes" id="checkbox_latex_use_relation" <?php PMA_exportCheckboxCheck('latex_relation'); ?> />
00266                      <label for="checkbox_latex_use_relation"><?php echo $strRelations; ?></label><br />
00267 <?php
00268  } // end relation
00269 
00270 if ($cfgRelation['commwork']) {
00271      ?>
00272                      <input type="checkbox" name="latex_comments" value="yes" id="checkbox_latex_use_comments" <?php PMA_exportCheckboxCheck('latex_comments'); ?> />
00273                      <label for="checkbox_latex_use_comments"><?php echo $strComments; ?></label><br />
00274 <?php
00275 } // end comments
00276 
00277 if ($cfgRelation['mimework']) {
00278      ?>
00279                      <input type="checkbox" name="latex_mime" value="yes" id="checkbox_latex_use_mime" <?php PMA_exportCheckboxCheck('latex_mime'); ?> />
00280                      <label for="checkbox_latex_use_mime"><?php echo $strMIME_MIMEtype; ?></label><br />
00281 <?php
00282 } // end MIME
00283 ?>
00284                  </fieldset>
00285 <?php } ?>
00286 
00287                  <!-- For data -->
00288                  <fieldset>
00289                      <legend>
00290                          <input type="checkbox" name="latex_data" value="data" id="checkbox_latex_data" <?php PMA_exportCheckboxCheck('latex_data'); ?> onclick="if(!this.checked && (!getElement('checkbox_latex_structure') || !getElement('checkbox_latex_structure').checked)) return false; else return true;" />
00291                          <label for="checkbox_latex_data"><?php echo $strData; ?></label><br />
00292                      </legend>
00293                      <input type="checkbox" name="latex_showcolumns" value="yes" id="ch_latex_showcolumns" <?php PMA_exportCheckboxCheck('latex_columns'); ?> />
00294                      <label for="ch_latex_showcolumns"><?php echo $strColumnNames; ?></label><br />
00295                     <table border="0" cellspacing="1" cellpadding="0">
00296                         <tr>
00297                             <td>
00298                                 <?php echo $strLatexCaption; ?>&nbsp;
00299                             </td>
00300                             <td>
00301                                 <input type="text" name="latex_data_caption" size="30" value="<?php echo $strLatexContent; ?>" class="textfield" />
00302                             </td>
00303                         </tr>
00304                         <tr>
00305                             <td>
00306                                 <?php echo $strLatexContinuedCaption; ?>&nbsp;
00307                             </td>
00308                             <td>
00309                                 <input type="text" name="latex_data_continued_caption" size="30" value="<?php echo $strLatexContent . ' ' . $strLatexContinued; ?>" class="textfield" />
00310                             </td>
00311                         </tr>
00312                         <tr>
00313                             <td>
00314                                 <?php echo $strLatexLabel; ?>&nbsp;
00315                             </td>
00316                             <td>
00317                                 <input type="text" name="latex_data_label" size="30" value="<?php echo $cfg['Export']['latex_data_label']; ?>" class="textfield" />
00318                             </td>
00319                         </tr>
00320                         <tr>
00321                             <td>
00322                                 <?php echo $strReplaceNULLBy; ?>&nbsp;
00323                             </td>
00324                             <td>
00325                                 <input type="text" name="latex_replace_null" size="20" value="<?php echo $cfg['Export']['latex_null']; ?>" class="textfield" />
00326                             </td>
00327                         </tr>
00328                     </table>
00329                  </fieldset>
00330              </fieldset>
00331 
00332              <!-- CSV options -->
00333             <fieldset id="csv_options">
00334                 <legend><?php echo $strCSVOptions; ?></legend>
00335                 <input type="hidden" name="csv_data" value="csv_data" />
00336                 <table border="0" cellspacing="1" cellpadding="0">
00337                     <tr>
00338                         <td>
00339                             <?php echo $strFieldsTerminatedBy; ?>&nbsp;
00340                         </td>
00341                         <td>
00342                             <input type="text" name="separator" size="2" value="<?php echo $cfg['Export']['csv_separator']; ?>" class="textfield" />
00343                         </td>
00344                     </tr>
00345                     <tr>
00346                         <td>
00347                             <?php echo $strFieldsEnclosedBy; ?>&nbsp;
00348                         </td>
00349                         <td>
00350                             <input type="text" name="enclosed" size="2" value="<?php echo $cfg['Export']['csv_enclosed']; ?>" class="textfield" />
00351                         </td>
00352                     </tr>
00353                     <tr>
00354                         <td>
00355                             <?php echo $strFieldsEscapedBy; ?>&nbsp;
00356                         </td>
00357                         <td>
00358                             <input type="text" name="escaped" size="2" value="<?php echo $cfg['Export']['csv_escaped']; ?>" class="textfield" />
00359                         </td>
00360                     </tr>
00361                     <tr>
00362                         <td>
00363                             <?php echo $strLinesTerminatedBy; ?>&nbsp;
00364                         </td>
00365                         <td>
00366                             <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" />
00367                         </td>
00368                     </tr>
00369                     <tr>
00370                         <td>
00371                             <?php echo $strReplaceNULLBy; ?>&nbsp;
00372                         </td>
00373                         <td>
00374                             <input type="text" name="csv_replace_null" size="20" value="<?php echo $cfg['Export']['csv_null']; ?>" class="textfield" />
00375                         </td>
00376                     </tr>
00377                 </table>
00378                 <input type="checkbox" name="showcsvnames" value="yes" id="checkbox_dump_showcsvnames" <?php PMA_exportCheckboxCheck('csv_columns'); ?> />
00379                 <label for="checkbox_dump_showcsvnames"><?php echo $strPutColNames; ?></label>
00380             </fieldset>
00381 
00382             <!-- Excel options -->
00383             <fieldset id="excel_options">
00384                 <legend><?php echo $strExcelOptions; ?></legend>
00385                 <input type="hidden" name="excel_data" value="excel_data" />
00386                 <table border="0" cellspacing="1" cellpadding="0">
00387                     <tr>
00388                         <td>
00389                             <?php echo $strReplaceNULLBy; ?>&nbsp;
00390                         </td>
00391                         <td>
00392                             <input type="text" name="excel_replace_null" size="20" value="<?php echo $cfg['Export']['excel_null']; ?>" class="textfield" />
00393                         </td>
00394                     </tr>
00395                     <tr>
00396                         <td colspan="2">
00397                             <input type="checkbox" name="showexcelnames" value="yes" id="checkbox_dump_showexcelnames" <?php PMA_exportCheckboxCheck('excel_columns'); ?> />
00398                             <label for="checkbox_dump_showexcelnames"><?php echo $strPutColNames; ?></label>
00399                         </td>
00400                     </tr>
00401                     <tr>
00402                         <td>
00403                             <label for="select_excel_edition">
00404                                 <?php echo $strExcelEdition; ?>:&nbsp;
00405                             </label>
00406                         </td>
00407                         <td>
00408                             <select name="excel_edition" id="select_excel_edition" />
00409                                 <option value="win"<?php echo $cfg['Export']['excel_edition'] == 'win' ? ' selected="selected"' : ''; ?>>Windows</option>
00410                                 <option value="mac"<?php echo $cfg['Export']['excel_edition'] == 'mac' ? ' selected="selected"' : ''; ?>>Macintosh</option>
00411                             </select>
00412                         </td>
00413                     </tr>
00414                 </table>
00415             </fieldset>
00416 
00417             <fieldset id="none_options">
00418                 <legend><?php echo $strNoOptions; ?></legend>
00419                 <input type="hidden" name="xml_data" value="xml_data" />
00420             </fieldset>
00421 
00422             <script type="text/javascript">
00423             <!--
00424                 show_checked_option();
00425             //-->
00426             </script>
00427         </td>
00428     </tr>
00429 
00430 <?php
00431 if (isset($table) && !empty($table) && !isset($num_tables)) {
00432 ?>
00433     <tr>
00434         <td colspan="2" align="center">
00435             <fieldset>
00436                 <?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()" />' , '<input type="text" name="limit_from" value="0" size="5" class="textfield" style="vertical-align: middle" onfocus="this.select()" />') . "\n"; ?>
00437             </fieldset>
00438         </td>
00439     </tr>
00440 <?php
00441 }
00442 ?>
00443 
00444     <tr>
00445         <!-- Export to screen or to file -->
00446         <td colspan="2">
00447             <fieldset>
00448                 <legend>
00449                     <input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" <?php PMA_exportCheckboxCheck('asfile'); ?> />
00450                     <label for="checkbox_dump_asfile"><?php echo $strSend; ?></label>
00451                 </legend>
00452 
00453                 <?php if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) { ?>
00454                 <input type="checkbox" name="onserver" value="saveit" id="checkbox_dump_onserver"  onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportCheckboxCheck('onserver'); ?> />
00455                 <label for="checkbox_dump_onserver"><?php echo sprintf($strSaveOnServer, htmlspecialchars($cfg['SaveDir'])); ?></label>,
00456                 <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'); ?> />
00457                 <label for="checkbox_dump_onserverover"><?php echo $strOverwriteExisting; ?></label>
00458                 <br />
00459                 <?php } ?>
00460 
00461                 <?php echo $strFileNameTemplate; ?>&nbsp;:
00462                 <input type="text" name="filename_template"
00463                 <?php
00464                     echo ' value="';
00465                     if ($export_type == 'database') {
00466                         if (isset($_COOKIE) && !empty($_COOKIE['pma_db_filename_template'])) {
00467                             echo $_COOKIE['pma_db_filename_template'];
00468                         } else {
00469                             echo '__DB__';
00470                         }
00471                     } elseif ($export_type == 'table') {
00472                         if (isset($_COOKIE) && !empty($_COOKIE['pma_table_filename_template'])) {
00473                             echo $_COOKIE['pma_table_filename_template'];
00474                         } else {
00475                             echo '__TABLE__';
00476                         }
00477                     } else {
00478                         if (isset($_COOKIE) && !empty($_COOKIE['pma_server_filename_template'])) {
00479                             echo $_COOKIE['pma_server_filename_template'];
00480                         } else {
00481                             echo '__SERVER__';
00482                         }
00483                     }
00484                     echo '" ';
00485                 ?>
00486                 />
00487                 (
00488                 <input type="checkbox" name="remember_template" id="checkbox_remember_template" <?php PMA_exportCheckboxCheck('remember_file_template'); ?> />
00489                 <label for="checkbox_remember_template"><?php echo $strFileNameTemplateRemember; ?></label>
00490                 )*
00491 
00492                 <?php
00493                 // charset of file
00494                 if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
00495                     echo '<br /><label for="select_charset_of_file">' . $strCharsetOfFile . '</label>';
00496                     echo "\n";
00497 
00498                     $temp_charset = reset($cfg['AvailableCharsets']);
00499                     echo '<select id="select_charset_of_file" name="charset_of_file" size="1">' . "\n"
00500                             . '                <option value="' . $temp_charset . '"';
00501                     if ($temp_charset == $charset) {
00502                         echo ' selected="selected"';
00503                     }
00504                     echo '>' . $temp_charset . '</option>' . "\n";
00505                     while ($temp_charset = next($cfg['AvailableCharsets'])) {
00506                         echo '                <option value="' . $temp_charset . '"';
00507                         if ($temp_charset == $charset) {
00508                             echo ' selected="selected"';
00509                         }
00510                         echo '>' . $temp_charset . '</option>' . "\n";
00511                     } // end while
00512                     echo '            </select>';
00513                 } // end if
00514                 echo "\n";
00515                 ?>
00516 
00517                 <fieldset>
00518                     <legend><?php echo $strCompression; ?></legend>
00519 
00520                     <input type="radio" name="compression" value="none" id="radio_compression_none" onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportIsActive('compression', 'none'); ?> />
00521                     <label for="radio_compression_none"><?php echo $strNone; ?></label>&nbsp;
00522 
00523 <?php
00524 
00525 // zip, gzip and bzip2 encode features
00526 $is_zip  = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
00527 $is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
00528 $is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
00529 if ($is_zip || $is_gzip || $is_bzip) {
00530     if ($is_zip) {
00531         ?>
00532                 <input type="radio" name="compression" value="zip" id="radio_compression_zip" onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportIsActive('compression', 'zip'); ?> />
00533                 <label for="radio_compression_zip"><?php echo $strZip; ?></label><?php echo (($is_gzip || $is_bzip) ? '&nbsp;' : ''); ?>
00534         <?php
00535     }
00536     if ($is_gzip) {
00537         echo "\n"
00538         ?>
00539                 <input type="radio" name="compression" value="gzip" id="radio_compression_gzip" onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportIsActive('compression', 'gzip'); ?> />
00540                 <label for="radio_compression_gzip"><?php echo $strGzip; ?></label><?php echo ($is_bzip ? '&nbsp;' : ''); ?>
00541         <?php
00542     }
00543     if ($is_bzip) {
00544         echo "\n"
00545         ?>
00546                 <input type="radio" name="compression" value="bzip" id="radio_compression_bzip" onclick="getElement('checkbox_dump_asfile').checked = true;" <?php PMA_exportIsActive('compression', 'bzip'); ?> />
00547                 <label for="radio_compression_bzip"><?php echo $strBzip; ?></label>
00548         <?php
00549     }
00550 }
00551 echo "\n";
00552 ?>
00553             </fieldset>
00554         </td>
00555     </tr>
00556 
00557 <?php
00558 // Encoding setting form appended by Y.Kawada
00559 if (function_exists('PMA_set_enc_form')) {
00560     ?>
00561     <tr>
00562         <!-- Japanese encoding setting -->
00563         <td colspan="2" align="center">
00564     <?php
00565     echo PMA_set_enc_form('            ');
00566     ?>
00567         </td>
00568     </tr>
00569     <?php
00570 }
00571 echo "\n";
00572 ?>
00573     <tr>
00574         <td colspan="2" align="center">
00575             <input type="submit" value="<?php echo $strGo; ?>" />
00576         </td>
00577     </tr>
00578     </table>
00579 </form>
00580 <table align="center">
00581 <tr>
00582     <td valign="top">*&nbsp;</td>
00583     <td>
00584         <?php echo sprintf($strFileNameTemplateHelp, '<a href="http://www.php.net/manual/function.strftime.php" target="documentation">', '</a>') . "\n"; ?>
00585 
00586     </td>
00587 </tr>
00588 </table>


Généré par Les experts TYPO3 avec  doxygen 1.4.6