Translated using Weblate (Portuguese)
[phpmyadmin.git] / tbl_sql.php
blob35dacd21ecbb875be8d36d15120efd3dd17dba62
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Table SQL executor
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Controllers\Table\SqlController;
11 use PhpMyAdmin\DatabaseInterface;
12 use PhpMyAdmin\Response;
13 use PhpMyAdmin\SqlQueryForm;
15 if (! defined('ROOT_PATH')) {
16 define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
19 global $containerBuilder;
21 require_once ROOT_PATH . 'libraries/common.inc.php';
23 /** @var Response $response */
24 $response = $containerBuilder->get(Response::class);
26 /** @var DatabaseInterface $dbi */
27 $dbi = $containerBuilder->get(DatabaseInterface::class);
29 /** @var SqlController $controller */
30 $controller = $containerBuilder->get(SqlController::class);
32 /** @var SqlQueryForm $sqlQueryForm */
33 $sqlQueryForm = $containerBuilder->get('sql_query_form');
35 $header = $response->getHeader();
36 $scripts = $header->getScripts();
37 $scripts->addFile('makegrid.js');
38 $scripts->addFile('vendor/jquery/jquery.uitablefilter.js');
39 $scripts->addFile('sql.js');
41 $response->addHTML(
42 $controller->index(
44 'delimiter' => $_POST['delimiter'] ?? null,
45 'sql_query' => $_GET['sql_query'] ?? true,
47 $sqlQueryForm