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

\n"; //echo " ".$text['label-result_type']."
"; echo " \n"; echo "
"; echo " "; //onclick=\"$('form#frm').submit();\" echo " "; echo "
\n"; echo $text['description-sql_query']."\n"; echo "
"; echo "
"; //html form echo "
\n"; echo " \n"; //sql db id echo " \n"; echo " "; echo " \n"; echo " "; echo " "; echo " \n"; echo "
"; echo " "; if (permission_exists('edit_view')) { echo " "; echo " "; echo " "; } echo "
"; echo " \n"; echo "
"; echo "
" ?>
"; echo "
"; echo " "; echo "

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

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