private function _HandleFormPost() { // validate the input include 'fbapp/inc/validator.inc.php'; $r = ValidateInput(); FormPage::GetInstance()->ReportStats('NotifyFormSubmit', $r); // remember if this client uses javascript Config::GetInstance()->SetSessionVariableFromPost(CC_FB_JSENABLED); // process input if 0 errors encountered if ($r == 0 && FormPage::GetInstance()->ProcessPostedData()) { $this->ShowUserConfirmation(); } }
Redirect("Menu.php"); exit; } //Include the header require "Include/Header.php"; //Get the query information $sSQL = "SELECT * FROM query_qry WHERE qry_ID = " . $iQueryID; $rsSQL = RunQuery($sSQL); extract(mysql_fetch_array($rsSQL)); //Get the parameters for this query $sSQL = "SELECT * FROM queryparameters_qrp WHERE qrp_qry_ID = " . $iQueryID; $rsParameters = RunQuery($sSQL); //If the form was submitted or there are no parameters, run the query if (isset($_POST["Submit"]) || mysql_num_rows($rsParameters) == 0) { //Check that all validation rules were followed ValidateInput(); //Any errors? if (count($aErrorText) == 0) { //No errors; process the SQL, run the query, and display the results ProcessSQL(); DoQuery(); } else { //Yes, there were errors; re-display the parameter form (the DisplayParameterForm function will //pick up and display any error messages) DisplayQueryInfo(); DisplayParameterForm(); } } else { //Display the parameter form DisplayQueryInfo(); DisplayParameterForm();