Portions created by the Initial Developer are Copyright (C) 2008-2019 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane James Rose */ //includes include "root.php"; require_once "resources/require.php"; require_once "resources/check_auth.php"; //permissions if (permission_exists('sql_query')) { //access granted } else { echo "access denied"; exit; } //add multi-lingual support $language = new text; $text = $language->get(); // load editor preferences/defaults $setting_size = ($_SESSION["editor"]["font_size"]["text"] != '') ? $_SESSION["editor"]["font_size"]["text"] : '12px'; $setting_theme = ($_SESSION["editor"]["theme"]["text"] != '') ? $_SESSION["editor"]["theme"]["text"] : 'cobalt'; $setting_invisibles = ($_SESSION["editor"]["invisibles"]["boolean"] != '') ? $_SESSION["editor"]["invisibles"]["boolean"] : 'false'; $setting_indenting = ($_SESSION["editor"]["indent_guides"]["boolean"] != '') ? $_SESSION["editor"]["indent_guides"]["boolean"] : 'false'; $setting_numbering = ($_SESSION["editor"]["line_numbers"]["boolean"] != '') ? $_SESSION["editor"]["line_numbers"]["boolean"] : 'true'; //get the html values and set them as variables $code = trim($_POST["code"]); $command = trim($_POST["command"]); //check the captcha $command_authorized = false; if (strlen($code) > 0) { if (strtolower($_SESSION['captcha']) == strtolower($code)) { $command_authorized = true; } } //set editor moder $mode = 'sql'; //show the header require_once "resources/header.php"; $document['title'] = $text['title-command']; //pdo database connection require_once "sql_query_pdo.php"; //scripts and styles ?> code = $_SESSION['captcha']; $image_base64 = $captcha->image_base64(); //show the header echo "
\n"; echo ""; echo " "; echo " "; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
"; echo " ".$text['label-sql_query']."\n"; echo " "; //add the captcha echo " \n"; echo "      \n"; //sql controls echo " "; //echo " ".$text['label-table']."
"; echo " \n"; //echo "

\n"; //echo " ".$text['label-result_type']."
"; echo " \n"; echo "
"; echo " "; echo " "; echo "
\n"; echo $text['description-sql_query']."\n"; echo "
"; echo "
"; //html form echo "\n"; //sql db id echo ""; echo "\n"; echo " "; echo " "; echo " \n"; echo "
"; echo " "; if (permission_exists('edit_view') && file_exists($_SERVER["PROJECT_ROOT"]."/app/edit/")) { echo " "; echo " "; echo " "; } echo "
"; echo " \n"; echo "
"; echo "
" ?>
"; echo "
"; echo "
"; echo "

"; ?> "; //echo "".$text['label-results']."\n"; //echo "

\n"; echo "\n"; echo ""; //show the footer require_once "resources/footer.php"; ?>