sqlQueryForm = $sqlQueryForm; } public function index(): void { global $url_query, $err_url, $goto, $back; $header = $this->response->getHeader(); $scripts = $header->getScripts(); $scripts->addFile('makegrid.js'); $scripts->addFile('vendor/jquery/jquery.uitablefilter.js'); $scripts->addFile('sql.js'); PageSettings::showGroup('Sql'); Common::table(); $err_url = Url::getFromRoute('/table/sql') . $err_url; /** * After a syntax error, we return to this script * with the typed query in the textarea. */ $goto = Url::getFromRoute('/table/sql'); $back = Url::getFromRoute('/table/sql'); $url_query .= Url::getCommon([ 'goto' => $goto, 'back' => $back, ], '&'); $this->response->addHTML($this->sqlQueryForm->getHtml( $_GET['sql_query'] ?? true, false, isset($_POST['delimiter']) ? htmlspecialchars($_POST['delimiter']) : ';' )); } }