-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
135 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
RewriteEngine On | ||
RewriteCond %{SERVER_PORT} !^443$ | ||
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ | |
<script src="scripts/ya.js"></script> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<noscript><div><img src="https://mc.yandex.ru/watch/96480520" style="position:absolute; left:-9999px;" alt="" /></div></noscript> | ||
<link rel="stylesheet" href="style.css?version=9"> | ||
<script src="scripts/script.js?version=6" defer></script> | ||
<link rel="stylesheet" href="style.css?version=10"> | ||
<script src="scripts/script.js?version=12" defer></script> | ||
<script src="./scripts/prices.js" defer></script> | ||
<title>Сочисто! | Уборка квартир в Сочи</title> | ||
<link rel="icon" href="img/favicon.jpg"> | ||
|
@@ -75,9 +75,6 @@ <h1 class="text-accent white-text place5 fade-in-up"> | |
<h1 class="text-accent">Оставьте заявку</h1> | ||
<div id="success" class="fade-in-up"> | ||
<div class="container"> | ||
<h2 class="centered text-accent"> | ||
Спасибо | ||
</h2> | ||
<p class="centered text"> | ||
Мы свяжемся с вами в самое ближайшее время для уточнения деталей и записи на уборку. | ||
</p> | ||
|
@@ -90,11 +87,26 @@ <h2 class="centered text-accent"> | |
<p class="text"> | ||
Вы сможете узнать всю необходимую информацию и забронировать время уборки. | ||
</p> | ||
<form id="clientForm"> | ||
|
||
<!-- <form enctype="multipart/form-data" action="/settings/uploadFile" method="post" class="dropzone" id="my-awesome-dropzone"> | ||
<input type="text" name="x" value="kittens"> | ||
<input type="text" name="y" value="puppies"> | ||
</form> --> | ||
|
||
|
||
<form class="clientForm" enctype="multipart/form-data" action="mail.php" method="post"> | ||
|
||
<!-- Hidden Required Fields --> | ||
<input type="hidden" name="project_name" value="Сочисто"> | ||
<input type="hidden" name="admin_email" value="[email protected]"> | ||
<input type="hidden" name="form_subject" value="Новая заявка на сайте"> | ||
<!-- END Hidden Required Fields --> | ||
|
||
|
||
<input class="text input" type="text" id="name" name="name" placeholder="Ваше имя" required> | ||
<input class="text input" type="tel" id="phone" name="phone" placeholder="Ваш телефон" required> | ||
<div class="after-list"> | ||
<div id="submit" class="cta button text-accent inner-container"> | ||
<div id="submit" class="cta button text-accent inner-container" action="mail.php" method="post"> | ||
Перезвоните мне | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
$method = $_SERVER['REQUEST_METHOD']; | ||
|
||
if ( $method === 'POST' ) { | ||
$json = file_get_contents('php://input'); | ||
$data = json_decode($json, true); | ||
|
||
$name = $data['name']; | ||
$phone = $data['phone']; | ||
|
||
$message = ' | ||
С формы "Оставьте заявку" на сайте sochisto.ru пришла новая заявка: | ||
' . $name . ' | ||
' . $phone . ' | ||
'; | ||
|
||
} else if ( $method === 'GET' ) { | ||
echo 'GET is not supported'; | ||
}; | ||
|
||
|
||
|
||
$to = "[email protected]"; | ||
$subject = "Сочисто - новая заявка на форме"; | ||
|
||
|
||
$headers = "From: [email protected]\r\n"; | ||
// $headers .= "Reply-To: [email protected]\r\n"; | ||
$headers .= "CC: [email protected]\r\n"; | ||
$headers .= "BCC: [email protected]\r\n"; | ||
$headers .= "Content-Type: text/plain; charset=utf-8\r\n"; | ||
|
||
$mail_result = mail($to, $subject, $message, $headers); | ||
|
||
if ($mail_result) { | ||
echo "Email успешно отправлен 📧"; | ||
} else { | ||
echo "Что-то пошло не так при отправке письма 🙁"; | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters