Commit 3238b888 by Ruha

Клиентские изменения в лендинге

1 parent d97ac680
Pipeline #2629 for 3238b888 skipped in 0 seconds
#overlay { #overlay {
background: rgba(0, 0, 0, .5); background: rgba(0, 0, 0, .5);
position: fixed; position: fixed;
...@@ -311,3 +312,4 @@ input.valid { ...@@ -311,3 +312,4 @@ input.valid {
width: 122px; width: 122px;
} }
} }
...@@ -188,6 +188,18 @@ body { font-family: PFAgoraSansPro; } ...@@ -188,6 +188,18 @@ body { font-family: PFAgoraSansPro; }
#page { position: relative; overflow: hidden; width: 100%; } #page { position: relative; overflow: hidden; width: 100%; }
@media only screen and (min-device-width: 1440px) {
#page {
width: 1200px!important;
margin: 0 auto!important;
box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.15)!important;
}
.ct {padding: 0px 54px!important;}
.map-ct1 .form1 {right:50px!important;}
.logo {left:54px!important;}
#header .t1{left:166px!important;}
}
.ct { max-width: 1152px; margin: auto; position: relative; padding: 0 16px; *zoom: 1; } .ct { max-width: 1152px; margin: auto; position: relative; padding: 0 16px; *zoom: 1; }
.ct:after { content: " "; display: table; clear: both; } .ct:after { content: " "; display: table; clear: both; }
......
...@@ -24,11 +24,12 @@ switch ($type) { ...@@ -24,11 +24,12 @@ switch ($type) {
break; break;
default: default:
echo json_encode(array('type'=>'no_template', 'text'=>'Задайте шаблон обработчика!')); echo json_encode(array('type' => 'no_template', 'text' => 'Задайте шаблон обработчика!'));
break; break;
} }
class Form{ class Form
{
public static function validate($data, $field = null) public static function validate($data, $field = null)
{ {
...@@ -36,31 +37,33 @@ class Form{ ...@@ -36,31 +37,33 @@ class Form{
case 'phone': case 'phone':
if (!preg_match("/^(8|\+7) ? ?\(?(\d{3})\)? ?(\d{3})[ -]?(\d{2})[ -]?(\d{2})/", $data)) if (!preg_match("/^(8|\+7) ? ?\(?(\d{3})\)? ?(\d{3})[ -]?(\d{2})[ -]?(\d{2})/", $data))
die(json_encode(array('type'=>'error_phone', 'text'=>'Телефон введен неверно'))); die(json_encode(array('type' => 'error_phone', 'text' => 'Телефон введен неверно')));
return $data; return $data;
break; break;
case 'name': case 'name':
if (mb_strlen($data) <= 1) if (mb_strlen($data) <= 1)
die(json_encode(array('type'=>'error_name', 'text'=>'Вы не ввели имя'))); die(json_encode(array('type' => 'error_name', 'text' => 'Вы не ввели имя')));
return $data; return $data;
break; break;
case 'email': case 'email':
if (!preg_match("/.+@.+\..+/i", $data)) if (!preg_match("/.+@.+\..+/i", $data))
die(json_encode(array('type'=>'error_email', 'text'=>'Почтовый адрес введен неверно'))); die(json_encode(array('type' => 'error_email', 'text' => 'Почтовый адрес введен неверно')));
return $data; return $data;
break; break;
default: default:
if (strlen($data) < 2) if (strlen($data) < 2)
die(json_encode(array('type'=>'error', 'text'=>"Поле $field пусто"))); die(json_encode(array('type' => 'error', 'text' => "Поле $field пусто")));
return $data; return $data;
} }
} }
public function send(array $data) public function send(array $data)
{ {
} }
} }
class callback extends Form { class callback extends Form
{
public $phone; public $phone;
public $till; public $till;
...@@ -74,22 +77,24 @@ class callback extends Form { ...@@ -74,22 +77,24 @@ class callback extends Form {
$this->from = $data['from']; $this->from = $data['from'];
} }
public function send(){ public function send()
{
global $mailTo; global $mailTo;
$headers = 'MIME-Version: 1.0' . "\r\n"; $headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: Landing_Page <testmail@test.ru>'; $headers .= 'From: Landing_Page <testmail@test.ru>';
$subject = "Заявка на франшизу"; $subject = "Заявка на франшизу";
$message = 'Телефон: '. $this->phone . '<br>'; $message = 'Телефон: ' . $this->phone . '<br>';
$message .= 'Звонить с ' . $this->till . '<br>'; $message .= 'Звонить с ' . $this->till . '<br>';
$message .= 'До ' . $this->from . '<br>'; $message .= 'До ' . $this->from . '<br>';
if (mail($mailTo, $subject, $message, $headers)) { if (mail($mailTo, $subject, $message, $headers)) {
echo json_encode(array('type'=>'success_send', 'text'=>'Ваша заявка успешно отправлена')); echo json_encode(array('type' => 'success_send', 'text' => 'Ваша заявка успешно отправлена'));
} }
} }
} }
class order extends Form { class order extends Form
{
public $name; public $name;
public $city; public $city;
...@@ -103,20 +108,22 @@ class order extends Form { ...@@ -103,20 +108,22 @@ class order extends Form {
$this->email = Form::validate($data['email'], 'email'); $this->email = Form::validate($data['email'], 'email');
} }
public function send(){ public function send()
{
global $mailTo; global $mailTo;
$headers = 'MIME-Version: 1.0' . "\r\n"; $headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: Landing_Page <testmail@test.ru>'; $headers .= 'From: Landing_Page <testmail@test.ru>';
$subject = "Заявка на франшизу"; $subject = "Заявка на франшизу";
$message = 'Клиента зовут: '. $this->name . '<br>'; $message = 'Клиента зовут: ' . $this->name . '<br>';
$message .= 'Почтовый ящик: ' . $this->email . '<br>'; $message .= 'Почтовый ящик: ' . $this->email . '<br>';
$message .= 'Город: ' . $this->city . '<br>'; $message .= 'Город: ' . $this->city . '<br>';
if (mail($mailTo, $subject, $message, $headers)) { if (mail($mailTo, $subject, $message, $headers)) {
echo json_encode(array('type'=>'success_send', 'text'=>'Ваша заявка успешно отправлена')); echo json_encode(array('type' => 'success_send', 'text' => 'Ваша заявка успешно отправлена'));
} }
} }
} }
img/w5.jpg

