update
[phpmyadmin/crack.git] / tbl_properties_export.php3
blobdb85d3759e1c9311de53ba0ad174f26fccd0a29a
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Gets tables informations and displays top links
8 */
9 require('./tbl_properties_common.php3');
10 $url_query .= '&amp;goto=tbl_properties_export.php3&amp;back=tbl_properties_export.php3';
11 require('./tbl_properties_table_info.php3');
14 <!-- Dump of a table -->
15 <p align="center">
16 <?php echo $strViewDump . "\n"; ?>
17 </p>
19 <form method="post" action="tbl_dump.php3" name="tbl_dump">
20 <?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
21 <table cellpadding="5" border="2" align="center">
22 <tr>
24 <!-- Formats to export to -->
25 <td nowrap="nowrap">
26 <!-- SQL -->
27 <input type="radio" name="what" value="structure" id="radio_dump_structure" checked="checked" />
28 <label for="radio_dump_structure"><?php echo $strStrucOnly; ?></label>&nbsp;&nbsp;<br />
29 <input type="radio" name="what" value="data" id="radio_dump_data" />
30 <label for="radio_dump_data"><?php echo $strStrucData; ?></label>&nbsp;&nbsp;<br />
31 <input type="radio" name="what" value="dataonly" id="radio_dump_dataonly" />
32 <label for="radio_dump_dataonly"><?php echo $strDataOnly; ?></label>&nbsp;&nbsp;<br />
33 <br />
35 <!-- LaTeX table -->
36 <input type="radio" name="what" value="latex" id="radio_dump_latex" />
37 <label for="radio_dump_latex"><?php echo $strLaTeX; ?></label> &nbsp; &nbsp;
38 <!-- for now we have only one environment supported -->
39 <input type="hidden" name="environment" value="longtable" />
40 <?php /*
41 <select name="environment">
42 <option value="longtable" selected><?php echo $strLaTeXMultipageTable; ?></option>
43 <option value="sideways"><?php echo $strLaTeXSidewaysTable; ?></option>
44 <option value="table"><?php echo $strLaTeXStandardTable; ?></option>
45 </select>
46 */ ?>
47 <br /><br />
49 <!-- Excel CSV -->
50 <input type="radio" name="what" value="excel" id="radio_dump_excel" />
51 <label for="radio_dump_excel"><?php echo $strStrucExcelCSV; ?></label>&nbsp;&nbsp;<br />
52 <br />
53 <!-- General CSV -->
54 <input type="radio" name="what" value="csv" id="radio_dump_csv" />
55 <label for="radio_dump_csv"><?php echo $strStrucCSV;?></label>&nbsp;:<br />
56 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsTerminatedBy; ?>&nbsp;
57 <input type="text" name="separator" size="2" value=";" class="textfield" />&nbsp;&nbsp;<br />
58 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEnclosedBy; ?>&nbsp;
59 <input type="text" name="enclosed" size="1" value="&quot;" class="textfield" />&nbsp;&nbsp;<br />
60 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEscapedBy; ?>&nbsp;
61 <input type="text" name="escaped" size="2" value="\" class="textfield" />&nbsp;&nbsp;<br />
62 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strLinesTerminatedBy; ?>&nbsp;
63 <input type="text" name="add_character" size="2" value="<?php echo ((PMA_whichCrlf() == "\n") ? '\n' : '\r\n'); ?>" class="textfield" />&nbsp;&nbsp;<br />
64 <br />
65 <!-- XML -->
66 <input type="radio" name="what" value="xml" id="radio_dump_xml" />
67 <label for="radio_dump_xml"><?php echo $strExportToXML; ?></label>&nbsp;&nbsp;
68 </td>
70 <!-- Options -->
71 <td valign="middle">
72 <!-- For structure -->
73 <?php echo $strStructure; ?><br />
74 &nbsp;&nbsp;
75 <input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" />
76 <label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label><br />
77 <?php
78 // Add backquotes checkbox
79 if (PMA_MYSQL_INT_VERSION >= 32306) {
81 &nbsp;&nbsp;
82 <input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" />
83 <label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label><br />
84 <?php
85 } // end backquotes feature
86 echo "\n";
88 <br />
89 <!-- For data -->
90 <?php echo $strData; ?><br />
91 &nbsp;&nbsp;
92 <input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" />
93 <label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label><br />
94 &nbsp;&nbsp;
95 <input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" />
96 <label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label><br />
97 &nbsp;&nbsp;
98 <?php echo sprintf($strDumpXRows , '<input type="text" name="limit_to" size="5" value="' . 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"; ?>
99 <br /><br />
100 <!-- For CSV data -->
101 <?php echo $strStrucCSV; ?><br />
102 &nbsp;&nbsp;
103 <input type="checkbox" name="showcsvnames" value="yes" id="checkbox_dump_showcsvnames" />
104 <label for="checkbox_dump_showcsvnames"><?php echo $strPutColNames; ?></label>
105 </td>
106 </tr>
108 <tr>
109 <!-- Export to screen or to file -->
110 <td colspan="2" align="center">
111 <input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" onclick="return checkTransmitDump(this.form, 'transmit')" />
112 <label for="checkbox_dump_asfile"><?php echo $strSend; ?></label>
113 <?php
114 // charset of file
115 if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
116 $temp_charset = reset($cfg['AvailableCharsets']);
117 echo "\n" . ' , ' . $strCharsetOfFile . "\n"
118 . ' <select name="charset_of_file" size="1">' . "\n"
119 . ' <option value="' . $temp_charset . '"';
120 if ($temp_charset == $charset) {
121 echo ' selected="selected"';
123 echo '>' . $temp_charset . '</option>' . "\n";
124 while ($temp_charset = next($cfg['AvailableCharsets'])) {
125 echo ' <option value="' . $temp_charset . '"';
126 if ($temp_charset == $charset) {
127 echo ' selected="selected"';
129 echo '>' . $temp_charset . '</option>' . "\n";
130 } // end while
131 echo ' </select>';
132 } // end if
133 echo "\n";
135 // zip, gzip and bzip2 encode features
136 if (PMA_PHP_INT_VERSION >= 40004) {
137 $is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
138 $is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
139 $is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
140 if ($is_zip || $is_gzip || $is_bzip) {
141 echo "\n" . ' (' . "\n";
142 if ($is_zip) {
144 <input type="checkbox" name="zip" value="zip" id="checkbox_dump_zip" onclick="return checkTransmitDump(this.form, 'zip')" />
145 <?php echo '<label for="checkbox_dump_zip">' . $strZip . '</label>' . (($is_gzip || $is_bzip) ? '&nbsp;' : '') . "\n"; ?>
146 <?php
148 if ($is_gzip) {
149 echo "\n"
151 <input type="checkbox" name="gzip" value="gzip" id="checkbox_dump_gzip" onclick="return checkTransmitDump(this.form, 'gzip')" />
152 <?php echo '<label for="checkbox_dump_gzip">' . $strGzip . '</label>' . (($is_bzip) ? '&nbsp;' : '') . "\n"; ?>
153 <?php
155 if ($is_bzip) {
156 echo "\n"
158 <input type="checkbox" name="bzip" value="bzip" id="checkbox_dump_bzip" onclick="return checkTransmitDump(this.form, 'bzip')" />
159 <?php echo '<label for="checkbox_dump_bzip">' . $strBzip . '</label>' . "\n"; ?>
160 <?php
162 echo "\n" . ' )';
165 echo "\n";
167 </td>
168 </tr>
170 <?php
171 // Encoding setting form appended by Y.Kawada
172 if (function_exists('PMA_set_enc_form')) {
174 <tr>
175 <!-- Japanese encoding setting -->
176 <td colspan="2" align="center">
177 <?php
178 echo PMA_set_enc_form(' ');
180 </td>
181 </tr>
182 <?php
184 echo "\n";
187 <tr>
188 <td colspan="2" align="center">
189 <input type="submit" value="<?php echo $strGo; ?>" />
190 </td>
191 </tr>
192 </table>
193 </form>
195 <p align="center">
196 <a href="./Documentation.html#faqexport" target="documentation"><?php echo $strDocu; ?></a>
197 </p>
200 <?php
202 * Displays the footer
204 require('./footer.inc.php3');