3 // vim: expandtab sw=4 ts=4 sts=4:
5 // Get relations & co. status
6 require_once('./libraries/relation.lib.php');
7 $cfgRelation = PMA_getRelationsParam();
9 // Check if we have native MS Excel export using PEAR class Spreadsheet_Excel_Writer
10 if (!empty($GLOBALS['cfg']['TempDir'])) {
11 @include_once
('Spreadsheet/Excel/Writer.php');
12 if (class_exists('Spreadsheet_Excel_Writer')) {
21 function PMA_exportCheckboxCheck($str) {
22 if (isset($GLOBALS['cfg']['Export'][$str]) && $GLOBALS['cfg']['Export'][$str]) {
23 echo ' checked="checked"';
27 function PMA_exportIsActive($what, $val) {
28 if (isset($GLOBALS['cfg']['Export'][$what]) && $GLOBALS['cfg']['Export'][$what] == $val) {
29 echo ' checked="checked"';
34 <form method
="post" action
="export.php" name
="dump">
37 $hide_structure = false;
39 $hide_xml = empty($db);
40 if ($export_type == 'server') {
41 echo PMA_generate_common_hidden_inputs('', '', 1);
42 } elseif ($export_type == 'database') {
43 echo PMA_generate_common_hidden_inputs($db, '', 1);
45 echo PMA_generate_common_hidden_inputs($db, $table, 1);
46 if (!isset($single_table)) {
47 $hide_structure = true;
50 // just to keep this value for possible next display of this form after saving on server
51 echo '<input type="hidden" name="single_table" value="TRUE" />' . "\n";
54 echo '<input type="hidden" name="export_type" value="' . $export_type . '" />' . "\n";
56 if (isset($sql_query)) {
57 echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars($sql_query) . '" />' . "\n";
61 <script type
="text/javascript">
63 function hide_them_all() {
64 document
.getElementById("csv_options").style
.display
= 'none';
65 document
.getElementById("excel_options").style
.display
= 'none';
66 document
.getElementById("latex_options").style
.display
= 'none';
67 document
.getElementById("htmlexcel_options").style
.display
= 'none';
68 document
.getElementById("htmlword_options").style
.display
= 'none';
70 document
.getElementById("xls_options").style
.display
= 'none';
72 <?php
if (!$hide_sql) { ?
>
73 document
.getElementById("sql_options").style
.display
= 'none';
75 document
.getElementById("none_options").style
.display
= 'none';
78 function show_checked_option() {
80 if (document
.getElementById('radio_dump_latex').checked
) {
81 document
.getElementById('latex_options').style
.display
= 'block';
82 } else if (document
.getElementById('radio_dump_htmlexcel').checked
) {
83 document
.getElementById('htmlexcel_options').style
.display
= 'block';
84 } else if (document
.getElementById('radio_dump_htmlword').checked
) {
85 document
.getElementById('htmlword_options').style
.display
= 'block';
87 } else if (document
.getElementById('radio_dump_xls').checked
) {
88 document
.getElementById('xls_options').style
.display
= 'block';
90 <?php
if (!$hide_sql) { ?
>
91 } else if (document
.getElementById('radio_dump_sql').checked
) {
92 document
.getElementById('sql_options').style
.display
= 'block';
94 <?php
if (!$hide_xml) { ?
>
95 } else if (document
.getElementById('radio_dump_xml').checked
) {
96 document
.getElementById('none_options').style
.display
= 'block';
98 } else if (document
.getElementById('radio_dump_csv').checked
) {
99 document
.getElementById('csv_options').style
.display
= 'block';
100 } else if (document
.getElementById('radio_dump_excel').checked
) {
101 document
.getElementById('excel_options').style
.display
= 'block';
103 if (document
.getElementById('radio_dump_sql')) {
104 document
.getElementById('radio_dump_sql').checked
= true;
105 document
.getElementById('sql_options').style
.display
= 'block';
106 } else if (document
.getElementById('radio_dump_csv')) {
107 document
.getElementById('radio_dump_csv').checked
= true;
108 document
.getElementById('csv_options').style
.display
= 'block';
110 document
.getElementById('none_options').style
.display
= 'block';
117 <fieldset id
="fieldsetexport">
118 <legend
><?php
echo $export_page_title; ?
></legend
>
120 <fieldset id
="exportoptions">
121 <legend
><?php
echo $strExport; ?
></legend
>
123 <?php
if ( ! empty( $multi_values ) ) { ?
>
124 <div
class="formelementrow">
125 <?php
echo $multi_values; ?
>
129 <?php
if ( ! $hide_sql ) { /* SQL */ ?
>
130 <div
class="formelementrow">
131 <input type
="radio" name
="what" value
="sql" id
="radio_dump_sql"
135 document.getElementById('sql_options').style.display = 'block';
137 <?php
PMA_exportIsActive('format', 'sql'); ?
> />
138 <label
for="radio_dump_sql"><?php
echo $strSQL; ?
></label
>
140 <?php
} /* LaTeX table */ ?
>
141 <div
class="formelementrow">
142 <input type
="radio" name
="what" value
="latex" id
="radio_dump_latex"
146 document.getElementById('latex_options').style.display = 'block';
148 <?php
PMA_exportIsActive('format', 'latex'); ?
> />
149 <label
for="radio_dump_latex"><?php
echo $strLaTeX; ?
></label
>
151 <?php
/* HTML Excel */ ?
>
152 <div
class="formelementrow">
153 <input type
="radio" name
="what" value
="htmlexcel" id
="radio_dump_htmlexcel"
157 document.getElementById('htmlexcel_options').style.display = 'block';
158 document.getElementById('checkbox_dump_asfile').checked = true;
160 <?php
PMA_exportIsActive('format', 'htmlexcel'); ?
> />
161 <label
for="radio_dump_htmlexcel"><?php
echo $strHTMLExcel; ?
></label
>
163 <?php
/* HTML Word */ ?
>
164 <div
class="formelementrow">
165 <input type
="radio" name
="what" value
="htmlword" id
="radio_dump_htmlword"
169 document.getElementById('htmlword_options').style.display = 'block';
170 document.getElementById('checkbox_dump_asfile').checked = true;
172 <?php
PMA_exportIsActive('format', 'htmlword'); ?
> />
173 <label
for="radio_dump_htmlword"><?php
echo $strHTMLWord; ?
></label
>
175 <?php
if ($xls) { /* Native Excel */ ?
>
176 <div
class="formelementrow">
177 <input type
="radio" name
="what" value
="xls" id
="radio_dump_xls"
181 document.getElementById('xls_options').style.display = 'block';
182 document.getElementById('checkbox_dump_asfile').checked = true;
184 <?php
PMA_exportIsActive('format', 'xls'); ?
> />
185 <label
for="radio_dump_xls"><?php
echo $strStrucNativeExcel; ?
></label
>
187 <?php
} /* Excel CSV */ ?
>
188 <div
class="formelementrow">
189 <input type
="radio" name
="what" value
="excel" id
="radio_dump_excel"
193 document.getElementById('excel_options').style.display = 'block';
195 <?php
PMA_exportIsActive('format', 'excel'); ?
> />
196 <label
for="radio_dump_excel"><?php
echo $strStrucExcelCSV; ?
></label
>
198 <?php
/* General CSV */ ?
>
199 <div
class="formelementrow">
200 <input type
="radio" name
="what" value
="csv" id
="radio_dump_csv"
204 document.getElementById('csv_options').style.display = 'block';
206 <?php
PMA_exportIsActive('format', 'csv'); ?
> />
207 <label
for="radio_dump_csv"><?php
echo $strStrucCSV;?
></label
>
209 <?php
if (!$hide_xml) { /* XML */ ?
>
210 <div
class="formelementrow">
211 <input type
="radio" name
="what" value
="xml" id
="radio_dump_xml"
215 document.getElementById('none_options').style.display = 'block';
217 <?php
PMA_exportIsActive('format', 'xml'); ?
> />
218 <label
for="radio_dump_xml"><?php
echo $strXML; ?
></label
>
224 <?php
if ( ! $hide_sql ) { /* SQL options */ ?
>
225 <fieldset id
="sql_options">
229 $goto_documentation = '<a href="./Documentation.html#faqexport" target="documentation">';
230 echo ( $cfg['ReplaceHelpImg'] ?
'' : '(' )
231 . $goto_documentation
232 . ( $cfg['ReplaceHelpImg'] ?
233 '<img class="icon" src="' . $pmaThemeImage . 'b_help.png" alt="'
234 .$strDocu . '" width="11" height="11" />'
236 . '</a>' . ($cfg['ReplaceHelpImg'] ?
'' : ')');
239 <div
class="formelementrow">
240 <?php
echo $strAddHeaderComment; ?
>:
241 <input type
="text" name
="header_comment" size
="30"
242 value
="<?php echo $cfg['Export']['sql_header_comment']; ?>" />
245 <div
class="formelementrow">
246 <input type
="checkbox" name
="use_transaction" value
="yes"
247 id
="checkbox_use_transaction"
248 <?php
PMA_exportCheckboxCheck('sql_use_transaction'); ?
> />
249 <label
for="checkbox_use_transaction">
250 <?php
echo $strEncloseInTransaction; ?
></label
>
253 <div
class="formelementrow">
254 <input type
="checkbox" name
="disable_fk" value
="yes"
255 id
="checkbox_disable_fk"
256 <?php
PMA_exportCheckboxCheck('sql_disable_fk'); ?
> />
257 <label
for="checkbox_disable_fk">
258 <?php
echo $strDisableForeignChecks; ?
></label
>
260 <?php
if (PMA_MYSQL_INT_VERSION
>= 40100) { ?
>
261 <label
for="select_sql_compat">
262 <?php
echo $strSQLExportCompatibility; ?
>:</label
>
263 <select name
="sql_compat" id
="select_sql_compat">
265 $compats = array('NONE');
266 if (PMA_MYSQL_INT_VERSION
>= 40101) {
269 $compats[] = 'MAXDB';
270 $compats[] = 'MYSQL323';
271 $compats[] = 'MYSQL40';
272 $compats[] = 'MSSQL';
273 $compats[] = 'ORACLE';
274 $compats[] = 'POSTGRESQL';
275 if (PMA_MYSQL_INT_VERSION
>= 50001) {
276 $compats[] = 'TRADITIONAL';
279 foreach ($compats as $x) {
280 echo '<option value="' . $x . '"'
281 . ($cfg['Export']['sql_compat'] == $x ?
' selected="selected"' : '' )
282 . '>' . $x . '</option>' . "\n";
286 <?php
echo PMA_showMySQLDocu('manual_MySQL_Database_Administration',
287 'Server_SQL_mode') . "\n";
289 <?php
if ( $export_type == 'server' ) { /* For databases */ ?
>
291 <legend
><?php
echo $strDatabaseExportOptions; ?
></legend
>
292 <input type
="checkbox" name
="drop_database" value
="yes"
293 id
="checkbox_drop_database"
294 <?php
PMA_exportCheckboxCheck('sql_drop_database'); ?
> />
295 <label
for="checkbox_drop_database">
296 <?php
echo $strAddDropDatabase; ?
></label
>
298 <?php
} if ( ! $hide_structure ) { /* SQL structure */ ?
>
301 <input type
="checkbox" name
="sql_structure" value
="structure"
302 id
="checkbox_sql_structure"
303 <?php
PMA_exportCheckboxCheck('sql_structure'); ?
>
305 if (!this.checked && !document.getElementById('checkbox_sql_data').checked)
307 else return true;" />
308 <label
for="checkbox_sql_structure">
309 <?php
echo $strStructure; ?
></label
>
312 <input type
="checkbox" name
="drop" value
="1" id
="checkbox_dump_drop"
313 <?php
PMA_exportCheckboxCheck('sql_drop_table'); ?
> />
314 <label
for="checkbox_dump_drop">
315 <?php
echo $strStrucDrop; ?
></label
><br
/>
317 <input type
="checkbox" name
="if_not_exists" value
="1"
318 id
="checkbox_dump_if_not_exists"
319 <?php
PMA_exportCheckboxCheck('sql_if_not_exists'); ?
> />
320 <label
for="checkbox_dump_if_not_exists">
321 <?php
echo $strAddIfNotExists; ?
></label
><br
/>
323 <input type
="checkbox" name
="sql_auto_increment" value
="1"
324 id
="checkbox_auto_increment"
325 <?php
PMA_exportCheckboxCheck('sql_auto_increment'); ?
> />
326 <label
for="checkbox_auto_increment">
327 <?php
echo $strAddAutoIncrement; ?
></label
><br
/>
329 <input type
="checkbox" name
="use_backquotes" value
="1"
330 id
="checkbox_dump_use_backquotes"
331 <?php
PMA_exportCheckboxCheck('sql_backquotes'); ?
> />
332 <label
for="checkbox_dump_use_backquotes">
333 <?php
echo $strUseBackquotes; ?
></label
><br
/>
335 <b
><?php
echo $strAddIntoComments; ?
>:</b
><br
/>
337 <input type
="checkbox" name
="sql_dates" value
="yes"
338 id
="checkbox_sql_dates"
339 <?php
PMA_exportCheckboxCheck('sql_dates'); ?
> />
340 <label
for="checkbox_sql_dates">
341 <?php
echo $strCreationDates; ?
></label
><br
/>
342 <?php
if (!empty($cfgRelation['relation'])) { ?
>
343 <input type
="checkbox" name
="sql_relation" value
="yes"
344 id
="checkbox_sql_use_relation"
345 <?php
PMA_exportCheckboxCheck('sql_relation'); ?
> />
346 <label
for="checkbox_sql_use_relation"><?php
echo $strRelations; ?
></label
><br
/>
347 <?php
} if (!empty($cfgRelation['commwork']) && PMA_MYSQL_INT_VERSION
< 40100) { ?
>
348 <input type
="checkbox" name
="sql_comments" value
="yes"
349 id
="checkbox_sql_use_comments"
350 <?php
PMA_exportCheckboxCheck('sql_comments'); ?
> />
351 <label
for="checkbox_sql_use_comments"><?php
echo $strComments; ?
></label
><br
/>
352 <?php
} if ($cfgRelation['mimework']) { ?
>
353 <input type
="checkbox" name
="sql_mime" value
="yes"
354 id
="checkbox_sql_use_mime"
355 <?php
PMA_exportCheckboxCheck('sql_mime'); ?
> />
356 <label
for="checkbox_sql_use_mime"><?php
echo $strMIME_MIMEtype; ?
></label
><br
/>
360 } /* end SQL STRUCTURE */
365 <input type
="checkbox" name
="sql_data" value
="data"
366 id
="checkbox_sql_data" <?php
PMA_exportCheckboxCheck('sql_data'); ?
>
368 if (!this.checked && (!document.getElementById('checkbox_sql_structure') || !document.getElementById('checkbox_sql_structure').checked))
370 else return true;" />
371 <label
for="checkbox_sql_data">
372 <?php
echo $strData; ?
></label
>
374 <input type
="checkbox" name
="showcolumns" value
="yes"
375 id
="checkbox_dump_showcolumns"
376 <?php
PMA_exportCheckboxCheck('sql_columns'); ?
> />
377 <label
for="checkbox_dump_showcolumns">
378 <?php
echo $strCompleteInserts; ?
></label
><br
/>
380 <input type
="checkbox" name
="extended_ins" value
="yes"
381 id
="checkbox_dump_extended_ins"
382 <?php
PMA_exportCheckboxCheck('sql_extended'); ?
> />
383 <label
for="checkbox_dump_extended_ins">
384 <?php
echo $strExtendedInserts; ?
></label
><br
/>
386 <label
for="input_max_query_size">
387 <?php
echo $strMaximalQueryLength; ?
>:</label
>
388 <input type
="text" name
="max_query_size" id
="input_max_query_size"
389 value
="<?php echo $cfg['Export']['sql_max_query_size'];?>" /><br
/>
391 <input type
="checkbox" name
="delayed" value
="yes"
392 id
="checkbox_dump_delayed"
393 <?php
PMA_exportCheckboxCheck('sql_delayed'); ?
> />
394 <label
for="checkbox_dump_delayed">
395 <?php
echo $strDelayedInserts; ?
></label
><br
/>
397 <input type
="checkbox" name
="sql_ignore" value
="yes"
398 id
="checkbox_dump_ignore"
399 <?php
PMA_exportCheckboxCheck('sql_ignore'); ?
> />
400 <label
for="checkbox_dump_ignore">
401 <?php
echo $strIgnoreInserts; ?
></label
><br
/>
403 <input type
="checkbox" name
="hexforbinary" value
="yes"
404 id
="checkbox_hexforbinary"
405 <?php
PMA_exportCheckboxCheck('sql_hex_for_binary'); ?
> />
406 <label
for="checkbox_hexforbinary">
407 <?php
echo $strHexForBinary; ?
></label
><br
/>
409 <label
for="select_sql_type">
410 <?php
echo $strSQLExportType; ?
>:</label
>
411 <select name
="sql_type" id
="select_sql_type">
412 <option value
="insert"<?php
echo $cfg['Export']['sql_type'] == 'insert' ?
' selected="selected"' : ''; ?
>>INSERT
</option
>
413 <option value
="update"<?php
echo $cfg['Export']['sql_type'] == 'update' ?
' selected="selected"' : ''; ?
>>UPDATE
</option
>
414 <option value
="replace"<?php
echo $cfg['Export']['sql_type'] == 'replace' ?
' selected="selected"' : ''; ?
>>REPLACE
</option
>
422 <?php
/* LaTeX options */ ?
>
423 <fieldset id
="latex_options">
424 <legend
><?php
echo $strLaTeXOptions; ?
></legend
>
426 <div
class="formelementrow">
427 <input type
="checkbox" name
="latex_caption" value
="yes"
428 id
="checkbox_latex_show_caption"
429 <?php
PMA_exportCheckboxCheck('latex_caption'); ?
> />
430 <label
for="checkbox_latex_show_caption">
431 <?php
echo $strLatexIncludeCaption; ?
></label
>
434 <?php
if ( ! $hide_structure ) { /* LaTeX structure */ ?
>
437 <input type
="checkbox" name
="latex_structure" value
="structure"
438 id
="checkbox_latex_structure"
439 <?php
PMA_exportCheckboxCheck('latex_structure'); ?
>
441 if (!this.checked && !document.getElementById('checkbox_latex_data').checked)
443 else return true;" />
444 <label
for="checkbox_latex_structure">
445 <?php
echo $strStructure; ?
></label
>
449 <tr
><td
><label
for="latex_structure_caption">
450 <?php
echo $strLatexCaption; ?
></label
></td
>
451 <td
><input type
="text" name
="latex_structure_caption" size
="30"
452 value
="<?php echo $strLatexStructure; ?>"
453 id
="latex_structure_caption" />
456 <tr
><td
><label
for="latex_structure_continued_caption">
457 <?php
echo $strLatexContinuedCaption; ?
></label
></td
>
458 <td
><input type
="text" name
="latex_structure_continued_caption"
459 value
="<?php echo $strLatexStructure . ' ' . $strLatexContinued; ?>"
460 size
="30" id
="latex_structure_continued_caption" />
463 <tr
><td
><label
for="latex_structure_label">
464 <?php
echo $strLatexLabel; ?
></label
></td
>
465 <td
><input type
="text" name
="latex_structure_label" size
="30"
466 value
="<?php echo $cfg['Export']['latex_structure_label']; ?>"
467 id
="latex_structure_label" />
472 <?php
if ( ! empty( $cfgRelation['relation']) ) { ?
>
473 <input type
="checkbox" name
="latex_relation" value
="yes"
474 id
="checkbox_latex_use_relation"
475 <?php
PMA_exportCheckboxCheck('latex_relation'); ?
> />
476 <label
for="checkbox_latex_use_relation">
477 <?php
echo $strRelations; ?
></label
><br
/>
478 <?php
} if ( $cfgRelation['commwork'] ) { ?
>
479 <input type
="checkbox" name
="latex_comments" value
="yes"
480 id
="checkbox_latex_use_comments"
481 <?php
PMA_exportCheckboxCheck('latex_comments'); ?
> />
482 <label
for="checkbox_latex_use_comments">
483 <?php
echo $strComments; ?
></label
><br
/>
484 <?php
} if ( $cfgRelation['mimework'] ) { ?
>
485 <input type
="checkbox" name
="latex_mime" value
="yes"
486 id
="checkbox_latex_use_mime"
487 <?php
PMA_exportCheckboxCheck('latex_mime'); ?
> />
488 <label
for="checkbox_latex_use_mime">
489 <?php
echo $strMIME_MIMEtype; ?
></label
><br
/>
493 } // end LaTeX STRUCTURE
498 <input type
="checkbox" name
="latex_data" value
="data"
499 id
="checkbox_latex_data"
500 <?php
PMA_exportCheckboxCheck('latex_data'); ?
>
502 if (!this.checked && (!document.getElementById('checkbox_latex_structure') || !document.getElementById('checkbox_latex_structure').checked))
504 else return true;" />
505 <label
for="checkbox_latex_data">
506 <?php
echo $strData; ?
></label
>
508 <input type
="checkbox" name
="latex_showcolumns" value
="yes"
509 id
="ch_latex_showcolumns"
510 <?php
PMA_exportCheckboxCheck('latex_columns'); ?
> />
511 <label
for="ch_latex_showcolumns">
512 <?php
echo $strColumnNames; ?
></label
><br
/>
514 <tr
><td
><label
for="latex_data_caption">
515 <?php
echo $strLatexCaption; ?
></label
></td
>
516 <td
><input type
="text" name
="latex_data_caption" size
="30"
517 value
="<?php echo $strLatexContent; ?>"
518 id
="latex_data_caption" />
521 <tr
><td
><label
for="latex_data_continued_caption">
522 <?php
echo $strLatexContinuedCaption; ?
></label
></td
>
523 <td
><input type
="text" name
="latex_data_continued_caption" size
="30"
524 value
="<?php echo $strLatexContent . ' ' . $strLatexContinued; ?>"
525 id
="latex_data_continued_caption" />
528 <tr
><td
><label
for="latex_data_label">
529 <?php
echo $strLatexLabel; ?
></label
></td
>
530 <td
><input type
="text" name
="latex_data_label" size
="30"
531 value
="<?php echo $cfg['Export']['latex_data_label']; ?>"
532 id
="latex_data_label" />
535 <tr
><td
><label
for="latex_replace_null">
536 <?php
echo $strReplaceNULLBy; ?
></label
></td
>
537 <td
><input type
="text" name
="latex_replace_null" size
="20"
538 value
="<?php echo $cfg['Export']['latex_null']; ?>"
539 id
="latex_replace_null" />
546 <?php
/* CSV options */ ?
>
547 <fieldset id
="csv_options">
548 <input type
="hidden" name
="csv_data" value
="csv_data" />
549 <legend
><?php
echo $strCSVOptions; ?
></legend
>
552 <tr
><td
><label
for="export_separator">
553 <?php
echo $strFieldsTerminatedBy; ?
></label
></td
>
554 <td
><input type
="text" name
="export_separator" size
="2"
555 id
="export_separator"
556 value
="<?php echo $cfg['Export']['csv_separator']; ?>" />
559 <tr
><td
><label
for="enclosed">
560 <?php
echo $strFieldsEnclosedBy; ?
></label
></td
>
561 <td
><input type
="text" name
="enclosed" size
="2"
563 value
="<?php echo $cfg['Export']['csv_enclosed']; ?>" />
566 <tr
><td
><label
for="escaped">
567 <?php
echo $strFieldsEscapedBy; ?
></label
></td
>
568 <td
><input type
="text" name
="escaped" size
="2"
570 value
="<?php echo $cfg['Export']['csv_escaped']; ?>" />
573 <tr
><td
><label
for="add_character">
574 <?php
echo $strLinesTerminatedBy; ?
></label
></td
>
575 <td
><input type
="text" name
="add_character" size
="2"
577 value
="<?php if ($cfg['Export']['csv_terminated'] == 'AUTO') echo ((PMA_whichCrlf() == "\n
") ? '\n' : '\r\n'); else echo $cfg['Export']['csv_terminated']; ?>" />
580 <tr
><td
><label
for="csv_replace_null">
581 <?php
echo $strReplaceNULLBy; ?
></label
></td
>
582 <td
><input type
="text" name
="csv_replace_null" size
="20"
583 id
="csv_replace_null"
584 value
="<?php echo $cfg['Export']['csv_null']; ?>" />
588 <input type
="checkbox" name
="showcsvnames" value
="yes"
589 id
="checkbox_dump_showcsvnames"
590 <?php
PMA_exportCheckboxCheck('csv_columns'); ?
> />
591 <label
for="checkbox_dump_showcsvnames">
592 <?php
echo $strPutColNames; ?
></label
>
595 <?php
/* Excel options */ ?
>
596 <fieldset id
="excel_options">
597 <input type
="hidden" name
="excel_data" value
="excel_data" />
598 <legend
><?php
echo $strExcelOptions; ?
></legend
>
601 <tr
><td
><label
for="excel_replace_null">
602 <?php
echo $strReplaceNULLBy; ?
></label
>
604 <td
><input type
="text" name
="excel_replace_null" size
="20"
605 id
="excel_replace_null"
606 value
="<?php echo $cfg['Export']['excel_null']; ?>" />
609 <tr
><td
><label
for="select_excel_edition">
610 <?php
echo $strExcelEdition; ?
>:
613 <td
><select name
="excel_edition" id
="select_excel_edition">
614 <option value
="win"<?php
echo $cfg['Export']['excel_edition'] == 'win' ?
' selected="selected"' : ''; ?
>>Windows
</option
>
615 <option value
="mac"<?php
echo $cfg['Export']['excel_edition'] == 'mac' ?
' selected="selected"' : ''; ?
>>Excel
2003 / Macintosh
</option
>
621 <input type
="checkbox" name
="showexcelnames" value
="yes"
622 id
="checkbox_dump_showexcelnames"
623 <?php
PMA_exportCheckboxCheck('excel_columns'); ?
> />
624 <label
for="checkbox_dump_showexcelnames">
625 <?php
echo $strPutColNames; ?
></label
>
628 <?php
/* HTML Excel options */ ?
>
629 <fieldset id
="htmlexcel_options">
630 <input type
="hidden" name
="htmlexcel_data" value
="htmlexcel_data" />
631 <legend
><?php
echo $strHTMLExcelOptions; ?
></legend
>
633 <div
class="formelementrow">
634 <label
for="htmlexcel_replace_null"><?php
echo $strReplaceNULLBy; ?
></label
>
635 <input type
="text" name
="htmlexcel_replace_null" size
="20"
636 value
="<?php echo $cfg['Export']['htmlexcel_null']; ?>"
637 id
="htmlexcel_replace_null" />
640 <div
class="formelementrow">
641 <input type
="checkbox" name
="htmlexcel_shownames" value
="yes"
642 id
="checkbox_dump_htmlexcel_shownames"
643 <?php
PMA_exportCheckboxCheck('htmlexcel_columns'); ?
> />
644 <label
for="checkbox_dump_htmlexcel_shownames">
645 <?php
echo $strPutColNames; ?
></label
>
649 <?php
/* HTML Word options */ ?
>
650 <fieldset id
="htmlword_options">
651 <legend
><?php
echo $strHTMLWordOptions; ?
></legend
>
653 <div
class="formelementrow">
654 <input type
="checkbox" name
="htmlword_structure" value
="structure"
655 id
="checkbox_htmlword_structure"
656 <?php
PMA_exportCheckboxCheck('htmlword_structure'); ?
>
658 if (!this.checked && (!document.getElementById('checkbox_htmlword_data') || !document.getElementById('checkbox_htmlword_data').checked))
660 else return true;" />
661 <label
for="checkbox_htmlword_structure">
662 <?php
echo $strStructure; ?
></label
>
667 <input type
="checkbox" name
="htmlword_data" value
="data"
668 id
="checkbox_htmlword_data"
669 <?php
PMA_exportCheckboxCheck('htmlword_data'); ?
>
671 if (!this.checked && (!document.getElementById('checkbox_htmlword_structure') || !document.getElementById('checkbox_htmlword_structure').checked))
673 else return true;" />
674 <label
for="checkbox_htmlword_data">
675 <?php
echo $strData; ?
></label
>
678 <div
class="formelementrow">
679 <label
for="htmlword_replace_null">
680 <?php
echo $strReplaceNULLBy; ?
></label
>
681 <input id
="htmlword_replace_null" type
="text" size
="20"
682 name
="htmlword_replace_null"
683 value
="<?php echo $cfg['Export']['htmlword_null']; ?>" />
686 <div
class="formelementrow">
687 <input type
="checkbox" name
="htmlword_shownames" value
="yes"
688 id
="checkbox_dump_htmlword_shownames"
689 <?php
PMA_exportCheckboxCheck('htmlword_columns'); ?
> />
690 <label
for="checkbox_dump_htmlword_shownames">
691 <?php
echo $strPutColNames; ?
></label
>
696 <?php
if ( $xls ) { /* Native Excel options */ ?
>
697 <fieldset id
="xls_options">
698 <input type
="hidden" name
="xls_data" value
="xls_data" />
699 <legend
><?php
echo $strExcelOptions; ?
></legend
>
701 <div
class="formelementrow">
702 <label
for="xls_replace_null"><?php
echo $strReplaceNULLBy; ?
></label
>
703 <input type
="text" name
="xls_replace_null" size
="20"
704 value
="<?php echo $cfg['Export']['xls_null']; ?>"
705 id
="xls_replace_null" />
708 <div
class="formelementrow">
709 <input type
="checkbox" name
="xls_shownames" value
="yes"
710 id
="checkbox_dump_xls_shownames"
711 <?php
PMA_exportCheckboxCheck('xls_columns'); ?
> />
712 <label
for="checkbox_dump_xls_shownames">
713 <?php
echo $strPutColNames; ?
></label
>
716 <?php
} /* end if ( $xls ) */ ?
>
718 <fieldset id
="none_options">
719 <legend
><?php
echo $strXML; ?
></legend
>
720 <?php
echo $strNoOptions; ?
>
721 <input type
="hidden" name
="xml_data" value
="xml_data" />
724 <script type
="text/javascript">
726 show_checked_option();
730 <?php
if ( ! empty( $table ) && ! isset( $num_tables ) ) { ?
>
731 <div
class="formelementrow">
733 echo sprintf( $strDumpXRows,
734 '<input type="text" name="limit_to" size="5" value="'
735 . ( isset( $unlim_num_rows ) ?
$unlim_num_rows : PMA_countRecords( $db, $table, TRUE ) )
736 . '" onfocus="this.select()" />',
737 '<input type="text" name="limit_from" value="0" size="5"'
738 .' onfocus="this.select()" /> ');
746 <input type
="checkbox" name
="asfile" value
="sendit"
747 id
="checkbox_dump_asfile" <?php
PMA_exportCheckboxCheck('asfile'); ?
> />
748 <label
for="checkbox_dump_asfile"><?php
echo $strSend; ?
></label
>
751 <?php
if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) { ?
>
752 <input type
="checkbox" name
="onserver" value
="saveit"
753 id
="checkbox_dump_onserver"
754 onclick
="document.getElementById('checkbox_dump_asfile').checked = true;"
755 <?php
PMA_exportCheckboxCheck('onserver'); ?
> />
756 <label
for="checkbox_dump_onserver">
757 <?php
echo sprintf($strSaveOnServer, htmlspecialchars(PMA_userDir($cfg['SaveDir']))); ?
>
759 <input type
="checkbox" name
="onserverover" value
="saveitover"
760 id
="checkbox_dump_onserverover"
761 onclick
="document.getElementById('checkbox_dump_onserver').checked = true;
762 document.getElementById('checkbox_dump_asfile').checked = true;"
763 <?php
PMA_exportCheckboxCheck('onserver_overwrite'); ?
> />
764 <label
for="checkbox_dump_onserverover">
765 <?php
echo $strOverwriteExisting; ?
></label
>
769 <label
for="filename_template">
770 <?php
echo $strFileNameTemplate; ?
>
771 <sup
>(1)</sup
></label
>:
772 <input type
="text" name
="filename_template" id
="filename_template"
775 if ($export_type == 'database') {
776 if (isset($_COOKIE) && !empty($_COOKIE['pma_db_filename_template'])) {
777 echo $_COOKIE['pma_db_filename_template'];
779 echo $GLOBALS['cfg']['Export']['file_template_database'];
781 } elseif ($export_type == 'table') {
782 if (isset($_COOKIE) && !empty($_COOKIE['pma_table_filename_template'])) {
783 echo $_COOKIE['pma_table_filename_template'];
785 echo $GLOBALS['cfg']['Export']['file_template_table'];
788 if (isset($_COOKIE) && !empty($_COOKIE['pma_server_filename_template'])) {
789 echo $_COOKIE['pma_server_filename_template'];
791 echo $GLOBALS['cfg']['Export']['file_template_server'];
798 <input type
="checkbox" name
="remember_template"
799 id
="checkbox_remember_template"
800 <?php
PMA_exportCheckboxCheck('remember_file_template'); ?
> />
801 <label
for="checkbox_remember_template">
802 <?php
echo $strFileNameTemplateRemember; ?
></label
>
805 <div
class="formelementrow">
808 if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
809 echo ' <label for="select_charset_of_file">'
810 . $strCharsetOfFile . '</label>' . "\n";
812 $temp_charset = reset($cfg['AvailableCharsets']);
813 echo ' <select id="select_charset_of_file" name="charset_of_file" size="1">' . "\n";
814 foreach($cfg['AvailableCharsets'] as $key => $temp_charset) {
815 echo ' <option value="' . $temp_charset . '"';
816 if ((empty($cfg['Export']['charset']) && $temp_charset == $charset)
817 ||
$temp_charset == $cfg['Export']['charset']) {
818 echo ' selected="selected"';
820 echo '>' . $temp_charset . '</option>' . "\n";
828 // zip, gzip and bzip2 encode features
829 $is_zip = ( $cfg['ZipDump'] && @function_exists
('gzcompress') );
830 $is_gzip = ( $cfg['GZipDump'] && @function_exists
('gzencode') );
831 $is_bzip = ( $cfg['BZipDump'] && @function_exists
('bzcompress') );
833 if ( $is_zip ||
$is_gzip ||
$is_bzip ) { ?
>
834 <div
class="formelementrow">
835 <?php
echo $strCompression; ?
>:
836 <input type
="radio" name
="compression" value
="none"
837 id
="radio_compression_none"
838 onclick
="document.getElementById('checkbox_dump_asfile').checked = true;"
839 <?php
PMA_exportIsActive('compression', 'none'); ?
> />
840 <label
for="radio_compression_none"><?php
echo $strNone; ?
></label
>
843 <input type
="radio" name
="compression" value
="zip"
844 id
="radio_compression_zip"
845 onclick
="document.getElementById('checkbox_dump_asfile').checked = true;"
846 <?php
PMA_exportIsActive('compression', 'zip'); ?
> />
847 <label
for="radio_compression_zip"><?php
echo $strZip; ?
></label
>
848 <?php
} if ($is_gzip) { ?
>
849 <input type
="radio" name
="compression" value
="gzip"
850 id
="radio_compression_gzip"
851 onclick
="document.getElementById('checkbox_dump_asfile').checked = true;"
852 <?php
PMA_exportIsActive('compression', 'gzip'); ?
> />
853 <label
for="radio_compression_gzip"><?php
echo $strGzip; ?
></label
>
854 <?php
} if ($is_bzip) { ?
>
855 <input type
="radio" name
="compression" value
="bzip"
856 id
="radio_compression_bzip"
857 onclick
="document.getElementById('checkbox_dump_asfile').checked = true;"
858 <?php
PMA_exportIsActive('compression', 'bzip2'); ?
> />
859 <label
for="radio_compression_bzip"><?php
echo $strBzip; ?
></label
>
863 <input type
="hidden" name
="compression" value
="none" />
867 <?php
if (function_exists('PMA_set_enc_form')) { ?
>
868 <!-- Encoding setting form appended by Y
.Kawada
-->
869 <!-- Japanese encoding setting
-->
871 <?php
echo PMA_set_enc_form(' '); ?
>
875 <fieldset
class="tblFooters">
876 <input type
="submit" value
="<?php echo $strGo; ?>" id
="buttonGo" />
881 <sup id
="FileNameTemplateHelp" name
="FileNameTemplateHelp">(1)</sup
> <?php
echo sprintf($strFileNameTemplateHelp,
882 '<a href="http://www.php.net/strftime" target="documentation" title="'
883 . $strDocu . '">', '</a>'); ?
>