Your IP : 3.12.107.129


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/include/mainpage/components/forms/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/include/mainpage/components/forms/offer.php

<?
   CModule::IncludeModule('form');

   $params = array(
    "SEND_BUTTON_NAME" => "Отправить",
    "SEND_BUTTON_CLASS" => "btn btn-default btn-lg",
    "WEBFORM_ID" => "monolith_real_callback",
    "DISPLAY_CLOSE_BUTTON" => "Y",
    "TYPE_BLOCK" => "SIDE_IMG",
    "SHOW_PREVIEW_TEXT" => "N"
);
$arParams = !empty($arParams)?array_merge($params,$arParams):$params;
?>
<div class="form-list form-list-template">
    <?
    $imgType = ($arParams["TYPE_BLOCK"] == 'BG_IMG' ? '' : '_ACTIVE');
    $formCode = $formName = '';
    $code = $arParams['WEBFORM_ID'];
    $arFilter = ['ACTIVE' => 'Y', 'SITE' => array(SITE_ID)];
    $arFilter += ['SID' => $code, 'SID_EXACT_MATCH' => 'N'];
    $rsForm = CForm::GetList($by = 'id', $order = 'asc', $arFilter, $is_filtered);
    if ($item = $rsForm->Fetch()) {
        if(!$arParams['IMG_PATH']) {
            $arSid = explode('_', $item['SID']);
            $sideID = array_pop($arSid);
            $code = implode('_', $arSid);

            $arImgID = unserialize(\Bitrix\Main\Config\Option::get('aspro.allcorp3', 'BGFILE' . strtoupper($code) . '_FORM' . $imgType, serialize([]), SITE_ID));

            if ($arImgID) {
                $arParams['IMG_PATH'] = CFile::GetPath($arImgID[0]);
            }
        }
        $formCode = $code;
        $formName = $item['NAME'];
        $formDescription = $item['DESCRIPTION'];
    }
    ?>
    <?
    $bFonImg = $arParams['TYPE_BLOCK'] == 'BG_IMG';
    $bCompact = $arParams['TYPE_BLOCK'] == 'COMPACT';
    $bNarrow = isset($arParams['NARROW']) && $arParams['NARROW'];
    $bWideImg = !$bFonImg && !$bNarrow && !$bCompact;

    if ($bCompact && $arParams['NO_IMAGE'] == 'Y') {
        $arParams['IMG_PATH'] = '';
    }

    $bCenteredBlock = $arParams['CENTERED'] == 'Y' || (!$arParams['IMG_PATH'] && !$bFonImg);

    $formWrapperClass = '';
    if (!$bCenteredBlock) {
        $formWrapperClass .= ' flexbox flexbox--direction-row';

        if ($bCompact) {
            $formWrapperClass .= ' flexbox--column-t767';
        } else {
            $formWrapperClass .= ' flexbox--column-t991';
        }
        if ($arParams['POSITION_IMAGE'] == 'LEFT') {
            $formWrapperClass .= ' flexbox--direction-row-reverse';
        }
    }
    if ($arParams['IMG_PATH'] && !$bNarrow && !$bFonImg) {
        $formWrapperClass .= ' form--static';
    }

    $formClass = 'form--inline form--' . $arParams['TYPE_BLOCK'];
    if ($arParams['IMG_PATH'] && $bFonImg) {
        $formClass .= ' form--static form--with-bg';
    }
    if ($arParams['IMG_PATH'] && !$bNarrow) {
        $formClass .= ' form--static';
    }
    if ($arParams['LIGHT_TEXT'] == 'Y') {
        $formClass .= ' form--light';
    }
    if ($arParams['LIGHTEN_DARKEN'] == 'Y') {
        $formClass .= ' form--opacity';
    }
    if ($bCenteredBlock) {
        $formClass .= ' form--centered';
    }
    ?>
    <? if (!$bWideImg): ?>
    <div class="maxwidth-theme">
        <? endif; ?>

        <div class="form <?= $formClass ?>">

            <? if ($arParams['IMG_PATH'] && $bFonImg): ?>
                <div class="form-fon" style="background-image: url(<?= $arParams['IMG_PATH'] ?>)"></div>
            <? endif; ?>

            <div class="maxwidth-theme form__wrapper <?= $formWrapperClass; ?>">
                <!--noindex-->
                <? if (!$bFonImg && $arParams['IMG_PATH']): ?>
                    <div class="form__img flex-1 form__img--<?= $arParams['TYPE_BLOCK']; ?><?= (!$bNarrow ? ' form--static' : ''); ?>">
                        <div class="sticky-block<?= ($bWideImg ? ' form__img--WIDE' : '') ?>">
                            <div class="form-fon" style="background-image: url(<?= $arParams['IMG_PATH'] ?>)"></div>
                            <? if ($formDescription): ?>
                                <div class="form-desk-wrapper">
                                    <?= $formDescription ?>
                                </div>
                            <? endif ?>
                        </div>
                    </div>
                    <div class="form__info flex-1 form__info--<?= $arParams['POSITION_IMAGE']; ?>">
                        <? if ($bWideImg): ?>
                            <div class="maxwidth-theme--half">
                        <? endif ?>
                <? endif ?>

                        <?if ($arParams['SUBTITLE']):?>
                            <div class="index-block__subtitle index-block__subtitle--margined-f992"><?=$arParams['SUBTITLE']?></div>
                        <?endif;?>

                        <?if($arParams['TITLE']):?>
                            <p style="font-size:1.4rem;" class="index-block__title switcher-title line"><?=$arParams['TITLE']?></p>
                        <?endif;?>

                        <div class="form-inner flex-1">
                            <div class="form-body">
                                <?include $_SERVER['DOCUMENT_ROOT'].SITE_DIR.'include/form/b24-form/static/monolith_real_offer.php';?>
                            </div>
                        </div>

                <? if (!$bFonImg && $arParams['IMG_PATH']): ?>
                    <? if ($bWideImg): ?>
                        </div>
                    <? endif ?>
                    </div>
                <? endif ?>
                <!--/noindex-->
            </div>
        </div>
        <? if (!$bWideImg): ?>
    </div>
<? endif; ?>
</div>