<file_sep><?
$MESS ['MAIN_FEEDBACK_COMPONENT_NAME'] = "Форма обратной связи AVION";
$MESS ['MAIN_FEEDBACK_COMPONENT_DESCR'] = "Форма для отправки сообщения с сайта на E-mail";
?><file_sep><?
$aMenuLinks = Array(
	Array(
		"О компании", 
		"/about/", 
		Array(), 
		Array(), 
		"" 
	),
	Array(
		"Сервис", 
		"/service/", 
		Array(), 
		Array(), 
		"" 
	),
	Array(
		"Новинки", 
		"/novelty/", 
		Array(), 
		Array(), 
		"" 
	),
	Array(
		"Новости", 
		"/news/", 
		Array(), 
		Array(), 
		"" 
	)
);
?><file_sep><?
$sSectionName = "О компании";
$arDirProperties = [

];
<file_sep>document.addEventListener('DOMContentLoaded', () => {

	document.querySelector('.header-mobile__burger').addEventListener('click', () => {
		document.querySelectorAll('.header-mobile__nav, .header-mobile__burger')
			.forEach(elem => elem.classList.toggle('active'));

		document.body.classList.toggle('block');
	})

	document.querySelector('.header-bot__navigation_btn').addEventListener('click', () => {
		const category = document.querySelector('.header-catalog');
		category.classList.toggle('active')
	})
	
	document.querySelectorAll('.header-mobile__list_btnNav, .header-bot__navigation_btn').forEach((elem) =>{
		elem.addEventListener('click', (event) => {
			const currentElem = event.currentTarget.parentElement;
			currentElem.classList.toggle('active')
		})
	})

	document.querySelectorAll('.button-callback').forEach((elem) => {
		elem.addEventListener('click', () => document.querySelector('#callback-form').classList.add('active'))
	})

	document.querySelectorAll('.callback-form__close').forEach((elem) => {
		elem.addEventListener('click', event => event.currentTarget.parentElement.parentElement.classList.remove('active'))
	})

	document.querySelectorAll('.basket_btn').forEach((elem) => {
		elem.addEventListener('click', (event) => {
			const currentElem = event.currentTarget;
			currentElem.classList.toggle('active')
		})
	})

	document.querySelectorAll('.header-bot__search_input').forEach(el => {
		el.addEventListener('focus', (event) => {
			const curentElem = event.currentTarget;
			curentElem.parentElement.classList.add('active');
		})
		el.addEventListener('blur', (event) => {
			const curentElem = event.currentTarget;
			if(!curentElem.value) {
				curentElem.parentElement.classList.remove('active');
			}
		})
	})
})

const swiperBannerAd = new Swiper ('.slider-banner-ad', {

	pagination: {
		el: '.banner-pagination',
		clickable: true,
	},
	navigation: {
		nextEl: '.banner-button-next',
		prevEl: '.banner-button-prev',
	},
});

const swiperSliderSell = new Swiper ('.slider-banner-sell', {
	slidesPerView: 1.2,
	spaceBetween: 15,
	navigation: {
		nextEl: '.sell-button-next',
		prevEl: '.sell-button-prev',
	},
	pagination: {
		el: '.sell-pagination',
		clickable: true,
	},
	breakpoints: {
		576: {
			slidesPerView: 4,
		}
	}
});

const swiperSliderSection = new Swiper ('.slider-banner-section', {
	slidesPerView: 1.2,
	spaceBetween: 15,
	pagination: {
		el: '.section-pagination',
		clickable: true,
	},
	navigation: {
		nextEl: '.section-button-next',
		prevEl: '.section-button-prev',
	},
	breakpoints: {
		576: {
			slidesPerView: 4,
		}
	}
});


