bug #2891250 [ob] Garbled data in navi frame (PHP 5.2.11 bug)
[phpmyadmin/tyronm.git] / db_export.php
blob8d96e7cd7b8a95bb618b7d9a677bd6207d12deba
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * dumps a database
6 * @version $Id$
7 * @uses libraries/db_common.inc.php
8 * @uses libraries/db_info.inc.php
9 * @uses libraries/display_export.lib.php
10 * @uses $tables from libraries/db_info.inc.php
11 * @package phpMyAdmin
14 /**
15 * Gets some core libraries
17 require_once './libraries/common.inc.php';
19 // $sub_part is also used in db_info.inc.php to see if we are coming from
20 // db_export.php, in which case we don't obey $cfg['MaxTableList']
21 $sub_part = '_export';
22 require_once './libraries/db_common.inc.php';
23 $url_query .= '&amp;goto=db_export.php';
24 require_once './libraries/db_info.inc.php';
26 /**
27 * Displays the form
29 $export_page_title = $strViewDumpDB;
31 // exit if no tables in db found
32 if ($num_tables < 1) {
33 PMA_Message::error('strNoTablesFound')->display();
34 require './libraries/footer.inc.php';
35 exit;
36 } // end if
38 $checkall_url = 'db_export.php?'
39 . PMA_generate_common_url($db)
40 . '&amp;goto=db_export.php';
42 $multi_values = '<div align="center">';
43 $multi_values .= '<a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">' . $strSelectAll . '</a>
45 <a href="' . $checkall_url . '&amp;unselectall=1" onclick="setSelectOptions(\'dump\', \'table_select[]\', false); return false;">' . $strUnselectAll . '</a><br />';
47 $multi_values .= '<select name="table_select[]" size="10" multiple="multiple">';
48 $multi_values .= "\n";
50 if (!empty($selected_tbl) && empty($table_select)) {
51 $table_select = $selected_tbl;
54 foreach ($tables as $each_table) {
55 // ok we show also views
56 //if (is_null($each_table['Engine'])) {
57 // Don't offer to export views yet.
58 // continue;
59 //}
60 if (! empty($unselectall)
61 || (! empty($table_select) && !in_array($each_table['Name'], $table_select))) {
62 $is_selected = '';
63 } else {
64 $is_selected = ' selected="selected"';
66 $table_html = htmlspecialchars($each_table['Name']);
67 $multi_values .= ' <option value="' . $table_html . '"'
68 . $is_selected . '>'
69 . str_replace(' ', '&nbsp;', $table_html) . '</option>' . "\n";
70 } // end for
71 $multi_values .= "\n";
72 $multi_values .= '</select></div><br />';
74 $export_type = 'database';
75 require_once './libraries/display_export.lib.php';
77 /**
78 * Displays the footer
80 require_once './libraries/footer.inc.php';