bug 619097
[phpmyadmin/crack.git] / tbl_properties_export.php3
blob1bbfae85103b2bdca3d2cf18c9469b29e03f27dc
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 <input type="hidden" name="server" value="<?php echo $server; ?>" />
21 <input type="hidden" name="lang" value="<?php echo $lang; ?>" />
22 <input type="hidden" name="convcharset" value="<?php echo $convcharset; ?>" />
23 <input type="hidden" name="db" value="<?php echo htmlspecialchars($db); ?>" />
24 <input type="hidden" name="table" value="<?php echo htmlspecialchars($table); ?>" />
25 <table cellpadding="5" border="2" align="center">
26 <tr>
28 <!-- Formats to export to -->
29 <td nowrap="nowrap">
30 <!-- SQL -->
31 <input type="radio" name="what" value="structure" id="radio_dump_structure" checked="checked" />
32 <label for="radio_dump_structure"><?php echo $strStrucOnly; ?></label>&nbsp;&nbsp;<br />
33 <input type="radio" name="what" value="data" id="radio_dump_data" />
34 <label for="radio_dump_data"><?php echo $strStrucData; ?></label>&nbsp;&nbsp;<br />
35 <input type="radio" name="what" value="dataonly" id="radio_dump_dataonly" />
36 <label for="radio_dump_dataonly"><?php echo $strDataOnly; ?></label>&nbsp;&nbsp;<br />
37 <br />
38 <!-- Excel CSV -->
39 <input type="radio" name="what" value="excel" id="radio_dump_excel" />
40 <label for="radio_dump_excel"><?php echo $strStrucExcelCSV; ?></label>&nbsp;&nbsp;<br />
41 <br />
42 <!-- General CSV -->
43 <input type="radio" name="what" value="csv" id="radio_dump_csv" />
44 <label for="radio_dump_csv"><?php echo $strStrucCSV;?></label>&nbsp;:<br />
45 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsTerminatedBy; ?>&nbsp;
46 <input type="text" name="separator" size="2" value=";" class="textfield" />&nbsp;&nbsp;<br />
47 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEnclosedBy; ?>&nbsp;
48 <input type="text" name="enclosed" size="1" value="&quot;" class="textfield" />&nbsp;&nbsp;<br />
49 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEscapedBy; ?>&nbsp;
50 <input type="text" name="escaped" size="2" value="\" class="textfield" />&nbsp;&nbsp;<br />
51 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strLinesTerminatedBy; ?>&nbsp;
52 <input type="text" name="add_character" size="2" value="<?php echo ((PMA_whichCrlf() == "\n") ? '\n' : '\r\n'); ?>" class="textfield" />&nbsp;&nbsp;<br />
53 <br />
54 <!-- XML -->
55 <input type="radio" name="what" value="xml" id="radio_dump_xml" />
56 <label for="radio_dump_xml"><?php echo $strExportToXML; ?></label>&nbsp;&nbsp;
57 </td>
59 <!-- Options -->
60 <td valign="middle">
61 <!-- For structure -->
62 <?php echo $strStructure; ?><br />
63 &nbsp;&nbsp;
64 <input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" />
65 <label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label><br />
66 <?php
67 // Add backquotes checkbox
68 if (PMA_MYSQL_INT_VERSION >= 32306) {
70 &nbsp;&nbsp;
71 <input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" />
72 <label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label><br />
73 <?php
74 } // end backquotes feature
75 echo "\n";
77 <br />
78 <!-- For data -->
79 <?php echo $strData; ?><br />
80 &nbsp;&nbsp;
81 <input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" />
82 <label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label><br />
83 &nbsp;&nbsp;
84 <input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" />
85 <label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label><br />
86 &nbsp;&nbsp;
87 <?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"; ?>
88 <br /><br />
89 <!-- For CSV data -->
90 <?php echo $strStrucCSV; ?><br />
91 &nbsp;&nbsp;
92 <input type="checkbox" name="showcsvnames" value="yes" id="checkbox_dump_showcsvnames" />
93 <label for="checkbox_dump_showcsvnames"><?php echo $strPutColNames; ?></label>
94 </td>
95 </tr>
97 <tr>
98 <!-- Export to screen or to file -->
99 <td colspan="2" align="center">
100 <input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" onclick="return checkTransmitDump(this.form, 'transmit')" />
101 <label for="checkbox_dump_asfile"><?php echo $strSend; ?></label>
102 <?php
103 // charset of file
104 if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
105 $temp_charset = reset($cfg['AvailableCharsets']);
106 echo "\n" . ' , ' . $strCharsetOfFile . "\n"
107 . ' <select name="charset_of_file" size="1">' . "\n"
108 . ' <option value="' . $temp_charset . '"';
109 if ($temp_charset == $charset) {
110 echo ' selected="selected"';
112 echo '>' . $temp_charset . '</option>' . "\n";
113 while ($temp_charset = next($cfg['AvailableCharsets'])) {
114 echo ' <option value="' . $temp_charset . '"';
115 if ($temp_charset == $charset) {
116 echo ' selected="selected"';
118 echo '>' . $temp_charset . '</option>' . "\n";
119 } // end while
120 echo ' </select>';
121 } // end if
122 echo "\n";
124 // zip, gzip and bzip2 encode features
125 if (PMA_PHP_INT_VERSION >= 40004) {
126 $is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
127 $is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
128 $is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
129 if ($is_zip || $is_gzip || $is_bzip) {
130 echo "\n" . ' (' . "\n";
131 if ($is_zip) {
133 <input type="checkbox" name="zip" value="zip" id="checkbox_dump_zip" onclick="return checkTransmitDump(this.form, 'zip')" />
134 <?php echo '<label for="checkbox_dump_zip">' . $strZip . '</label>' . (($is_gzip || $is_bzip) ? '&nbsp;' : '') . "\n"; ?>
135 <?php
137 if ($is_gzip) {
138 echo "\n"
140 <input type="checkbox" name="gzip" value="gzip" id="checkbox_dump_gzip" onclick="return checkTransmitDump(this.form, 'gzip')" />
141 <?php echo '<label for="checkbox_dump_gzip">' . $strGzip . '</label>' . (($is_bzip) ? '&nbsp;' : '') . "\n"; ?>
142 <?php
144 if ($is_bzip) {
145 echo "\n"
147 <input type="checkbox" name="bzip" value="bzip" id="checkbox_dump_bzip" onclick="return checkTransmitDump(this.form, 'bzip')" />
148 <?php echo '<label for="checkbox_dump_bzip">' . $strBzip . '</label>' . "\n"; ?>
149 <?php
151 echo "\n" . ' )';
154 echo "\n";
156 </td>
157 </tr>
159 <?php
160 // Encoding setting form appended by Y.Kawada
161 if (function_exists('PMA_set_enc_form')) {
163 <tr>
164 <!-- Japanese encoding setting -->
165 <td colspan="2" align="center">
166 <?php
167 echo PMA_set_enc_form(' ');
169 </td>
170 </tr>
171 <?php
173 echo "\n";
176 <tr>
177 <td colspan="2" align="center">
178 <input type="submit" value="<?php echo $strGo; ?>" />
179 </td>
180 </tr>
181 </table>
182 </form>
184 <p align="center">
185 <a href="./Documentation.html#faqexport" target="documentation"><?php echo $strDocu; ?></a>
186 </p>
189 <?php
191 * Displays the footer
193 require('./footer.inc.php3');