296 KB

...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="ov"> <div class="ov">
<div><span>18</span><i>филиалов крупной сети <br>языковых школ</i></div> <div><span>18</span><i>филиалов крупной сети <br>языковых школ</i></div>
<div><span>9</span><i>действующих <br>франчайзи</i></div> <div><span>9</span><i>действующих <br>франчайзи</i></div>
<div><span>16</span><i>лет оптыта</i></div> <div><span>16</span><i>лет<br>оптыта</i></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<div class="t1">Яркий и узнаваемый бренд</div> <div class="t1">Яркий и узнаваемый бренд</div>
<div class="ov1"> <div class="ov1">
<div class="ll1"><img src="img/w4.jpg" alt=""><span></span></div> <div class="ll1"><img src="img/w4.jpg" alt=""><span></span></div>
<div class="ll1"><img src="img/w3.jpg" alt=""><span></span></div> <div class="ll1"><img src="img/w5.jpg" alt=""><span></span></div>
<div class="sl3"> <div class="sl3">
<div> <div>
<div class="ll1"><img src="img/w1.jpg" alt=""><span>Офис-франчайзи в Санкт-Петербурге</span> <div class="ll1"><img src="img/w1.jpg" alt=""><span>Офис-франчайзи в Санкт-Петербурге</span>
......
...@@ -143,12 +143,12 @@ $('.modal-close-xray').click(function () { ...@@ -143,12 +143,12 @@ $('.modal-close-xray').click(function () {
closemodal($(this).parents('.modal').attr('id')); closemodal($(this).parents('.modal').attr('id'));
}); });
function callmodal(id) { function callmodal(id) {
overlay.css({'display':'flex'}); overlay.css({'display': 'flex'});
$('#' + id).removeClass('hidden'); $('#' + id).removeClass('hidden');
} }
function closemodal(id) { function closemodal(id) {
overlay.css({'display':'none'}); overlay.css({'display': 'none'});
$('#' + id).addClass('hidden'); $('#' + id).addClass('hidden');
} }
...@@ -171,9 +171,9 @@ function time(number, type) { ...@@ -171,9 +171,9 @@ function time(number, type) {
var d = new Date(); var d = new Date();
d.setTime(Date.parse(time)); d.setTime(Date.parse(time));
if (type == 'down') { if (type == 'down') {
d=moment(d).add(-30, 'minutes').format('HH:mm'); d = moment(d).add(-30, 'minutes').format('HH:mm');
} else { } else {
d=moment(d).add(30, 'minutes').format('HH:mm'); d = moment(d).add(30, 'minutes').format('HH:mm');
} }
return d; return d;
...@@ -243,7 +243,7 @@ $(document).ready(function () { ...@@ -243,7 +243,7 @@ $(document).ready(function () {
maxlength: "", maxlength: "",
}, },
email: { email: {
email : " Некорректный адрес", email: " Некорректный адрес",
required: "Введите email", required: "Введите email",
minlength: "Введите email", minlength: "Введите email",
...@@ -255,7 +255,7 @@ $(document).ready(function () { ...@@ -255,7 +255,7 @@ $(document).ready(function () {
$("#callback-form").validate({ $("#callback-form").validate({
rules: { rules: {
phone: { phone: {
digits:true, digits: true,
required: true, required: true,
minlength: 3, minlength: 3,
maxlength: 40 maxlength: 40
...@@ -297,7 +297,7 @@ $(document).ready(function () { ...@@ -297,7 +297,7 @@ $(document).ready(function () {
maxlength: "", maxlength: "",
}, },
email: { email: {
email : "Некорректный адрес", email: "Некорректный адрес",
required: "Введите email", required: "Введите email",
minlength: "Введите email" minlength: "Введите email"
...@@ -306,3 +306,8 @@ $(document).ready(function () { ...@@ -306,3 +306,8 @@ $(document).ready(function () {
}) })
}); });
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!