Fix order of includes (bug #1569277).
[phpmyadmin/crack.git] / db_details_export.php
blob8ceea1f3ffc424f5aa78e584a672d9335e706c79
1 <?php
2 /* $Id$ */
3 // vim: expandtab sw=4 ts=4 sts=4:
4 /**
5 * dumps a database
7 * @uses libraries/db_details_common.inc.php
8 * @uses libraries/db_details_db_info.inc.php
9 * @uses libraries/display_export.lib.php
10 * @uses $tables from libraries/db_details_db_info.inc.php
13 /**
14 * Gets some core libraries
16 require_once('./libraries/common.lib.php');
18 $sub_part = '_export';
19 require_once('./libraries/db_details_common.inc.php');
20 $url_query .= '&amp;goto=db_details_export.php';
21 require_once('./libraries/db_details_db_info.inc.php');
23 /**
24 * Displays the form
26 $export_page_title = $strViewDumpDB;
28 // exit if no tables in db found
29 if ( $num_tables < 1 ) {
30 echo $strDatabaseNoTable;
31 require('./libraries/footer.inc.php');
32 exit;
33 } // end if
35 $multi_values = '<div align="center"><select name="table_select[]" size="6" multiple="multiple">';
36 $multi_values .= "\n";
38 foreach ( $tables as $each_table ) {
39 if ( PMA_MYSQL_INT_VERSION >= 50000 && is_null($each_table['Engine']) ) {
40 // Don't offer to export views yet.
41 continue;
43 if ( ! empty( $selectall )
44 || ( isset( $tmp_select )
45 && false !== strpos( $tmp_select, '|' . $each_table['Name'] . '|') ) ) {
46 $is_selected = ' selected="selected"';
47 } else {
48 $is_selected = '';
50 $table_html = htmlspecialchars( $each_table['Name'] );
51 $multi_values .= ' <option value="' . $table_html . '"'
52 . $is_selected . '>' . $table_html . '</option>' . "\n";
53 } // end for
54 $multi_values .= "\n";
55 $multi_values .= '</select></div>';
57 $checkall_url = 'db_details_export.php?'
58 . PMA_generate_common_url( $db )
59 . '&amp;goto=db_details_export.php';
61 $multi_values .= '<br />
62 <a href="' . $checkall_url . '&amp;selectall=1" onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">' . $strSelectAll . '</a>
64 <a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'table_select[]\', false); return false;">' . $strUnselectAll . '</a>';
66 $export_type = 'database';
67 require_once('./libraries/display_export.lib.php');
69 /**
70 * Displays the footer
72 require_once('./libraries/footer.inc.php');