Update sql_query_result.php

This commit is contained in:
FusionPBX
2019-04-27 08:40:12 -06:00
committed by GitHub
parent f945e7ec60
commit 5d8be271c8
+4 -3
View File
@@ -47,21 +47,22 @@
require_once "sql_query_pdo.php"; require_once "sql_query_pdo.php";
} }
//set the variables
$code = trim($_REQUEST["code"]);
//check the captcha //check the captcha
$code = trim($_REQUEST["code"]);
$command_authorized = false; $command_authorized = false;
if (strtolower($_SESSION['captcha']) == strtolower($code)) { if (strtolower($_SESSION['captcha']) == strtolower($code)) {
$command_authorized = true; $command_authorized = true;
} }
if (!$command_authorized) { if (!$command_authorized) {
//not authorized //not authorized
echo "not authorized";
exit; exit;
} }
//show the content
if (is_array($_POST)) { if (is_array($_POST)) {
$sql_type = trim($_POST["sql_type"]); $sql_type = trim($_POST["sql_type"]);
$sql_cmd = trim($_POST["cmd"]); $sql_cmd = trim($_POST["command"]);
$table_name = trim($_POST["table_name"]); $table_name = trim($_POST["table_name"]);
$header = "<html>\n"; $header = "<html>\n";