2 /* vim: set expandtab sw=4 ts=4 sts=4: */
8 declare(strict_types
=1);
10 use PhpMyAdmin\Controllers\Table\SqlController
;
11 use PhpMyAdmin\DatabaseInterface
;
12 use PhpMyAdmin\Di\Container
;
13 use PhpMyAdmin\Response
;
15 if (! defined('ROOT_PATH')) {
16 define('ROOT_PATH', __DIR__
. DIRECTORY_SEPARATOR
);
19 require_once ROOT_PATH
. 'libraries/common.inc.php';
21 $container = Container
::getDefaultContainer();
22 $container->set(Response
::class, Response
::getInstance());
24 /** @var Response $response */
25 $response = $container->get(Response
::class);
27 /** @var DatabaseInterface $dbi */
28 $dbi = $container->get(DatabaseInterface
::class);
30 $controller = new SqlController(
37 $header = $response->getHeader();
38 $scripts = $header->getScripts();
39 $scripts->addFile('makegrid.js');
40 $scripts->addFile('vendor/jquery/jquery.uitablefilter.js');
41 $scripts->addFile('sql.js');
43 $response->addHTML($controller->index([
44 'delimiter' => $_POST['delimiter'] ??
null,
45 'sql_query' => $_GET['sql_query'] ??
true,