some updates
[phpmyadmin/crack.git] / tbl_properties_export.php3
blobf52d0d50aa56b4c77072614234864745b4daf3ea
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 />
39 <!-- LaTeX table -->
40 <input type="radio" name="what" value="latex" id="radio_dump_latex" />
41 <label for="radio_dump_latex"><?php echo $strLaTeX; ?></label> &nbsp; &nbsp;
42 <!-- for now we have only one environment supported -->
43 <input type="hidden" name="environment" value="longtable" />
44 <?php /*
45 <select name="environment">
46 <option value="longtable" selected><?php echo $strLaTeXMultipageTable; ?></option>
47 <option value="sideways"><?php echo $strLaTeXSidewaysTable; ?></option>
48 <option value="table"><?php echo $strLaTeXStandardTable; ?></option>
49 </select>
50 */ ?>
51 <br /><br />
53 <!-- Excel CSV -->
54 <input type="radio" name="what" value="excel" id="radio_dump_excel" />
55 <label for="radio_dump_excel"><?php echo $strStrucExcelCSV; ?></label>&nbsp;&nbsp;<br />
56 <br />
57 <!-- General CSV -->
58 <input type="radio" name="what" value="csv" id="radio_dump_csv" />
59 <label for="radio_dump_csv"><?php echo $strStrucCSV;?></label>&nbsp;:<br />
60 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsTerminatedBy; ?>&nbsp;
61 <input type="text" name="separator" size="2" value=";" class="textfield" />&nbsp;&nbsp;<br />
62 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEnclosedBy; ?>&nbsp;
63 <input type="text" name="enclosed" size="1" value="&quot;" class="textfield" />&nbsp;&nbsp;<br />
64 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strFieldsEscapedBy; ?>&nbsp;
65 <input type="text" name="escaped" size="2" value="\" class="textfield" />&nbsp;&nbsp;<br />
66 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $strLinesTerminatedBy; ?>&nbsp;
67 <input type="text" name="add_character" size="2" value="<?php echo ((PMA_whichCrlf() == "\n") ? '\n' : '\r\n'); ?>" class="textfield" />&nbsp;&nbsp;<br />
68 <br />
69 <!-- XML -->
70 <input type="radio" name="what" value="xml" id="radio_dump_xml" />
71 <label for="radio_dump_xml"><?php echo $strExportToXML; ?></label>&nbsp;&nbsp;
72 </td>
74 <!-- Options -->
75 <td valign="middle">
76 <!-- For structure -->
77 <?php echo $strStructure; ?><br />
78 &nbsp;&nbsp;
79 <input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" />
80 <label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label><br />
81 <?php
82 // Add backquotes checkbox
83 if (PMA_MYSQL_INT_VERSION >= 32306) {
85 &nbsp;&nbsp;
86 <input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" />
87 <label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label><br />
88 <?php
89 } // end backquotes feature
90 echo "\n";
92 <br />
93 <!-- For data -->
94 <?php echo $strData; ?><br />
95 &nbsp;&nbsp;
96 <input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" />
97 <label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label><br />
98 &nbsp;&nbsp;
99 <input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" />
100 <label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label><br />
101 &nbsp;&nbsp;
102 <?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"; ?>
103 <br /><br />
104 <!-- For CSV data -->
105 <?php echo $strStrucCSV; ?><br />
106 &nbsp;&nbsp;
107 <input type="checkbox" name="showcsvnames" value="yes" id="checkbox_dump_showcsvnames" />
108 <label for="checkbox_dump_showcsvnames"><?php echo $strPutColNames; ?></label>
109 </td>
110 </tr>
112 <tr>
113 <!-- Export to screen or to file -->
114 <td colspan="2" align="center">
115 <input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" onclick="return checkTransmitDump(this.form, 'transmit')" />
116 <label for="checkbox_dump_asfile"><?php echo $strSend; ?></label>
117 <?php
118 // charset of file
119 if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
120 $temp_charset = reset($cfg['AvailableCharsets']);
121 echo "\n" . ' , ' . $strCharsetOfFile . "\n"
122 . ' <select name="charset_of_file" size="1">' . "\n"
123 . ' <option value="' . $temp_charset . '"';
124 if ($temp_charset == $charset) {
125 echo ' selected="selected"';
127 echo '>' . $temp_charset . '</option>' . "\n";
128 while ($temp_charset = next($cfg['AvailableCharsets'])) {
129 echo ' <option value="' . $temp_charset . '"';
130 if ($temp_charset == $charset) {
131 echo ' selected="selected"';
133 echo '>' . $temp_charset . '</option>' . "\n";
134 } // end while
135 echo ' </select>';
136 } // end if
137 echo "\n";
139 // zip, gzip and bzip2 encode features
140 if (PMA_PHP_INT_VERSION >= 40004) {
141 $is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
142 $is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
143 $is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
144 if ($is_zip || $is_gzip || $is_bzip) {
145 echo "\n" . ' (' . "\n";
146 if ($is_zip) {
148 <input type="checkbox" name="zip" value="zip" id="checkbox_dump_zip" onclick="return checkTransmitDump(this.form, 'zip')" />
149 <?php echo '<label for="checkbox_dump_zip">' . $strZip . '</label>' . (($is_gzip || $is_bzip) ? '&nbsp;' : '') . "\n"; ?>
150 <?php
152 if ($is_gzip) {
153 echo "\n"
155 <input type="checkbox" name="gzip" value="gzip" id="checkbox_dump_gzip" onclick="return checkTransmitDump(this.form, 'gzip')" />
156 <?php echo '<label for="checkbox_dump_gzip">' . $strGzip . '</label>' . (($is_bzip) ? '&nbsp;' : '') . "\n"; ?>
157 <?php
159 if ($is_bzip) {
160 echo "\n"
162 <input type="checkbox" name="bzip" value="bzip" id="checkbox_dump_bzip" onclick="return checkTransmitDump(this.form, 'bzip')" />
163 <?php echo '<label for="checkbox_dump_bzip">' . $strBzip . '</label>' . "\n"; ?>
164 <?php
166 echo "\n" . ' )';
169 echo "\n";
171 </td>
172 </tr>
174 <?php
175 // Encoding setting form appended by Y.Kawada
176 if (function_exists('PMA_set_enc_form')) {
178 <tr>
179 <!-- Japanese encoding setting -->
180 <td colspan="2" align="center">
181 <?php
182 echo PMA_set_enc_form(' ');
184 </td>
185 </tr>
186 <?php
188 echo "\n";
191 <tr>
192 <td colspan="2" align="center">
193 <input type="submit" value="<?php echo $strGo; ?>" />
194 </td>
195 </tr>
196 </table>
197 </form>
199 <p align="center">
200 <a href="./Documentation.html#faqexport" target="documentation"><?php echo $strDocu; ?></a>
201 </p>
204 <?php
206 * Displays the footer
208 require('./footer.inc.php3');