2 /* vim: set expandtab sw=4 ts=4 sts=4: */
11 require_once './libraries/common.inc.php';
13 $GLOBALS['js_include'][] = 'export.js';
18 require './libraries/server_links.inc.php';
20 $export_page_title = __('View dump (schema) of databases') . "\n";
21 $checkall_url = 'server_export.php?'
22 . PMA_generate_common_url()
23 . '&goto=db_export.php';
25 $multi_values = '<div align="left">';
26 $multi_values .= '<a href="' . $checkall_url . '&selectall=1" onclick="setSelectOptions(\'dump\', \'db_select[]\', true); return false;">' . __('Select All') . '</a>
28 <a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'db_select[]\', false); return false;">' . __('Unselect All') . '</a><br />';
30 $multi_values .= '<select name="db_select[]" id="db_select" size="10" multiple="multiple">';
31 $multi_values .= "\n";
33 // Check if the selected databases are defined in $_GET (from clicking Back button on export.php)
34 if(isset($_GET['db_select'])) {
35 $_GET['db_select'] = urldecode($_GET['db_select']);
36 $_GET['db_select'] = explode(",", $_GET['db_select']);
39 foreach ($GLOBALS['pma']->databases
as $current_db) {
40 if(isset($_GET['db_select'])) {
41 if(in_array($current_db, $_GET['db_select'])) {
42 $is_selected = ' selected="selected"';
46 } elseif (!empty($selectall) ||
(isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))) {
47 $is_selected = ' selected="selected"';
51 $current_db = htmlspecialchars($current_db);
52 $multi_values .= ' <option value="' . $current_db . '"' . $is_selected . '>' . $current_db . '</option>' . "\n";
54 $multi_values .= "\n";
55 $multi_values .= '</select></div>';
57 $export_type = 'server';
58 require_once './libraries/display_export.lib.php';
64 require './libraries/footer.inc.php';