query("SELECT * FROM Pages WHERE ID = '$Page'"); if (!$PageQuery) { $PageQuery = $link->query("SELECT * FROM Pages WHERE ID = '1'"); } $row = $PageQuery->fetch(PDO::FETCH_ASSOC); $PageName = $row['Name']; $PageContents = html_entity_decode($row['Contents'], ENT_QUOTES); if ($row['Background'] == '1') { $Background = "
"; } else { $Background = "
"; } $MailSent = '0'; $CAPTCHA = '0'; if (isset($_POST['Query'])) { $Name = htmlentities($_POST['Name'], ENT_QUOTES); $Email = htmlentities($_POST['Email'], ENT_QUOTES); $ContactNo = htmlentities($_POST['ContactNo'], ENT_QUOTES); $Query = htmlentities($_POST['Query'], ENT_QUOTES); $InterestedIn = htmlentities($_POST['EnquiryType'], ENT_QUOTES); if ($InterestedIn == 'BuyVideo') { $InterestedIn = "buying a video"; } if ($InterestedIn == 'SafariFilming') { $InterestedIn = "filming a safari"; } if ($InterestedIn == 'BookSafari') { $InterestedIn = "booking a safari"; } if ($InterestedIn == 'StockFootage') { $InterestedIn = "stock footage"; } $secret = '6LfBHgsUAAAAAMqc2a6z3TyvIhrdO0RUrEm-nNUr'; $response=$_POST["g-recaptcha-response"]; $verify=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret={$secret}&response={$response}"); $captcha_success=json_decode($verify); if ($captcha_success->success==true) { include('./sendmail.php'); $to = 'clive@safari-vision.com'; //$to = 'john@symphonypc.com'; $subject = 'Query from Safari-Vision.com website'; $message = "$Name at $Email asked:

$Query

regarding $InterestedIn - they gave their number as $ContactNo"; $name = $Name; $mailsend = sendmail($to, $subject, $message, $name, $Email); if ($mailsend == 1) { $MailSent = '1'; } else { $MailSent = '2'; } } else { $CAPTCHA = '2'; } } ?> Safari-Vision - Africa "; } ?>

Your message could not be sent. Please contact us on the number below
"; } elseif ($CAPTCHA == '2') { echo "
Please click on the ReCaptcha box
"; } elseif ($MailSent == '1') { echo "
Your message was sent
"; } //echo "MailSent = $MailSent, CAPTCHA = $CAPTCHA"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
Name"; echo "

Email

Phone Number

Interested In

Your Enquiry

Please click here

"; } else { echo $PageContents; } echo "
"; ?>