Maks | fix: redirect form for widget and clear footer.php and delete trash directory - /services/

web_99
Боевой сайт 2 months ago
parent 8990709ff7
commit db437e7b33
  1. 12
      local/ajax/consultation.php
  2. 14
      local/ajax/order.php
  3. 8
      local/templates/.default/js/custom.js
  4. 122
      local/templates/EraSeptik/footer.php
  5. 47
      local/templates/EraSeptik/js/custom.js
  6. 75
      services/element.php
  7. 81
      services/index.php
  8. 11
      uslugi/ustanovka-septika-dlya-dachi/index.php

@ -8,6 +8,18 @@ $response = array();
if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = trim($_POST["name"]); $name = trim($_POST["name"]);
$phone = trim($_POST["phone"]); $phone = trim($_POST["phone"]);
$recaptcha_response = trim($_POST["recaptcha_response"]);
if ($recaptcha_response){
$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
$recaptcha_secret_key = '6LcSCXArAAAAAEdhWbATecK4jwMK9WvZbUV2szrY';
$recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret_key . '&response=' . $recaptcha_response);
$recaptcha = json_decode($recaptcha);
//score от 0.1 до 1.0
if ($recaptcha->score <= 0.4) return;
}
if (empty($name) || empty($phone)) { if (empty($name) || empty($phone)) {
$response = array( $response = array(

@ -18,6 +18,20 @@ try {
$name = trim($_POST["name"]); $name = trim($_POST["name"]);
$phone = trim($_POST["phone"]); $phone = trim($_POST["phone"]);
$email = trim($_POST["email"]); $email = trim($_POST["email"]);
$recaptcha_response = trim($_POST["recaptcha_response"]);
if ($recaptcha_response){
$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
$recaptcha_secret_key = '6LcSCXArAAAAAEdhWbATecK4jwMK9WvZbUV2szrY';
$recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret_key . '&response=' . $recaptcha_response);
$recaptcha = json_decode($recaptcha);
//score от 0.1 до 1.0
if ($recaptcha->score <= 0.4) return;
}
$deliveryMethod = trim($_POST["delivery_method"]); $deliveryMethod = trim($_POST["delivery_method"]);
$pickupAddress = trim($_POST["pickup_address"]); $pickupAddress = trim($_POST["pickup_address"]);
$address = trim($_POST["address"]); $address = trim($_POST["address"]);

@ -131,7 +131,15 @@ function handleConsultationForm(formElement) {
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
if (data.success) { if (data.success) {
const isFooterPopup = formElement.querySelector('[name="footer_popup_form"]');
const isConsultation = formElement.querySelector('[name="consultation_form"]');
if (isFooterPopup) {
window.location.href = '/spasibo_blue/'; window.location.href = '/spasibo_blue/';
} else if (isConsultation) {
window.location.href = '/spasibo-footer/';
}
formElement.reset(); formElement.reset();
} else { } else {
showCartToast("Ошибка при отправке заявки", 3000, 'error'); showCartToast("Ошибка при отправке заявки", 3000, 'error');

@ -5,7 +5,11 @@ use Bitrix\Main\Page\Asset;
?> ?>
<?$APPLICATION->IncludeComponent("bitrix:main.include","",Array( <? // GP | Форма "Рассчитать септик за 5 минут!" подключаемая из /{папка_раздела}/sect_form_inc.php ?>
<? $APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
array(
"AREA_FILE_SHOW" => "sect", "AREA_FILE_SHOW" => "sect",
"AREA_FILE_SUFFIX" => "form_inc", "AREA_FILE_SUFFIX" => "form_inc",
"AREA_FILE_RECURSIVE" => "Y", "AREA_FILE_RECURSIVE" => "Y",
@ -13,33 +17,25 @@ use Bitrix\Main\Page\Asset;
) )
); ?> ); ?>
<?php if (!preg_match('#^/services(/|$)#', $_SERVER['REQUEST_URI'])): ?> <section class="consultation container">
<? // GP | Если мы в НЕ разделе /services/ ?>
<?php if (!preg_match('#^/services(/|$)#', $_SERVER['REQUEST_URI'])): ?>
<? // GP | Форма "Нужна консультация?" ?>
<section class="consultation container">
<h2 class="consultation__title">Нужна консультация?</h2> <h2 class="consultation__title">Нужна консультация?</h2>
<form action="#" class="consultation__form" onsubmit="handleConsultationForm(this); return false;"> <form action="#" class="consultation__form" onsubmit="handleConsultationForm(this); return false;">
<input type="hidden" name="consultation_form" value="Y"> <input type="text" class="input" name="name" placeholder="Ваше имя" required=""> <input type="tel" class="input" name="phone" placeholder="Номер телефона" required=""> <button class="button button--orange">Получить консультацию</button> <input type="hidden" name="consultation_form" value="Y">
<input type="text" class="search-input" name="name" placeholder="Ваше имя" required>
<input type="tel" class="search-input" name="phone" placeholder="Номер телефона" required>
<button type="submit" class="button button--orange">Получить консультацию</button>
<?= bitrix_sessid_post() ?>
</form> </form>
<div class="consultation__info"> <div class="consultation__info">
Нажимая кнопку «Получить консультацию», вы соглашаетесь с <a href="/dokumentatsiya/politika-konfidentsialnosti/" class="consultation__info--link"><u>условиями конфиденциальности</u></a> Нажимая кнопку «Получить консультацию», вы соглашаетесь с <a href="/dokumentatsiya/politika-konfidentsialnosti/" class="consultation__info--link"><u>условиями конфиденциальности</u></a>
</div> </div>
</section> </section>
<?php endif; ?> <?php if (preg_match('#^/services(/|$)#', $_SERVER['REQUEST_URI'])): ?> <section class="order-call container section">
<div class="order-call__wrap" style="background-image: url('&lt;span id=" title="<?=SITE_TEMPLATE_PATH?>">
<?=SITE_TEMPLATE_PATH?><span class="bxhtmled-surrogate-inner"><span class="bxhtmled-right-side-item-icon"></span><span class="bxhtmled-comp-lable" unselectable="on" spellcheck="false">Код PHP</span></span>/images/png/house.png')"&gt;
<form class="order-call__data" action="#" onsubmit="handleConsultationForm(this); return false;">
<input type="hidden" name="order_call_form" value="Y">
<h2 class="section-title">
Рассчитать септик <span class="orange-text">за 5 минут!</span> </h2>
<p class="order-call__info">
Наш менеджер свяжется с вами в ближайшее время
</p>
<input type="text" class="input" name="name" placeholder="Ваше имя" required=""> <input type="tel" class="input" name="phone" placeholder="Номер телефона" required=""> <button class="button button--orange">Заказать звонок</button>
<p class="order-call__personal">
Нажимая кнопку «Заказать звонок», вы подтверждаете свое согласие на обработку <a href="/dokumentatsiya/politika-konfidentsialnosti/">персональных данных</a>
</p>
</form>
</div>
</section>
<?php endif; ?> <?php endif; ?>
<div class="footer-widget-icons"> <div class="footer-widget-icons">
<button class="footer-widget-icon" id="footer-mail-btn" type="button" title="Почта"> <button class="footer-widget-icon" id="footer-mail-btn" type="button" title="Почта">
<picture> <picture>
@ -59,7 +55,11 @@ use Bitrix\Main\Page\Asset;
<button class="footer-popup__close" id="footer-popup-close" type="button">×</button> <button class="footer-popup__close" id="footer-popup-close" type="button">×</button>
<h2 class="footer-popup__title">Получить консультацию</h2> <h2 class="footer-popup__title">Получить консультацию</h2>
<form class="footer-popup__form" action="#" onsubmit="handleConsultationForm(this); return false;"> <form class="footer-popup__form" action="#" onsubmit="handleConsultationForm(this); return false;">
<input type="hidden" name="footer_popup_form" value="Y"> <input type="text" class="input" name="name" placeholder="Имя" required=""> <input type="tel" class="input" name="phone" placeholder="Номер телефона*" required=""> <input type="email" class="input" name="email" placeholder="Почта"> <button class="button button--orange" type="submit">Отправить заявку</button> <input type="hidden" name="footer_popup_form" value="Y">
<input type="text" class="input" name="name" placeholder="Имя">
<input type="tel" class="input" name="phone" placeholder="Номер телефона*">
<input type="email" class="input" name="email" placeholder="Почта">
<button class="button button--orange" type="submit">Отправить заявку</button>
<p class="footer-popup__personal"> <p class="footer-popup__personal">
Нажимая на кнопку «Отправить заявку», вы соглашаетесь с <a href="/dokumentatsiya/politika-konfidentsialnosti/" target="_blank">условиями конфиденциальности</a> Нажимая на кнопку «Отправить заявку», вы соглашаетесь с <a href="/dokumentatsiya/politika-konfidentsialnosti/" target="_blank">условиями конфиденциальности</a>
</p> </p>
@ -71,13 +71,12 @@ use Bitrix\Main\Page\Asset;
<a class="tap-bar__link" href="/"> <a class="tap-bar__link" href="/">
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2717_16834)"> <g clip-path="url(#clip0_2717_16834)">
<path <path d="M21.5 11.25v9a.75.75 0 0 1-.75.75H15.5a.75.75 0 0 1-.75-.75v-4.875a.375.375 0 0 0-.375-.375h-3.75a.375.375 0 0 0-.375.375v4.875a.75.75 0 0 1-.75.75H4.25a.75.75 0 0 1-.75-.75v-9c0-.398.158-.78.44-1.06l7.5-7.5a1.5 1.5 0 0 1 2.12 0l7.5 7.5a1.5 1.5 0 0 1 .44 1.06Z" fill="currentColor"></path>
d="M21.5 11.25v9a.75.75 0 0 1-.75.75H15.5a.75.75 0 0 1-.75-.75v-4.875a.375.375 0 0 0-.375-.375h-3.75a.375.375 0 0 0-.375.375v4.875a.75.75 0 0 1-.75.75H4.25a.75.75 0 0 1-.75-.75v-9c0-.398.158-.78.44-1.06l7.5-7.5a1.5 1.5 0 0 1 2.12 0l7.5 7.5a1.5 1.5 0 0 1 .44 1.06Z"
fill="currentColor"
></path>
</g> </g>
<defs> <defs>
<clipPath id="clip0_2717_16834"><path fill="#fff" d="M.5 0h24v24H.5z"></path></clipPath> <clipPath id="clip0_2717_16834">
<path fill="#fff" d="M.5 0h24v24H.5z"></path>
</clipPath>
</defs> </defs>
</svg> </svg>
<span>Главная</span> <span>Главная</span>
@ -87,13 +86,12 @@ use Bitrix\Main\Page\Asset;
<a class="tap-bar__link" href="/uslugi/"> <a class="tap-bar__link" href="/uslugi/">
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2717_16839)"> <g clip-path="url(#clip0_2717_16839)">
<path <path d="M24.35 9a6.75 6.75 0 0 1-9.463 6.188l-4.88 5.645a3 3 0 1 1-4.28-4.204c.013-.012.026-.025.04-.036l5.646-4.88a6.757 6.757 0 0 1 7.832-9.26.75.75 0 0 1 .368 1.236L16.1 7.5l.53 2.47 2.47.53 3.811-3.517a.75.75 0 0 1 1.237.368c.134.54.202 1.093.202 1.65Z" fill="currentColor"></path>
d="M24.35 9a6.75 6.75 0 0 1-9.463 6.188l-4.88 5.645a3 3 0 1 1-4.28-4.204c.013-.012.026-.025.04-.036l5.646-4.88a6.757 6.757 0 0 1 7.832-9.26.75.75 0 0 1 .368 1.236L16.1 7.5l.53 2.47 2.47.53 3.811-3.517a.75.75 0 0 1 1.237.368c.134.54.202 1.093.202 1.65Z"
fill="currentColor"
></path>
</g> </g>
<defs> <defs>
<clipPath id="clip0_2717_16839"><path fill="#fff" d="M.6 0h24v24H.6z"></path></clipPath> <clipPath id="clip0_2717_16839">
<path fill="#fff" d="M.6 0h24v24H.6z"></path>
</clipPath>
</defs> </defs>
</svg> </svg>
<span>Услуги</span> <span>Услуги</span>
@ -103,13 +101,12 @@ use Bitrix\Main\Page\Asset;
<button class="tap-bar__link js-catalog" type="button"> <button class="tap-bar__link js-catalog" type="button">
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2717_16844)"> <g clip-path="url(#clip0_2717_16844)">
<path <path d="M21.2 4.6v6a.403.403 0 0 1-.116.283.392.392 0 0 1-.279.117h-7.502V3.4c0-.106.041-.208.115-.283a.392.392 0 0 1 .28-.117h5.922c.42 0 .821.169 1.117.469.297.3.463.707.463 1.131ZM10.702 3H4.78c-.418 0-.82.169-1.116.469A1.61 1.61 0 0 0 3.2 4.6v6c0 .106.042.208.116.283a.392.392 0 0 0 .279.117h7.502V3.4a.403.403 0 0 0-.115-.283.392.392 0 0 0-.28-.117Zm10.103 10h-7.502v7.6c0 .106.041.208.115.283a.392.392 0 0 0 .28.117h5.922c.42 0 .821-.169 1.117-.469.297-.3.463-.707.463-1.131v-6a.403.403 0 0 0-.116-.283.392.392 0 0 0-.279-.117ZM3.2 13.4v6c0 .424.166.831.463 1.131.296.3.698.469 1.116.469h5.923a.392.392 0 0 0 .28-.117.402.402 0 0 0 .115-.283V13H3.595a.392.392 0 0 0-.28.117.403.403 0 0 0-.115.283Z" fill="currentColor"></path>
d="M21.2 4.6v6a.403.403 0 0 1-.116.283.392.392 0 0 1-.279.117h-7.502V3.4c0-.106.041-.208.115-.283a.392.392 0 0 1 .28-.117h5.922c.42 0 .821.169 1.117.469.297.3.463.707.463 1.131ZM10.702 3H4.78c-.418 0-.82.169-1.116.469A1.61 1.61 0 0 0 3.2 4.6v6c0 .106.042.208.116.283a.392.392 0 0 0 .279.117h7.502V3.4a.403.403 0 0 0-.115-.283.392.392 0 0 0-.28-.117Zm10.103 10h-7.502v7.6c0 .106.041.208.115.283a.392.392 0 0 0 .28.117h5.922c.42 0 .821-.169 1.117-.469.297-.3.463-.707.463-1.131v-6a.403.403 0 0 0-.116-.283.392.392 0 0 0-.279-.117ZM3.2 13.4v6c0 .424.166.831.463 1.131.296.3.698.469 1.116.469h5.923a.392.392 0 0 0 .28-.117.402.402 0 0 0 .115-.283V13H3.595a.392.392 0 0 0-.28.117.403.403 0 0 0-.115.283Z"
fill="currentColor"
></path>
</g> </g>
<defs> <defs>
<clipPath id="clip0_2717_16844"><path fill="#fff" d="M.2 0h24v24H.2z"></path></clipPath> <clipPath id="clip0_2717_16844">
<path fill="#fff" d="M.2 0h24v24H.2z"></path>
</clipPath>
</defs> </defs>
</svg> </svg>
<span>Каталог</span> <span>Каталог</span>
@ -119,15 +116,12 @@ use Bitrix\Main\Page\Asset;
<a class="tap-bar__link" href="/cart/"> <a class="tap-bar__link" href="/cart/">
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2717_16849)"> <g clip-path="url(#clip0_2717_16849)">
<path <path d="M18.456 16.938a2.194 2.194 0 0 0 2.103-1.603l-2.103 1.602Zm0 0H9.19a2.192 2.192 0 0 1-2.111-1.603L3.79 3.483l-.012-.046H2.05a.688.688 0 1 1 0-1.374H4.3a.688.688 0 0 1 .663.503l.888 3.2.013.046H22.3a.688.688 0 0 1 .663.872l-2.404 8.651-2.103 1.602ZM8.001 18.805a1.437 1.437 0 1 1 1.598 2.39A1.437 1.437 0 0 1 8 18.805Zm9.75 0a1.437 1.437 0 1 1 1.598 2.39 1.437 1.437 0 0 1-1.598-2.39Z" fill="currentColor" stroke="#939393" stroke-width=".125"></path>
d="M18.456 16.938a2.194 2.194 0 0 0 2.103-1.603l-2.103 1.602Zm0 0H9.19a2.192 2.192 0 0 1-2.111-1.603L3.79 3.483l-.012-.046H2.05a.688.688 0 1 1 0-1.374H4.3a.688.688 0 0 1 .663.503l.888 3.2.013.046H22.3a.688.688 0 0 1 .663.872l-2.404 8.651-2.103 1.602ZM8.001 18.805a1.437 1.437 0 1 1 1.598 2.39A1.437 1.437 0 0 1 8 18.805Zm9.75 0a1.437 1.437 0 1 1 1.598 2.39 1.437 1.437 0 0 1-1.598-2.39Z"
fill="currentColor"
stroke="#939393"
stroke-width=".125"
></path>
</g> </g>
<defs> <defs>
<clipPath id="clip0_2717_16849"><path fill="#fff" d="M.3 0h24v24H.3z"></path></clipPath> <clipPath id="clip0_2717_16849">
<path fill="#fff" d="M.3 0h24v24H.3z"></path>
</clipPath>
</defs> </defs>
</svg> </svg>
<span>Корзина</span> <span>Корзина</span>
@ -137,13 +131,12 @@ use Bitrix\Main\Page\Asset;
<a class="tap-bar__link" href="#"> <a class="tap-bar__link" href="#">
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2717_16854)"> <g clip-path="url(#clip0_2717_16854)">
<path <path d="M19.15 2.25H5.65a1.5 1.5 0 0 0-1.5 1.5v16.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5V3.75a1.5 1.5 0 0 0-1.5-1.5Zm-10.5 16.5a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm0-3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm3.75 3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm0-3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm3.75 3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm0-3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm1.5-5.25a.75.75 0 0 1-.75.75h-9a.75.75 0 0 1-.75-.75V6a.75.75 0 0 1 .75-.75h9a.75.75 0 0 1 .75.75v3.75Z" fill="currentColor"></path>
d="M19.15 2.25H5.65a1.5 1.5 0 0 0-1.5 1.5v16.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5V3.75a1.5 1.5 0 0 0-1.5-1.5Zm-10.5 16.5a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm0-3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm3.75 3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm0-3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm3.75 3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm0-3.75a1.125 1.125 0 1 1 0-2.25 1.125 1.125 0 0 1 0 2.25Zm1.5-5.25a.75.75 0 0 1-.75.75h-9a.75.75 0 0 1-.75-.75V6a.75.75 0 0 1 .75-.75h9a.75.75 0 0 1 .75.75v3.75Z"
fill="currentColor"
></path>
</g> </g>
<defs> <defs>
<clipPath id="clip0_2717_16854"><path fill="#fff" d="M.4 0h24v24H.4z"></path></clipPath> <clipPath id="clip0_2717_16854">
<path fill="#fff" d="M.4 0h24v24H.4z"></path>
</clipPath>
</defs> </defs>
</svg> </svg>
<span>Расчет</span> <span>Расчет</span>
@ -156,19 +149,22 @@ use Bitrix\Main\Page\Asset;
<path d="M14.625 12a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0ZM4.5 9.375a2.625 2.625 0 1 0 0 5.25 2.625 2.625 0 0 0 0-5.25Zm15 0a2.625 2.625 0 1 0 0 5.25 2.625 2.625 0 0 0 0-5.25Z" fill="currentColor"></path> <path d="M14.625 12a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0ZM4.5 9.375a2.625 2.625 0 1 0 0 5.25 2.625 2.625 0 0 0 0-5.25Zm15 0a2.625 2.625 0 1 0 0 5.25 2.625 2.625 0 0 0 0-5.25Z" fill="currentColor"></path>
</g> </g>
<defs> <defs>
<clipPath id="clip0_2717_16859"><path fill="#fff" d="M0 0h24v24H0z"></path></clipPath> <clipPath id="clip0_2717_16859">
<path fill="#fff" d="M0 0h24v24H0z"></path>
</clipPath>
</defs> </defs>
</svg> </svg>
<span>Меню</span> <span>Меню</span>
</button> </button>
</div> </div>
</section> <footer class="footer footer section"> </section>
<footer class="footer footer section">
<div class="container"> <div class="container">
<div class="footer__top"> <div class="footer__top">
<? $APPLICATION->IncludeComponent( <? $APPLICATION->IncludeComponent(
"bitrix:menu", "bitrix:menu",
"footer_menu", "footer_menu",
Array( array(
"ALLOW_MULTI_SELECT" => "N", "ALLOW_MULTI_SELECT" => "N",
"CHILD_MENU_TYPE" => "", "CHILD_MENU_TYPE" => "",
"DELAY" => "N", "DELAY" => "N",
@ -184,7 +180,7 @@ use Bitrix\Main\Page\Asset;
); ?> <? $APPLICATION->IncludeComponent( ); ?> <? $APPLICATION->IncludeComponent(
"bitrix:menu", "bitrix:menu",
"footer_menu", "footer_menu",
Array( array(
"ALLOW_MULTI_SELECT" => "N", "ALLOW_MULTI_SELECT" => "N",
"CHILD_MENU_TYPE" => "", "CHILD_MENU_TYPE" => "",
"DELAY" => "N", "DELAY" => "N",
@ -200,7 +196,7 @@ use Bitrix\Main\Page\Asset;
); ?> <? $APPLICATION->IncludeComponent( ); ?> <? $APPLICATION->IncludeComponent(
"bitrix:menu", "bitrix:menu",
"footer_menu", "footer_menu",
Array( array(
"ALLOW_MULTI_SELECT" => "N", "ALLOW_MULTI_SELECT" => "N",
"CHILD_MENU_TYPE" => "", "CHILD_MENU_TYPE" => "",
"DELAY" => "N", "DELAY" => "N",
@ -218,7 +214,7 @@ use Bitrix\Main\Page\Asset;
<? $APPLICATION->IncludeComponent( <? $APPLICATION->IncludeComponent(
"bitrix:menu", "bitrix:menu",
"footer_menu", "footer_menu",
Array( array(
"ALLOW_MULTI_SELECT" => "N", "ALLOW_MULTI_SELECT" => "N",
"CHILD_MENU_TYPE" => "", "CHILD_MENU_TYPE" => "",
"DELAY" => "N", "DELAY" => "N",
@ -234,7 +230,7 @@ use Bitrix\Main\Page\Asset;
); ?> <? $APPLICATION->IncludeComponent( ); ?> <? $APPLICATION->IncludeComponent(
"bitrix:menu", "bitrix:menu",
"footer_menu", "footer_menu",
Array( array(
"ALLOW_MULTI_SELECT" => "N", "ALLOW_MULTI_SELECT" => "N",
"CHILD_MENU_TYPE" => "", "CHILD_MENU_TYPE" => "",
"DELAY" => "N", "DELAY" => "N",
@ -254,7 +250,7 @@ use Bitrix\Main\Page\Asset;
<? $APPLICATION->IncludeComponent( <? $APPLICATION->IncludeComponent(
"bitrix:main.include", "bitrix:main.include",
"", "",
Array( array(
"AREA_FILE_SHOW" => "file", "AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "", "AREA_FILE_SUFFIX" => "",
"EDIT_TEMPLATE" => "", "EDIT_TEMPLATE" => "",
@ -267,7 +263,7 @@ use Bitrix\Main\Page\Asset;
<? $APPLICATION->IncludeComponent( <? $APPLICATION->IncludeComponent(
"bitrix:main.include", "bitrix:main.include",
"", "",
Array( array(
"AREA_FILE_SHOW" => "file", "AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "", "AREA_FILE_SUFFIX" => "",
"EDIT_TEMPLATE" => "", "EDIT_TEMPLATE" => "",
@ -276,7 +272,7 @@ use Bitrix\Main\Page\Asset;
); ?> <? $APPLICATION->IncludeComponent( ); ?> <? $APPLICATION->IncludeComponent(
"bitrix:main.include", "bitrix:main.include",
"", "",
Array( array(
"AREA_FILE_SHOW" => "file", "AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "", "AREA_FILE_SUFFIX" => "",
"EDIT_TEMPLATE" => "", "EDIT_TEMPLATE" => "",
@ -285,7 +281,7 @@ use Bitrix\Main\Page\Asset;
); ?> <? $APPLICATION->IncludeComponent( ); ?> <? $APPLICATION->IncludeComponent(
"bitrix:main.include", "bitrix:main.include",
"", "",
Array( array(
"AREA_FILE_SHOW" => "file", "AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "", "AREA_FILE_SUFFIX" => "",
"EDIT_TEMPLATE" => "", "EDIT_TEMPLATE" => "",
@ -294,7 +290,7 @@ use Bitrix\Main\Page\Asset;
); ?> <? $APPLICATION->IncludeComponent( ); ?> <? $APPLICATION->IncludeComponent(
"bitrix:main.include", "bitrix:main.include",
"", "",
Array( array(
"AREA_FILE_SHOW" => "file", "AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "", "AREA_FILE_SUFFIX" => "",
"EDIT_TEMPLATE" => "", "EDIT_TEMPLATE" => "",
@ -307,10 +303,12 @@ use Bitrix\Main\Page\Asset;
<div class="cookie-banner" id="cookie-banner"> <div class="cookie-banner" id="cookie-banner">
<span>Продолжая просматривать страницы веб-сайта или нажав кнопку Принять, вы соглашаетесь с <a href="/dokumentatsiya/politika-konfidentsialnosti/" target="_blank">политикой конфиденциальности</a></span> <button class="button button--orange" id="cookie-accept">Принять</button> <span>Продолжая просматривать страницы веб-сайта или нажав кнопку Принять, вы соглашаетесь с <a href="/dokumentatsiya/politika-konfidentsialnosti/" target="_blank">политикой конфиденциальности</a></span> <button class="button button--orange" id="cookie-accept">Принять</button>
</div> </div>
<script type="module" src="<?= DEFAULT_TEMPLATE_PATH . '/js/main.js' ?>"></script> <?php <script type="module" src="<?= DEFAULT_TEMPLATE_PATH . '/js/main.js' ?>"></script>
<?php
Asset::getInstance()->addJs(DEFAULT_TEMPLATE_PATH . '/js/libs/fancybox.umd.js'); Asset::getInstance()->addJs(DEFAULT_TEMPLATE_PATH . '/js/libs/fancybox.umd.js');
Asset::getInstance()->addJs(DEFAULT_TEMPLATE_PATH . '/js/custom.js'); Asset::getInstance()->addJs(DEFAULT_TEMPLATE_PATH . '/js/custom.js');
?> <script> ?>
<script>
// Открытие попапа // Открытие попапа
const mailBtn = document.getElementById('footer-mail-btn'); const mailBtn = document.getElementById('footer-mail-btn');
const popup = document.getElementById('footer-popup'); const popup = document.getElementById('footer-popup');

@ -1,47 +0,0 @@
function handleConsultationForm(formElement) {
if (!formElement) return;
const formData = new FormData(formElement);
const submitButton = formElement.querySelector('.button');
if (submitButton) {
submitButton.disabled = true;
submitButton.classList.add('is-loading');
}
fetch('/ajax/local/consultation.php', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
if (data.success) {
window.location.href = '/spasibo-footer/';
formElement.reset();
} else {
showCartToast("Ошибка при отправке заявки", 3000, 'error');
}
})
.catch(error => {
showCartToast("Произошла ошибка при отправке", 3000, 'error');
})
.finally(() => {
if (submitButton) {
submitButton.disabled = false;
submitButton.classList.remove('is-loading');
}
});
}
document.querySelectorAll('.accordion__title').forEach(title => {
title.addEventListener('click', function() {
this.closest('.js-accordion').classList.toggle('active');
});
});
$('[data-product]').on('click', function(){
$('.cart-popup__wrapper').removeClass('.cart-popup__wrapper--hidden')
$('#fast_product').val($(this).data('product'))
})

@ -1,75 +0,0 @@
<?php
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Услуга");
// Определяем код элемента из URL
$elementCode = isset($_REQUEST["ELEMENT_CODE"]) ? $_REQUEST["ELEMENT_CODE"] : "";
// Если код элемента не передан, проверяем путь
if (empty($elementCode)) {
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$parts = explode('/', trim($path, '/'));
if (count($parts) >= 2) {
$elementCode = end($parts);
}
}
// Отладочный вывод, чтобы проверить значение elementCode
echo "DEBUG: elementCode = |" . htmlspecialchars($elementCode) . "|<br>";
// Если код все еще пустой, выводим ошибку
if (empty($elementCode)) {
echo "Код элемента не указан";
} else {
// Выводим компонент каталога с указанным кодом элемента
$APPLICATION->IncludeComponent(
"bitrix:catalog.element",
"",
array(
"IBLOCK_TYPE" => "services",
"IBLOCK_ID" => "34",
"ELEMENT_CODE" => $elementCode,
"CHECK_SECTION_ID_VARIABLE" => "N",
"SECTION_ID_VARIABLE" => "SECTION_ID",
"SECTION_URL" => "/services/#SECTION_CODE_PATH#/",
"DETAIL_URL" => "/services/#SECTION_CODE_PATH#/#ELEMENT_CODE#/",
"BASKET_URL" => "/personal/basket.php",
"ACTION_VARIABLE" => "action",
"PRODUCT_ID_VARIABLE" => "id",
"PRODUCT_QUANTITY_VARIABLE" => "quantity",
"PRODUCT_PROPS_VARIABLE" => "prop",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_GROUPS" => "Y",
"SET_TITLE" => "Y",
"SET_CANONICAL_URL" => "N",
"SET_BROWSER_TITLE" => "Y",
"SET_META_KEYWORDS" => "Y",
"SET_META_DESCRIPTION" => "Y",
"SET_LAST_MODIFIED" => "N",
"ADD_SECTIONS_CHAIN" => "Y",
"ADD_ELEMENT_CHAIN" => "Y",
"USE_MAIN_ELEMENT_SECTION" => "Y",
"SET_STATUS_404" => "Y",
"SHOW_404" => "Y",
"MESSAGE_404" => "",
"STRICT_SECTION_CHECK" => "N",
"PRICE_CODE" => array(),
"USE_PRICE_COUNT" => "N",
"SHOW_PRICE_COUNT" => "1",
"PRICE_VAT_INCLUDE" => "Y",
"PRICE_VAT_SHOW_VALUE" => "N",
"CONVERT_CURRENCY" => "N",
"HIDE_NOT_AVAILABLE" => "N",
"HIDE_NOT_AVAILABLE_OFFERS" => "Y",
"USE_ELEMENT_COUNTER" => "Y",
"SHOW_DEACTIVATED" => "N",
"DISABLE_INIT_JS_IN_COMPONENT" => "N",
"COMPATIBLE_MODE" => "N",
),
false
);
}
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");
?>

@ -1,81 +0,0 @@
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Услуги");
?>
<?$APPLICATION->IncludeComponent(
"bitrix:news",
"services",
array(
"IBLOCK_TYPE" => "content",
"IBLOCK_ID" => "34",
"NEWS_COUNT" => "20",
"USE_SEARCH" => "N",
"USE_RSS" => "N",
"USE_RATING" => "N",
"USE_CATEGORIES" => "N",
"USE_REVIEW" => "N",
"USE_FILTER" => "N",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_ORDER1" => "DESC",
"SORT_BY2" => "SORT",
"SORT_ORDER2" => "ASC",
"CHECK_DATES" => "Y",
"SEF_MODE" => "Y",
"SEF_FOLDER" => "/services/",
"AJAX_MODE" => "N",
"CACHE_TYPE" => "A",
"CACHE_TIME" => "36000000",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"SET_TITLE" => "Y",
"SET_STATUS_404" => "N",
"INCLUDE_IBLOCK_INTO_CHAIN" => "Y",
"ADD_SECTIONS_CHAIN" => "Y",
"USE_PERMISSIONS" => "N",
"PREVIEW_TRUNCATE_LEN" => "0",
"LIST_ACTIVE_DATE_FORMAT" => "d.m.Y",
"LIST_FIELD_CODE" => array(
0 => "NAME",
1 => "PREVIEW_TEXT",
2 => "PREVIEW_PICTURE",
3 => "",
),
"LIST_PROPERTY_CODE" => array(
0 => "PRICE",
1 => "TIME",
2 => "",
),
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"PARENT_SECTION" => "",
"PARENT_SECTION_CODE" => "",
"INCLUDE_SUBSECTIONS" => "Y",
"STRICT_SECTION_CHECK" => "N",
"DETAIL_ACTIVE_DATE_FORMAT" => "d.m.Y",
"DETAIL_FIELD_CODE" => array(
0 => "NAME",
1 => "DETAIL_TEXT",
2 => "PREVIEW_TEXT",
),
"DETAIL_PROPERTY_CODE" => array(
0 => "HTML",
1 => "PRICE",
2 => "TIME",
),
"SET_CANONICAL_URL" => "N",
"SET_LAST_MODIFIED" => "N",
"SET_META_KEYWORDS" => "N",
"SET_META_DESCRIPTION" => "N",
"SET_BROWSER_TITLE" => "N",
"MESSAGE_404" => "",
"SEF_URL_TEMPLATES" => array(
"news" => "",
"section" => "",
"detail" => "#ELEMENT_CODE#/",
)
),
false
);?>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>

@ -43,13 +43,4 @@ $APPLICATION->IncludeFile($APPLICATION->GetCurDir() . 'page-content.php', array(
)); ));
?> ?>
<? // GP | Форма "Рассчитать септик за 5 минут! ?> <? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php"); ?>
<? /*$APPLICATION->IncludeComponent(
"bitrix:main.include",
"",
array(
"AREA_FILE_SHOW" => "file",
"PATH" => "/include/order-call.php"
)
); */?>
<? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php"); ?><? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php"); ?>
Loading…
Cancel
Save