Translated using Weblate (Italian)
[phpmyadmin.git] / server_export.php
blob39dcc3dd49a3eaa8752d77e7750d5669f7a4f40c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
5 * @package PhpMyAdmin
6 */
8 /**
9 * Does the common work
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 (isset($_GET['db_select'])) {
43 if (in_array($current_db, $_GET['db_select'])) {
44 $is_selected = ' selected="selected"';
45 } else {
46 $is_selected = '';
48 } elseif (! empty($selectall)
49 || (isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|'))
50 ) {
51 $is_selected = ' selected="selected"';
52 } else {
53 $is_selected = '';
55 $current_db = htmlspecialchars($current_db);
56 $multi_values .= ' <option value="' . $current_db . '"'
57 . $is_selected . '>' . $current_db . '</option>' . "\n";
58 } // end while
59 $multi_values .= "\n";
60 $multi_values .= '</select></div>';
62 $export_type = 'server';
63 require_once 'libraries/display_export.lib.php';