2 /* vim: set expandtab sw=4 ts=4 sts=4: */
11 require_once 'libraries/common.inc.php';
13 $response = PMA_Response
::getInstance();
14 $header = $response->getHeader();
15 $scripts = $header->getScripts();
16 $scripts->addFile('export.js');
18 require 'libraries/server_common.inc.php';
20 $export_page_title = __('View dump (schema) of databases') . "\n";
22 $multi_values = '<div style="text-align: left">';
23 $multi_values .= '<a href="#"';
24 $multi_values .= ' onclick="setSelectOptions(\'dump\', \'db_select[]\', true); return false;">';
25 $multi_values .= __('Select All');
26 $multi_values .= '</a>';
27 $multi_values .= ' / ';
28 $multi_values .= '<a href="#"';
29 $multi_values .= ' onclick="setSelectOptions(\'dump\', \'db_select[]\', false); return false;">';
30 $multi_values .= __('Unselect All') . '</a><br />';
32 $multi_values .= '<select name="db_select[]" id="db_select" size="10" multiple="multiple">';
33 $multi_values .= "\n";
35 // Check if the selected databases are defined in $_GET (from clicking Back button on export.php)
36 if (isset($_GET['db_select'])) {
37 $_GET['db_select'] = urldecode($_GET['db_select']);
38 $_GET['db_select'] = explode(",", $_GET['db_select']);
41 foreach ($GLOBALS['pma']->databases
as $current_db) {
42 if ($current_db == 'information_schema'
43 ||
$current_db == 'performance_schema'
44 ||
$current_db == 'mysql'
48 if (isset($_GET['db_select'])) {
49 if (in_array($current_db, $_GET['db_select'])) {
50 $is_selected = ' selected="selected"';
54 } elseif (isset($tmp_select)) {
55 if (strpos(' ' . $tmp_select, '|' . $current_db . '|')) {
56 $is_selected = ' selected="selected"';
61 $is_selected = ' selected="selected"';
63 $current_db = htmlspecialchars($current_db);
64 $multi_values .= ' <option value="' . $current_db . '"'
65 . $is_selected . '>' . $current_db . '</option>' . "\n";
67 $multi_values .= "\n";
68 $multi_values .= '</select></div>';
70 $export_type = 'server';
71 require_once 'libraries/display_export.lib.php';