Merge branch 'master' of gitlab.com:delkappa/delkappa
This commit is contained in:
commit
ef9fbb378e
@ -9,9 +9,9 @@ if($_POST) {
|
|||||||
$email = trim(stripslashes($_POST['contactEmail']));
|
$email = trim(stripslashes($_POST['contactEmail']));
|
||||||
$subject = trim(stripslashes($_POST['contactSubject']));
|
$subject = trim(stripslashes($_POST['contactSubject']));
|
||||||
$contact_message = trim(stripslashes($_POST['contactMessage']));
|
$contact_message = trim(stripslashes($_POST['contactMessage']));
|
||||||
if(isset($_POST['contactCaptcha'])){
|
// if(isset($_POST['contactCaptcha'])){
|
||||||
$captcha = $_POST['contactCaptcha'];
|
// $captcha = $_POST['contactCaptcha'];
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Check Name
|
// Check Name
|
||||||
if (strlen($name) < 2) {
|
if (strlen($name) < 2) {
|
||||||
@ -26,14 +26,14 @@ if($_POST) {
|
|||||||
$error['message'] = "Please enter your message. It should have at least 10 characters.";
|
$error['message'] = "Please enter your message. It should have at least 10 characters.";
|
||||||
}
|
}
|
||||||
// Captcha
|
// Captcha
|
||||||
if (!$captcha){
|
// if (!$captcha){
|
||||||
$error['captcha'] = "Please check the CAPTCHA field.";
|
// $error['captcha'] = "Please check the CAPTCHA field.";
|
||||||
} else {
|
// } else {
|
||||||
$captchaResponse = json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6Le7VisUAAAAAKExpdr5NJy8AHGM0Y3iPI1eVZgD&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']), true);
|
$captchaResponse = json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6Le7VisUAAAAAKExpdr5NJy8AHGM0Y3iPI1eVZgD&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']), true);
|
||||||
if($captchaResponse['success'] == false) {
|
if($captchaResponse['success'] == false) {
|
||||||
$error['captcha'] = "You are a robot.";
|
$error['captcha'] = "You are a robot.";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
$mail = new PHPMailer;
|
$mail = new PHPMailer;
|
||||||
|
|
||||||
|
@ -393,7 +393,8 @@
|
|||||||
<textarea cols="50" rows="15" maxlength="1500" id="contactMessage" name="contactMessage" placeholder="Message" style="resize: vertical; font-family: inherit; font-size: inherit"></textarea>
|
<textarea cols="50" rows="15" maxlength="1500" id="contactMessage" name="contactMessage" placeholder="Message" style="resize: vertical; font-family: inherit; font-size: inherit"></textarea>
|
||||||
<button
|
<button
|
||||||
class="g-recaptcha submit"
|
class="g-recaptcha submit"
|
||||||
data-sitekey="6Le7VisUAAAAAIn3TfNvR6srMLuVa6Xw09zojiIt">
|
data-sitekey="6Le7VisUAAAAAIn3TfNvR6srMLuVa6Xw09zojiIt"
|
||||||
|
>
|
||||||
Submit
|
Submit
|
||||||
</button>
|
</button>
|
||||||
<span id="image-loader">
|
<span id="image-loader">
|
||||||
|
Loading…
Reference in New Issue
Block a user