Merge #15685 - Fix #15682 - Timestamp method not taking current time
[phpmyadmin.git] / tbl_sql.php
blobdd12d94a9809411a45492be33dd03cd17dd64496
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Table SQL executor
6 * @package PhpMyAdmin
7 */
8 use PhpMyAdmin\Config\PageSettings;
9 use PhpMyAdmin\Response;
10 use PhpMyAdmin\SqlQueryForm;
12 /**
15 require_once 'libraries/common.inc.php';
17 PageSettings::showGroup('Sql');
19 /**
20 * Runs common work
22 $response = Response::getInstance();
23 $header = $response->getHeader();
24 $scripts = $header->getScripts();
25 $scripts->addFile('makegrid.js');
26 $scripts->addFile('vendor/jquery/jquery.uitablefilter.js');
27 $scripts->addFile('sql.js');
29 require 'libraries/tbl_common.inc.php';
30 $url_query .= '&amp;goto=tbl_sql.php&amp;back=tbl_sql.php';
32 $err_url = 'tbl_sql.php' . $err_url;
33 // After a syntax error, we return to this script
34 // with the typed query in the textarea.
35 $goto = 'tbl_sql.php';
36 $back = 'tbl_sql.php';
38 // Decides what query to show in SQL box.
39 $query_to_show = isset($_GET['sql_query']) ? $_GET['sql_query'] : true;
41 /**
42 * Query box, bookmark, insert data from textfile
44 $response->addHTML(
45 SqlQueryForm::getHtml(
46 $query_to_show, false,
47 isset($_POST['delimiter'])
48 ? htmlspecialchars($_POST['delimiter'])
49 : ';'