const productImgSmall = new Swiper ('.banner-product__small', {
	slidesPerView: 4,
	watchOverflow: true,
	
});
const productImgBig = new Swiper ('.banner-product__big', {
	effect: "fade",
	thumbs: {
        swiper: productImgSmall,
	},
	pagination: {
		el: '.banner-product-pagination',
		clickable: true,
	},
});<file_sep><?
$sSectionName = "Новинки";
$arDirProperties = [

];
<file_sep>document.addEventListener('DOMContentLoaded', () => {

    if(window['avion_main_feedback_loaded']) {
        return;
    }

    window['avion_main_feedback_loaded'] = true;

    const avionMainFeedback_result = (formElement, result) => {
        console.log(result);

        formElement.querySelectorAll('#feedback-form__title, .feedback-form__download, .feedback-form__subtitle, .feedback-form__file, button, .feedback-form__input-name').forEach(el => el.removeAttribute('style'))
        formElement.querySelector('#feedback-form__sending').setAttribute('style', 'display:none');

        if(result && result.success) {
            document.querySelector('#callback-result').classList.add('active');
            formElement.querySelector('input[type="file"]').dispatchEvent(new Event('recalc'));
        } else {
            alert(result.error || 'Произошла неизвестная ошибка, попробуйте позднее')
        }
    }

    const handlerFunction = event => {
        event.stopPropagation();
        event.preventDefault();

        switch (event.type) {
            case 'dragover':
                event.currentTarget.setAttribute('style', 'border-color:#62BB46');
                break;
            case 'dragleave':
                event.currentTarget.removeAttribute('style');
                break;
            case 'drop':
                event.currentTarget.removeAttribute('style');
                const fileInput = event.currentTarget.parentElement.querySelector('input[type="file"]');
                fileInput.addFiles(event.dataTransfer.files);
                break;
        }
    };

    document.querySelectorAll('.feedback-form__file').forEach(dropArea => {

        let fileCounter = 0;

        dropArea.buff = new ClipboardEvent("").clipboardData || new DataTransfer();

        const formElement = dropArea.parentElement;

        formElement.addEventListener('submit', async event => {
            event.stopPropagation();
            event.preventDefault();

            const formData = new FormData(event.currentTarget);

            try {
                event.currentTarget.querySelectorAll('.feedback-form__download, #feedback-form__title, .feedback-form__subtitle, .feedback-form__file, button, .feedback-form__input-name').forEach(el => el.setAttribute('style', 'display:none'))
                event.currentTarget.querySelector('#feedback-form__sending').removeAttribute('style');

                const response = await fetch(event.currentTarget.getAttribute('action'), {
                    method: 'POST',
                    body: formData
                });

                avionMainFeedback_result(formElement, await response.json())
            } catch (error) {
                avionMainFeedback_result(formElement, {error: 'Произошла неизвестная ошибка, попробуйте позднее', success: false});
            }
        })

        const fileInput = formElement.querySelector('input[type="file"]');

        fileInput.addFiles = function (files) {
            for (let i = 0, len = files.length; i < len; i++) {
                fileCounter++;
                files[i].id = fileCounter;
                dropArea.buff.items.add(files[i])
            }
            this.files = dropArea.buff.files;
            this.dispatchEvent(new Event('recalc'));
        }

        fileInput.removeFile = function (file_id) {
            for (let i = 0, len = dropArea.buff.items.length; i < len; i++) {
                if (file_id === dropArea.buff.items[i].id) {
                    dropArea.buff.items.remove(files[i])
                }
            }
            this.files = dropArea.buff.files;
            this.dispatchEvent(new Event('recalc'));
        }

        fileInput.addEventListener('change', function () {
            fileInput.addFiles(this.files);
        });

        fileInput.addEventListener('recalc', (event) => {

            [...event.currentTarget.files].forEach(file => {

                if (document.querySelector(`#uploadedFile${file.id}`)) {
                    return;
                }

                const error = file.type.search(/^image\/*/) === -1 ? 'Загрузить можно только фографии' : null;

                dropArea.insertAdjacentHTML('afterend', `
                    <div class="feedback-form__download ${error ? 'error' : 'finish'}">
                        <div class="feedback-form__download_content">
                            <div class="feedback-form__download_icon">
                                <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
                                    <path d="M6 1.5H13.5V3H6C5.60218 3 5.22064 3.15804 4.93934 3.43934C4.65804 3.72064 4.5 4.10218 4.5 4.5V19.5C4.5 19.8978 4.65804 20.2794 4.93934 20.5607C5.22064 20.842 5.60218 21 6 21H18C18.3978 21 18.7794 20.842 19.0607 20.5607C19.342 20.2794 19.5 19.8978 19.5 19.5V9H21V19.5C21 20.2956 20.6839 21.0587 20.1213 21.6213C19.5587 22.1839 18.7956 22.5 18 22.5H6C5.20435 22.5 4.44129 22.1839 3.87868 21.6213C3.31607 21.0587 3 20.2956 3 19.5V4.5C3 3.70435 3.31607 2.94129 3.87868 2.37868C4.44129 1.81607 5.20435 1.5 6 1.5Z"
                                          fill="currentColor"></path>
                                    <path d="M13.5 6.75V1.5L21 9H15.75C15.1533 9 14.581 8.76295 14.159 8.34099C13.7371 7.91903 13.5 7.34674 13.5 6.75Z"
                                          fill="currentColor"></path>
                                </svg>
                            </div>
                            <div class="feedback-form__download_loading">
                                <div class="feedback-form__download_filename">
                                    <div class="feedback-form__download_name">${file.name}</div>
                                    <div class="feedback-form__download_number">${error ? '0' : '100'}%</div>
                                </div>
                                <div class="feedback-form__download_line"></div>
                                <div class="feedback-form__download_error">${error}</div>
                            </div>
                        </div>
                        <button class="feedback-form__download_del" id="uploadedFile${file.id}"></button>
                    </div>`);

                document.querySelector(`#uploadedFile${file.id}`).addEventListener('click', event => {
                    event.stopPropagation();
                    event.preventDefault();
                    fileInput.removeFile(Number(event.currentTarget.id.replace('uploadedFile', '')))
                    event.currentTarget.parentElement.remove();
                });
            });

        }, false)

        dropArea.addEventListener('click', () => fileInput.click(), false)
        dropArea.addEventListener('dragenter', handlerFunction, false)
        dropArea.addEventListener('dragleave', handlerFunction, false)
        dropArea.addEventListener('dragover', handlerFunction, false)
        dropArea.addEventListener('drop', handlerFunction, false)
    });
})<file_sep><?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>

<form class="header-bot__search" action="<?=$arResult["FORM_ACTION"]?>">

    <?if($arParams["USE_SUGGEST"] === "Y"):?>

        <?$APPLICATION->IncludeComponent(
            "bitrix:search.suggest.input",
            "",
            array(
                "NAME" => "q",
                "VALUE" => "",
                "INPUT_SIZE" => 15,
                "DROPDOWN_SIZE" => 10,
            ),
            $component, array("HIDE_ICONS" => "Y")
        );?>

    <?else:?>

        <input type="text" id="search-text"/>
        <label for="search-text">Название или номер...</label>

    <?endif;?>

    <button class="header-bot__search_icon" name="s" type="submit" value="<?=GetMessage("BSF_T_SEARCH_BUTTON");?>">
        <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
            <path fill-rule="evenodd" clip-rule="evenodd" d="M10.4422 10.442C10.5351 10.349 10.6454 10.2752 10.7667 10.2249C10.8881 10.1746 11.0183 10.1487 11.1497 10.1487C11.2811 10.1487 11.4112 10.1746 11.5326 10.2249C11.654 10.2752 11.7643 10.349 11.8572 10.442L15.7072 14.292C15.8948 14.4795 16.0003 14.7338 16.0004 14.9991C16.0005 15.2644 15.8952 15.5188 15.7077 15.7065C15.5202 15.8941 15.2658 15.9996 15.0005 15.9997C14.7353 15.9998 14.4808 15.8945 14.2932 15.707L10.4432 11.857C10.3502 11.7641 10.2765 11.6538 10.2261 11.5324C10.1758 11.411 10.1499 11.2809 10.1499 11.1495C10.1499 11.0181 10.1758 10.8879 10.2261 10.7665C10.2765 10.6451 10.3502 10.5348 10.4432 10.442H10.4422Z" fill="#00AEEF"/>
            <path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 12C7.22227 12 7.93747 11.8577 8.60476 11.5813C9.27205 11.3049 9.87837 10.8998 10.3891 10.3891C10.8998 9.87837 11.3049 9.27205 11.5813 8.60476C11.8577 7.93747 12 7.22227 12 6.5C12 5.77773 11.8577 5.06253 11.5813 4.39524C11.3049 3.72795 10.8998 3.12163 10.3891 2.61091C9.87837 2.10019 9.27205 1.69506 8.60476 1.41866C7.93747 1.14226 7.22227 1 6.5 1C5.04131 1 3.64236 1.57946 2.61091 2.61091C1.57946 3.64236 1 5.04131 1 6.5C1 7.95869 1.57946 9.35764 2.61091 10.3891C3.64236 11.4205 5.04131 12 6.5 12ZM13 6.5C13 8.22391 12.3152 9.87721 11.0962 11.0962C9.87721 12.3152 8.22391 13 6.5 13C4.77609 13 3.12279 12.3152 1.90381 11.0962C0.684819 9.87721 0 8.22391 0 6.5C0 4.77609 0.684819 3.12279 1.90381 1.90381C3.12279 0.684819 4.77609 0 6.5 0C8.22391 0 9.87721 0.684819 11.0962 1.90381C12.3152 3.12279 13 4.77609 13 6.5Z" fill="currentColor"/>
        </svg>
    </button>

</form>

<!-- // -->

<?/*
<div class="search-form">

<form action="<?=$arResult["FORM_ACTION"]?>">
	<table border="0" cellspacing="0" cellpadding="2" align="center">
		<tr>
			<td align="center">

            <?if($arParams["USE_SUGGEST"] === "Y"):?>

                <?$APPLICATION->IncludeComponent(
                    "bitrix:search.suggest.input",
                    "",
                    array(
                        "NAME" => "q",
                        "VALUE" => "",
                        "INPUT_SIZE" => 15,
                        "DROPDOWN_SIZE" => 10,
                    ),
                    $component, array("HIDE_ICONS" => "Y")
                );?>

            <?else:?>

                <input type="text" name="q" value="" size="15" maxlength="50" />

            <?endif;?>

            </td>
		</tr>
		<tr>
			<td align="right">
                <input name="s" type="submit" value="<?=GetMessage("BSF_T_SEARCH_BUTTON");?>" />
            </td>
		</tr>
	</table>
</form>

</div>
*/?><file_sep><p>© 2020-2021 ООО «Авион»</p><file_sep><?
$sSectionName = "Сервис";
$arDirProperties = [

];
<file_sep><?
$MESS ['MENU_DOT_DEFAULT_NAME'] = "Меню внизу (в футере)  по умолчанию";
$MESS ['MENU_DOT_DEFAULT_DESC'] = "Нижнее меню по умолчанию";
?><file_sep><?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();

/**
 * Bitrix vars
 *
 * @var array $arParams
 * @var array $arResult
 * @var CBitrixComponent $this
 * @global CMain $APPLICATION
 * @global CUser $USER
 */

$arResult["PARAMS_HASH"] = md5(serialize($arParams) . $this->GetTemplateName());

$arParams["USE_CAPTCHA"] = (($arParams["USE_CAPTCHA"] != "N" && !$USER->IsAuthorized()) ? "Y" : "N");
$arParams["EVENT_NAME"] = trim($arParams["EVENT_NAME"]);
if ($arParams["EVENT_NAME"] == '')
    $arParams["EVENT_NAME"] = "FEEDBACK_FORM";
$arParams["EMAIL_TO"] = trim($arParams["EMAIL_TO"]);
if ($arParams["EMAIL_TO"] == '')
    $arParams["EMAIL_TO"] = COption::GetOptionString("main", "email_from");
$arParams["OK_TEXT"] = trim($arParams["OK_TEXT"]);
if ($arParams["OK_TEXT"] == '')
    $arParams["OK_TEXT"] = GetMessage("MF_OK_MESSAGE");

if (empty($arResult["ERROR_MESSAGE"])) {
    if ($USER->IsAuthorized()) {
        $arResult["AUTHOR_NAME"] = $USER->GetFormattedName(false);
    } else {
        if ($_SESSION["MF_NAME"] <> '')
            $arResult["AUTHOR_NAME"] = htmlspecialcharsbx($_SESSION["MF_NAME"]);
        if ($_SESSION["MF_PHONE"] <> '')
            $arResult["AUTHOR_PHONE"] = htmlspecialcharsbx($_SESSION["MF_PHONE"]);
    }
}

if ($arParams["USE_CAPTCHA"] == "Y")
    $arResult["capCode"] = htmlspecialcharsbx($APPLICATION->CaptchaGetCode());

$this->IncludeComponentTemplate();
<file_sep><?
$sSectionName = "Включаемые области";
$arDirProperties = [

];
<file_sep><span>+7 (495) 000-00-00</span><file_sep><?

define('PUBLIC_AJAX_MODE', true);

require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php");

/**
 * Bitrix vars
 *
 * @var array $arParams
 */

CModule::IncludeModule('iblock');

print_r($arParams);

$response = ['error' => 'Произошла неизвестная ошибка, попробуйте позднее', 'success' => false];

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (check_bitrix_sessid()) {

        do { //THIS TRICK FROR USE "break";

            if (mb_strlen($_POST["user_name"]) <= 1) {
                $response['error'] = "Укажите ваше имя.";
                break;
            } elseif (mb_strlen($_POST["user_phone"]) <= 1) {
                $response['error'] = "Укажите телефон, на который ожидаете ответ.";
                break;
            }

            if ($arParams["USE_CAPTCHA"] == "Y") {
                $captcha_code = $_POST["captcha_sid"];
                $captcha_word = $_POST["captcha_word"];
                $cpt = new CCaptcha();
                $captchaPass = COption::GetOptionString("main", "captcha_password", "");
                if ($captcha_word <> '' && $captcha_code <> '') {
                    if (!$cpt->CheckCodeCrypt($captcha_word, $captcha_code, $captchaPass)) {
                        $response['error'] = GetMessage("MF_CAPTCHA_WRONG");
                        break;
                    }
                } else {
                    $response['error'] = GetMessage("MF_CAPTHCA_EMPTY");
                    break;
                }
            }

            function RemapFilesArray($name, $type, $tmp_name, $error, $size)
            {
                return [
                    'name' => $name,
                    'type' => $type,
                    'tmp_name' => $tmp_name,
                    'error' => $error,
                    'size' => $size,
                ];
            }

            $files = array_map('RemapFilesArray',
                (array)$_FILES['file']['name'],
                (array)$_FILES['file']['type'],
                (array)$_FILES['file']['tmp_name'],
                (array)$_FILES['file']['error'],
                (array)$_FILES['file']['size']
            );


            $arFields = [
                "IBLOCK_ID" => 4,
                "NAME" => $_POST["user_name"],
                "PROPERTY_VALUES" => [
                    "PHONE" => $_POST["user_phone"],
                    "FILES" => $files
                ]
            ];

            $cIBlockElement = new CIBlockElement;

            $cIBlockElement->Add($arFields);

            $response = ['error' => null, 'success' => true];

            /*if (!empty($arParams["EVENT_MESSAGE_ID"])) {
                foreach ($arParams["EVENT_MESSAGE_ID"] as $v)
                    if (intval($v) > 0)
                        CEvent::Send($arParams["EVENT_NAME"], SITE_ID, $arFields, "N", intval($v));
            } else {
                CEvent::Send($arParams["EVENT_NAME"], SITE_ID, $arFields);
            }*/
        } while (false);

    }
}

header('Content-Type: application/json');
echo json_encode($response);
die();
?><file_sep><?
$sSectionName = "Авторизация / Регистрация";
$arDirProperties = [

];
<file_sep><?
$sSectionName = "Поиск";
$arDirProperties = [

];
<file_sep><?
$sSectionName = "Новости";
$arDirProperties = [

];
<file_sep><?
define('NEED_AUTH',true);
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Авторизация / Регистрация");

if ($USER->IsAuthorized()) {
    LocalRedirect(SITE_DIR.'personal/');
}
?>

<div class="container">

    <?$logout = $APPLICATION->GetCurPageParam(
        'logout=yes',
        [
            'login',
            'logout',
            'register',
            'forgot_password',
            'change_password'
        ]
    );?>

</div>


<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");
?><file_sep># avion

# sitemap
```

```