phpmyadmin/db_sql.php
Piyush Vijay 3ae93ad307 Add modular Sql.js to table sql and database sql and SqlQueryForm modified accordingly
Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
2018-08-10 13:38:47 +05:30

50 lines
933 B
PHP

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Database SQL executor
*
* @package PhpMyAdmin
*/
declare(strict_types=1);
use PhpMyAdmin\Config\PageSettings;
use PhpMyAdmin\Response;
use PhpMyAdmin\SqlQueryForm;
/**
*
*/
require_once 'libraries/common.inc.php';
PageSettings::showGroup('Sql');
/**
* Runs common work
*/
$response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('sql');
require 'libraries/db_common.inc.php';
$sqlQueryForm = new SqlQueryForm();
// After a syntax error, we return to this script
// with the typed query in the textarea.
$goto = 'db_sql.php';
$back = 'db_sql.php';
/**
* Query box, bookmark, insert data from textfile
*/
$response->addHTML(
$sqlQueryForm->getHtml(
true,
false,
isset($_REQUEST['delimiter'])
? htmlspecialchars($_REQUEST['delimiter'])
: ';'
)
);