Merge branch 'QA_4_9' into QA_5_0
[phpmyadmin.git] / server_export.php
blobba308c5f227282a2c65d0a6dd6ba6eb717a57369
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * object the server export page
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Config\PageSettings;
11 use PhpMyAdmin\Display\Export;
12 use PhpMyAdmin\Response;
14 if (! defined('ROOT_PATH')) {
15 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
18 global $db, $table;
20 require_once ROOT_PATH . 'libraries/common.inc.php';
21 require_once ROOT_PATH . 'libraries/server_common.inc.php';
23 PageSettings::showGroup('Export');
25 $response = Response::getInstance();
26 $header = $response->getHeader();
27 $scripts = $header->getScripts();
28 $scripts->addFile('export.js');
30 $export_page_title = __('View dump (schema) of databases') . "\n";
32 $displayExport = new Export();
34 $select_item = isset($tmp_select) ? $tmp_select : '';
35 $multi_values = $displayExport->getHtmlForSelectOptions($select_item);
37 if (! isset($sql_query)) {
38 $sql_query = '';
40 if (! isset($num_tables)) {
41 $num_tables = 0;
43 if (! isset($unlim_num_rows)) {
44 $unlim_num_rows = 0;
46 $response = Response::getInstance();
47 $response->addHTML(
48 $displayExport->getDisplay(
49 'server',
50 $db,
51 $table,
52 $sql_query,
53 $num_tables,
54 $unlim_num_rows,
55 $multi_values