Merge branch 'origin/master' into Weblate.
[phpmyadmin.git] / db_import.php
blob904ed37869874b06226a302c68790b52f6401332
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Database import page
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Config\PageSettings;
11 use PhpMyAdmin\Display\Import;
12 use PhpMyAdmin\Response;
14 if (! defined('ROOT_PATH')) {
15 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
18 require_once ROOT_PATH . 'libraries/common.inc.php';
20 PageSettings::showGroup('Import');
22 $response = Response::getInstance();
23 $header = $response->getHeader();
24 $scripts = $header->getScripts();
25 $scripts->addFile('import.js');
27 $import = new Import();
29 /**
30 * Gets tables information and displays top links
32 require ROOT_PATH . 'libraries/db_common.inc.php';
34 list(
35 $tables,
36 $num_tables,
37 $total_num_tables,
38 $sub_part,
39 $is_show_stats,
40 $db_is_system_schema,
41 $tooltip_truename,
42 $tooltip_aliasname,
43 $pos
44 ) = PhpMyAdmin\Util::getDbInfo($db, isset($sub_part) ? $sub_part : '');
46 $response = Response::getInstance();
47 $response->addHTML(
48 $import->get(
49 'database',
50 $db,
51 $table,
52 $max_upload_size