var RecaptchaOptions = {theme : 'clean',};"; echo ""; $error=""; if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])) { // Google reCAPTCHA API secret key $secretKey = '6LfK6PMSAAAAAKmKn76fB34W1vAyagYlyQlBgGdG'; // Verify the reCAPTCHA response $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secretKey.'&response='.$_POST['g-recaptcha-response']); // Decode json data $responseData = json_decode($verifyResponse); // if($g_response->success===true) { echo "success!"; } } if ($_POST) { if (!$responseData->success) { $error.="Incorrect captcha code entered.
"; $summary=$_POST[summary]; $comments=$_POST[comments]; $name=$_POST[name]; $type=$_POST[type]; } else { session_start(); $schoolname=fetch_orgname(); $orgID=fetch_orgID(); $login=$_SESSION[Login]; $email=$_SESSION[Email]; echo "Sending from $email
"; if (is_null($email)) echo "Email is null
"; $summary=$_POST[summary]; $comments=$_POST[comments]; $name=$_POST[name]; $familyname=$_SESSION[ParentsNames]." ".$_SESSION[LastName]; $type=$_POST[type]; $domain="http://".$_SERVER['HTTP_HOST'].current_dir(); $banner=(!isset($_SESSION[Banner]) || $_SESSION[Banner]=="") ? "images/PBO-banner.png" : "school_images/".$_SESSION[Banner]; $to = "support@parentbooker.com"; $subject = "Feedback: ".$orgID." - ".$summary; $headers = "From: richard.hall@parentbooker.com\r\n"; // get dont reply email $headers .= "Reply-To: ".$email."\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $message = ""; $message .=""; $message .= ""; $message .= ""; $message .= "

Feedback

 
"; $message .= "
School Name: $schoolname
"; $message .= ""; $message .= ""; $message .= "
School ID: $orgID
 

Contact Details

"; $message .= ""; $message .= "
Email: $email
 
"; $message .= ""; $message .= ""; $message .= ""; $message .= ""; $message .= "

Message:

$type
Summary: $summary
$comments

Other Info:

"; $message .= "
IP: ".$_SERVER[REMOTE_HOST]."
"; $message .= "
Host: ".gethostbyaddr($_SERVER[REMOTE_HOST])."
"; $message .= "
Referrer: ".$_SERVER[REFERER]."
"; $message .= ""; $message .= "
Browser: ".$_SERVER[HTTP_USER_AGENT]."
 
"; $message .= ""; // echo "TO: $to
Subject: $subject
Message: $message

Headers: $headers
"; mail($to, $subject, $message, $headers); jumpToPage("thankyou.php"); } // end of else captcha } page_header("Feedback"); echo "

Feedback

"; echo "

"; if ($error!="") echo "Form not submitted:
$error
"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; if ($captcha) { echo ""; } echo ""; echo "
Type of Feedback: (required)"; echo ""; echo "
Your Name:
Summary:
"; echo "If you are reporting a bug, where possible please describe the repeatable steps resulting in the issue. "; echo "This helps Parent Booker resolve your issue much more rapidly.
Message:
Enter Captcha:"; echo "
"; // echo recaptcha_get_html($publickey, null, true); echo "

"; page_footer(); ?>