for Loic
[phpmyadmin/crack.git] / db_details_export.php3
blobe21135b722580ec7a110d83913ddae4cd09adead
1 <?php
2 /* $Id$ */
5 /**
6 * Gets some core libraries
7 */
8 $sub_part = '_export';
9 require('./db_details_common.php3');
10 $url_query .= '&amp;goto=db_details_export.php3';
11 require('./db_details_db_info.php3');
14 /**
15 * Displays the form
18 <!-- Dump of a database -->
19 <form method="post" action="tbl_dump.php3" name="db_dump">
20 <?php echo $strViewDumpDB; ?><br />
21 <table>
22 <tr>
23 <?php
24 $colspan = '';
25 if ($num_tables > 1) {
26 $colspan = ' colspan="2"';
28 <td>
29 <select name="table_select[]" size="6" multiple="multiple">
30 <?php
31 $i = 0;
32 echo "\n";
33 $is_selected = (!empty($selectall) ? ' selected="selected"' : '');
34 while ($i < $num_tables) {
35 $table = htmlspecialchars((PMA_MYSQL_INT_VERSION >= 32303) ? $tables[$i]['Name'] : $tables[$i]);
36 echo ' <option value="' . $table . '"' . $is_selected . '>' . $table . '</option>' . "\n";
37 $i++;
38 } // end while
40 </select>
41 </td>
42 <?php
43 } // end if
45 echo "\n";
47 <td valign="middle">
48 <input type="radio" name="what" value="structure" id="radio_dump_structure" checked="checked" />
49 <label for="radio_dump_structure"><?php echo $strStrucOnly; ?></label><br />
50 <input type="radio" name="what" id="radio_dump_data" value="data" />
51 <label for="radio_dump_data"><?php echo $strStrucData; ?></label><br />
52 <input type="radio" name="what" id="radio_dump_dataonly" value="dataonly" />
53 <label for="radio_dump_dataonly"><?php echo $strDataOnly; ?></label><br />
54 <input type="radio" name="what" id="radio_dump_xml" value="xml" />
55 <label for="radio_dump_xml"><?php echo $strExportToXML; ?></label>
56 <?php
57 if ($num_tables > 1) {
58 $checkall_url = 'db_details_export.php3'
59 . '?lang=' . $lang
60 . '&amp;convcharset=' . $convcharset
61 . '&amp;server=' . $server
62 . '&amp;db=' . $db
63 . '&amp;goto=db_details_export.php3';
65 <br />
66 <a href="<?php echo $checkall_url; ?>&amp;selectall=1#dumpdb" onclick="setSelectOptions('db_dump', 'table_select[]', true); return false;"><?php echo $strSelectAll; ?></a>
67 &nbsp;/&nbsp;
68 <a href="<?php echo $checkall_url; ?>#dumpdb" onclick="setSelectOptions('db_dump', 'table_select[]', false); return false;"><?php echo $strUnselectAll; ?></a>
69 <?php
70 } // end if
71 echo "\n";
73 </td>
74 </tr>
75 <tr>
76 <td<?php echo $colspan; ?>>
77 <input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" />
78 <label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label>
79 </td>
80 </tr>
81 <tr>
82 <td<?php echo $colspan; ?>>
83 <input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" />
84 <label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label>
85 </td>
86 </tr>
87 <tr>
88 <td<?php echo $colspan; ?>>
89 <input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" />
90 <label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label>
91 </td>
92 </tr>
93 <?php
94 // Add backquotes checkbox
95 if (PMA_MYSQL_INT_VERSION >= 32306) {
97 <tr>
98 <td<?php echo $colspan; ?>>
99 <input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" />
100 <label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label>
101 </td>
102 </tr>
103 <?php
104 } // end backquotes feature
105 echo "\n";
107 <tr>
108 <td<?php echo $colspan; ?>>
109 <input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" onclick="return checkTransmitDump(this.form, 'transmit')" />
110 <label for="checkbox_dump_asfile"><?php echo $strSend; ?></label>
111 <?php
112 // charset of file
113 if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
114 $temp_charset = reset($cfg['AvailableCharsets']);
115 echo "\n" . ' , ' . $strCharsetOfFile . "\n"
116 . ' <select name="charset_of_file" size="1">' . "\n"
117 . ' <option value="' . $temp_charset . '"';
118 if ($temp_charset == $charset) {
119 echo ' selected="selected"';
121 echo '>' . $temp_charset . '</option>' . "\n";
122 while ($temp_charset = next($cfg['AvailableCharsets'])) {
123 echo ' <option value="' . $temp_charset . '"';
124 if ($temp_charset == $charset) {
125 echo ' selected="selected"';
127 echo '>' . $temp_charset . '</option>' . "\n";
128 } // end while
129 echo ' </select>';
130 } // end if
131 echo "\n";
133 // zip, gzip and bzip2 encode features
134 if (PMA_PHP_INT_VERSION >= 40004) {
135 $is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
136 $is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
137 $is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
138 if ($is_zip || $is_gzip || $is_bzip) {
139 echo "\n" . ' (' . "\n";
140 if ($is_zip) {
142 <input type="checkbox" name="zip" value="zip" id="checkbox_dump_zip" onclick="return checkTransmitDump(this.form, 'zip')" />
143 <?php
144 echo '<label for="checkbox_dump_zip">' . $strZip . '</label>'
145 . (($is_gzip || $is_bzip) ? '&nbsp;' : '') . "\n";
147 if ($is_gzip) {
148 echo "\n"
150 <input type="checkbox" name="gzip" value="gzip" id="checkbox_dump_gzip" onclick="return checkTransmitDump(this.form, 'gzip')" />
151 <?php
152 echo '<label for="checkbox_dump_gzip">' . $strGzip . '</label>'
153 . (($is_bzip) ? '&nbsp;' : '') . "\n";
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
160 echo '<label for="checkbox_dump_bzip">' . $strBzip . '</label>' . "\n";
162 echo "\n" . ' )';
164 } // end *zip feature
165 echo "\n";
167 // Encoding setting form appended by Y.Kawada
168 if (function_exists('PMA_set_enc_form')) {
169 echo ' <br />' . "\n"
170 . PMA_set_enc_form(' ');
173 </td>
174 </tr>
175 <tr>
176 <td<?php echo $colspan; ?>>
177 <input type="submit" value="<?php echo $strGo; ?>" />
178 </td>
179 </tr>
180 </table>
181 <input type="hidden" name="server" value="<?php echo $server; ?>" />
182 <input type="hidden" name="lang" value="<?php echo $lang;?>" />
183 <input type="hidden" name="db" value="<?php echo $db;?>" />
184 </form>
186 <a href="./Documentation.html#faqexport" target="documentation"><?php echo $strDocu; ?></a>
189 <?php
191 * Displays the footer
193 require('./footer.inc.php3');