Init
This commit is contained in:
30
modal-form/bottom_send.php
Normal file
30
modal-form/bottom_send.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
include $_SERVER['DOCUMENT_ROOT'] . '/modal-form/cp.php';
|
||||
|
||||
$cp = new ReCaptcha('6LegdywdAAAAAJaQLxIlHnITncRtuHQu-HHxeAYG');
|
||||
$cpResult = $cp->verifyResponse($_SERVER['REMOTE_ADDR'], $_POST['recaptcha_response']);
|
||||
if (!$cpResult->success) {
|
||||
exit('Ошибка');
|
||||
}
|
||||
|
||||
if(strlen($_POST['phone']) < 4) die;
|
||||
$subject = 'Задать вопрос с ' . $_SERVER['HTTP_HOST'] . ' ' . date('d-m-Y H:i');
|
||||
|
||||
if(!$_POST['page_name']) $_POST['page_name'] = 'ссылка';
|
||||
|
||||
$msg = '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Задать вопрос с ' . $_SERVER['HTTP_HOST'] . ' ' . date('d-m-Y H:i') . '</title>
|
||||
</head>
|
||||
<body>
|
||||
Имя: ' . $_POST['name'] . '<br>
|
||||
Телефон: ' . $_POST['phone'] . '<br>
|
||||
Email: ' . $_POST['email'] . '<br>
|
||||
Сообщение: ' . $_POST['message'] . '<br>
|
||||
Страница: <a href="https://atomicgarage.ru'.$_POST['page_link'].'">'.$_POST['page_name'].'</a>
|
||||
</body></html>';
|
||||
|
||||
|
||||
|
||||
include $_SERVER['DOCUMENT_ROOT'] . '/modal-form/mailer.php';
|
||||
Reference in New Issue
Block a user