Update sql_query_result.php

This commit is contained in:
FusionPBX 2019-04-27 08:40:12 -06:00 committed by GitHub
parent 098e192c3a
commit 5611721f54
1 changed files with 222 additions and 221 deletions

View File

@ -47,21 +47,22 @@
require_once "sql_query_pdo.php";
}
//set the variables
$code = trim($_REQUEST["code"]);
//check the captcha
$code = trim($_REQUEST["code"]);
$command_authorized = false;
if (strtolower($_SESSION['captcha']) == strtolower($code)) {
$command_authorized = true;
}
if (!$command_authorized) {
//not authorized
echo "not authorized";
exit;
}
if (is_array($_POST)) {
//show the content
if (is_array($_POST)) {
$sql_type = trim($_POST["sql_type"]);
$sql_cmd = trim($_POST["cmd"]);
$sql_cmd = trim($_POST["command"]);
$table_name = trim($_POST["table_name"]);
$header = "<html>\n";
@ -297,6 +298,6 @@ if (is_array($_POST)) {
}
}
}
}
}
?>