Translated using Weblate (Slovenian)
[phpmyadmin.git] / tbl_sql.php
blob5bf941c83783a905c1970bac0677225d6779fb6a
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\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(
31 $response,
32 $dbi,
33 $db,
34 $table
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,
46 ]));