update
[phpmyadmin/crack.git] / db_details_export.php3
blobe41fda65aa7996f211cbd49752d52d455827964b
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
6 /**
7 * Gets some core libraries
8 */
9 $sub_part = '_export';
10 require('./db_details_common.php3');
11 $url_query .= '&amp;goto=db_details_export.php3';
12 require('./db_details_db_info.php3');
15 /**
16 * Displays the form
19 <!-- Dump of a database -->
20 <form method="post" action="tbl_dump.php3" name="db_dump">
21 <?php echo $strViewDumpDB; ?><br />
22 <table>
23 <tr>
24 <?php
25 $colspan = '';
26 if ($num_tables > 1) {
27 $colspan = ' colspan="2"';
29 <td>
30 <select name="table_select[]" size="6" multiple="multiple">
31 <?php
32 $i = 0;
33 echo "\n";
34 $is_selected = (!empty($selectall) ? ' selected="selected"' : '');
35 while ($i < $num_tables) {
36 $table = htmlspecialchars((PMA_MYSQL_INT_VERSION >= 32303) ? $tables[$i]['Name'] : $tables[$i]);
37 echo ' <option value="' . $table . '"' . $is_selected . '>' . $table . '</option>' . "\n";
38 $i++;
39 } // end while
41 </select>
42 </td>
43 <?php
44 } // end if
46 echo "\n";
48 <td valign="middle">
49 <input type="radio" name="what" value="structure" id="radio_dump_structure" checked="checked" />
50 <label for="radio_dump_structure"><?php echo $strStrucOnly; ?></label><br />
51 <input type="radio" name="what" id="radio_dump_data" value="data" />
52 <label for="radio_dump_data"><?php echo $strStrucData; ?></label><br />
53 <input type="radio" name="what" id="radio_dump_dataonly" value="dataonly" />
54 <label for="radio_dump_dataonly"><?php echo $strDataOnly; ?></label><br />
55 <input type="radio" name="what" id="radio_dump_xml" value="xml" />
56 <label for="radio_dump_xml"><?php echo $strExportToXML; ?></label><br />
57 <input type="radio" name="what" value="latex" id="radio_dump_latex" />
58 <label for="radio_dump_latex"><?php echo $strLaTeX; ?></label> &nbsp; &nbsp;
59 <!-- for now we have only one environment supported -->
60 <input type="hidden" name="environment" value="longtable" />
61 <?php /*
62 <select name="environment">
63 <option value="longtable" selected><?php echo $strLaTeXMultipageTable; ?></option>
64 <option value="sideways"><?php echo $strLaTeXSidewaysTable; ?></option>
65 <option value="table"><?php echo $strLaTeXStandardTable; ?></option>
66 </select>
67 */ ?>
69 <?php
70 if ($num_tables > 1) {
71 $checkall_url = 'db_details_export.php3'
72 . '?lang=' . $lang
73 . '&amp;convcharset=' . $convcharset
74 . '&amp;server=' . $server
75 . '&amp;db=' . urlencode($db)
76 . '&amp;goto=db_details_export.php3';
78 <br />
79 <a href="<?php echo $checkall_url; ?>&amp;selectall=1#dumpdb" onclick="setSelectOptions('db_dump', 'table_select[]', true); return false;"><?php echo $strSelectAll; ?></a>
80 &nbsp;/&nbsp;
81 <a href="<?php echo $checkall_url; ?>#dumpdb" onclick="setSelectOptions('db_dump', 'table_select[]', false); return false;"><?php echo $strUnselectAll; ?></a>
82 <?php
83 } // end if
84 echo "\n";
86 </td>
87 </tr>
88 <tr>
89 <td<?php echo $colspan; ?>>
90 <input type="checkbox" name="drop" value="1" id="checkbox_dump_drop" />
91 <label for="checkbox_dump_drop"><?php echo $strStrucDrop; ?></label>
92 </td>
93 </tr>
94 <tr>
95 <td<?php echo $colspan; ?>>
96 <input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" />
97 <label for="checkbox_dump_showcolumns"><?php echo $strCompleteInserts; ?></label>
98 </td>
99 </tr>
100 <tr>
101 <td<?php echo $colspan; ?>>
102 <input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" />
103 <label for="checkbox_dump_extended_ins"><?php echo $strExtendedInserts; ?></label>
104 </td>
105 </tr>
106 <?php
107 // Add backquotes checkbox
108 if (PMA_MYSQL_INT_VERSION >= 32306) {
110 <tr>
111 <td<?php echo $colspan; ?>>
112 <input type="checkbox" name="use_backquotes" value="1" id="checkbox_dump_use_backquotes" />
113 <label for="checkbox_dump_use_backquotes"><?php echo $strUseBackquotes; ?></label>
114 </td>
115 </tr>
116 <?php
117 } // end backquotes feature
118 echo "\n";
120 <tr>
121 <td<?php echo $colspan; ?>>
122 <input type="checkbox" name="asfile" value="sendit" id="checkbox_dump_asfile" onclick="return checkTransmitDump(this.form, 'transmit')" />
123 <label for="checkbox_dump_asfile"><?php echo $strSend; ?></label>
124 <?php
125 // charset of file
126 if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
127 $temp_charset = reset($cfg['AvailableCharsets']);
128 echo "\n" . ' , ' . $strCharsetOfFile . "\n"
129 . ' <select name="charset_of_file" size="1">' . "\n"
130 . ' <option value="' . $temp_charset . '"';
131 if ($temp_charset == $charset) {
132 echo ' selected="selected"';
134 echo '>' . $temp_charset . '</option>' . "\n";
135 while ($temp_charset = next($cfg['AvailableCharsets'])) {
136 echo ' <option value="' . $temp_charset . '"';
137 if ($temp_charset == $charset) {
138 echo ' selected="selected"';
140 echo '>' . $temp_charset . '</option>' . "\n";
141 } // end while
142 echo ' </select>';
143 } // end if
144 echo "\n";
146 // zip, gzip and bzip2 encode features
147 if (PMA_PHP_INT_VERSION >= 40004) {
148 $is_zip = (isset($cfg['ZipDump']) && $cfg['ZipDump'] && @function_exists('gzcompress'));
149 $is_gzip = (isset($cfg['GZipDump']) && $cfg['GZipDump'] && @function_exists('gzencode'));
150 $is_bzip = (isset($cfg['BZipDump']) && $cfg['BZipDump'] && @function_exists('bzcompress'));
151 if ($is_zip || $is_gzip || $is_bzip) {
152 echo "\n" . ' (' . "\n";
153 if ($is_zip) {
155 <input type="checkbox" name="zip" value="zip" id="checkbox_dump_zip" onclick="return checkTransmitDump(this.form, 'zip')" />
156 <?php
157 echo '<label for="checkbox_dump_zip">' . $strZip . '</label>'
158 . (($is_gzip || $is_bzip) ? '&nbsp;' : '') . "\n";
160 if ($is_gzip) {
161 echo "\n"
163 <input type="checkbox" name="gzip" value="gzip" id="checkbox_dump_gzip" onclick="return checkTransmitDump(this.form, 'gzip')" />
164 <?php
165 echo '<label for="checkbox_dump_gzip">' . $strGzip . '</label>'
166 . (($is_bzip) ? '&nbsp;' : '') . "\n";
168 if ($is_bzip) {
169 echo "\n"
171 <input type="checkbox" name="bzip" value="bzip" id="checkbox_dump_bzip" onclick="return checkTransmitDump(this.form, 'bzip')" />
172 <?php
173 echo '<label for="checkbox_dump_bzip">' . $strBzip . '</label>' . "\n";
175 echo "\n" . ' )';
177 } // end *zip feature
178 echo "\n";
180 // Encoding setting form appended by Y.Kawada
181 if (function_exists('PMA_set_enc_form')) {
182 echo ' <br />' . "\n"
183 . PMA_set_enc_form(' ');
186 </td>
187 </tr>
188 <tr>
189 <td<?php echo $colspan; ?>>
190 <input type="submit" value="<?php echo $strGo; ?>" />
191 </td>
192 </tr>
193 </table>
194 <input type="hidden" name="server" value="<?php echo $server; ?>" />
195 <input type="hidden" name="lang" value="<?php echo $lang;?>" />
196 <input type="hidden" name="db" value="<?php echo htmlspecialchars($db);?>" />
197 </form>
199 <a href="./Documentation.html#faqexport" target="documentation"><?php echo $strDocu; ?></a>
202 <?php
204 * Displays the footer
206 require('./footer.inc.php3');