Форма заказ квеста

parent 2a1cfa10
<?
require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php");
CModule::IncludeModule("iblock");
?>
<?
if ($_POST['NAME']){
$el = new CIBlockElement;
$PROP=[];
$PROP=$_POST;
$arLoad = Array(
"MODIFIED_BY" => $USER->GetID(), // элемент изменен текущим пользователем
"IBLOCK_SECTION_ID" => false, // элемент лежит в корне раздела
"IBLOCK_ID" => 9,
"PROPERTY_VALUES"=> $PROP,
"NAME" => $_POST['NAME'],
"ACTIVE" => "Y", //
);
$el->Add($arLoad);
}
?>
<?
\Bitrix\Main\Loader::includeModule('iblock');
// ключи рекапчи
define("RE_SITE_KEY","6LdUvhMqAAAAAGXFJv_32hIuz8xtsj05pHKoiWIr");
define("RE_SEC_KEY","6LdUvhMqAAAAANE0BPDr9IuMLGeXTKFugQcW1C6d");
// функция получения квестов по жанрам
function quests_genre($genre){
$genres=[];
......@@ -26,9 +29,7 @@ function elements($iblockId,$adressId){
return $elements;
}
// ключи рекапчи
define("RE_SITE_KEY","6LdUvhMqAAAAAGXFJv_32hIuz8xtsj05pHKoiWIr");
define("RE_SEC_KEY","6LdUvhMqAAAAANE0BPDr9IuMLGeXTKFugQcW1C6d");
//функуия цвет жанров
function color($genre)
......
......@@ -12,6 +12,14 @@
}
$dbEnums = \Bitrix\Iblock\PropertyEnumerationTable::getList(array(
'order' => array('SORT' => 'asc'), // параметры сортировки
'select' => array('*'), // * - означает что выбираем все поля
'filter' => array('PROPERTY_ID' => 34) // параметры фильтра
));
while ($arEnum = $dbEnums->fetch()) {
$arResult['POVODS'][] = $arEnum;
}
?>
\ No newline at end of file
......@@ -141,3 +141,17 @@
.q-phone{
top: 0px;
}
.help-block1{
display: none;
}
.help-block1.error{
display: block;
color:red;
}
.order-children .form-group.error {
color:red;
}
.order-children .thanks{
margin: 20px 0;
font-size: 14px;
}
\ No newline at end of file
......@@ -13,14 +13,14 @@
$this->setFrameMode(true);
$imgtop = CFile::ResizeImageGet($arResult['DETAIL_PICTURE'], array('width' => 2000, 'height' => 1200)
, BX_RESIZE_IMAGE_PROPORTIONAL, true);
$kol=3;
$kol = 3;
?>
<div class="fix_fon">
<?if ( $imgtop['src']){?>
<? if ($imgtop['src']) { ?>
<img class="fix_img" src="<?= $imgtop['src'] ?>" alt=""/>
<?}?>
<? } ?>
<div class="fix_fon_box" style='
background: url("<?= $imgtop['src'] ?>");
background-position: left center;
......@@ -61,92 +61,99 @@ $kol=3;
</div>
</div>
</div>
<?if (!empty($arResult['REVIEWS'])){?>
</div>
<? if (!empty($arResult['REVIEWS'])){ ?>
<div class="review-phone">
<a href="#" data-toggle="modal" data-target="#reviewModal" class="send-review">Оставить отзыв</a>
<div class="reviews">
<?foreach($arResult["REVIEWS"] as $k=>$arItem){
<? foreach ($arResult["REVIEWS"] as $k => $arItem){
?>
<div class="review">
<div class="review-name"> <?=$arItem['NAME']?></div>
<div class="review-text"><?=$arItem['PREVIEW_TEXT']?></div>
<div class="review-name"> <?= $arItem['NAME'] ?></div>
<div class="review-text"><?= $arItem['PREVIEW_TEXT'] ?></div>
<div class="stars mt-15">
<?
for ($i = 1; $i <= 5; $i++) {?>
<span class="fa <?=($i<=(int)$arItem['PROPERTY_RAITING_VALUE'])?'fa-star':'fa-star-o'
for ($i = 1; $i <= 5; $i++) { ?>
<span class="fa <?= ($i <= (int)$arItem['PROPERTY_RAITING_VALUE']) ? 'fa-star' : 'fa-star-o'
?>"></span>
<?}?>
<?
} ?>
</div>
</div>
<?if ($k==$kol && count($arResult["REVIEWS"])>$kol){?>
<? if ($k == $kol && count($arResult["REVIEWS"]) > $kol){ ?>
</div>
<a href="#" class="review-more-btn">Все отзывы</a>
<div class="review-more">
<?}?>
<? if (count($arResult["REVIEWS"])>$kol && ($k==count($arResult["REVIEWS"])-1)){?>
<?
} ?>
<? if (count($arResult["REVIEWS"]) > $kol && ($k == count($arResult["REVIEWS"]) - 1)){ ?>
</div>
<?}?>
<?}?>
<?
} ?>
<?
} ?>
</div>
</div>
<?}
<?
}
if (!empty($arResult['PROPERTIES']['SLIDER']['VALUE']) && is_array($arResult['PROPERTIES']['SLIDER']['VALUE'])){?>
if (!empty($arResult['PROPERTIES']['SLIDER']['VALUE']) && is_array($arResult['PROPERTIES']['SLIDER']['VALUE'])) {
?>
<div class="row mb-20">
<div class="col-xs-12 col-md-12 col-lg-6">
<div class="slider-block slider-block-children"> 
<div id="yw0" class="list-view">
<div class="owl-carousel owl-carousel-79">
<?foreach($arResult["PROPERTIES"]['SLIDER']['VALUE'] as $slider){
$img = CFile::ResizeImageGet($slider, array('width'=>400, 'height'=>300)
,BX_RESIZE_IMAGE_PROPORTIONAL, true);
<? foreach ($arResult["PROPERTIES"]['SLIDER']['VALUE'] as $slider) {
$img = CFile::ResizeImageGet($slider, array('width' => 400, 'height' => 300)
, BX_RESIZE_IMAGE_PROPORTIONAL, true);
?>
<div>
<div>
<img title="
href="<?=$img['src']?>"
href="<?= $img['src'] ?>"
class="gallery-image"
src="<?=$img['src']?>"
src="<?= $img['src'] ?>"
alt=""/>
</div>
</div>
<?}?>
<? } ?>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-12 col-lg-6">
<?if (!empty($arResult['BLOCKS'])){?>
<? if (!empty($arResult['BLOCKS'])) {
?>
<div class="advantages__box">
<?foreach($arResult["BLOCKS"] as $arItem){
$file = CFile::ResizeImageGet($arItem['PREVIEW_PICTURE'], array('width'=>400, 'height'=>300)
,BX_RESIZE_IMAGE_PROPORTIONAL, true);
<? foreach ($arResult["BLOCKS"] as $arItem) {
$file = CFile::ResizeImageGet($arItem['PREVIEW_PICTURE'], array('width' => 400, 'height' => 300)
, BX_RESIZE_IMAGE_PROPORTIONAL, true);
?>
<div class="advantages__box__item">
<div class="advantages__box__item__img">
<img src="<?=$file['src']?>"
<img src="<?= $file['src'] ?>"
alt=""/></div>
<div class="advantages__box__item__text">
<span><?=$arItem['NAME']?></span>
<?=$arItem['PREVIEW_TEXT']?>
<span><?= $arItem['NAME'] ?></span>
<?= $arItem['PREVIEW_TEXT'] ?>
</div>
</div>
<?}?>
<? } ?>
</div>
<?}?>
<? } ?>
</div>
</div>
<?}?>
</div>
<? } ?>
</div>
</div>
<!--<div class="reservation"></div>-->
......@@ -165,7 +172,7 @@ if (!empty($arResult['PROPERTIES']['SLIDER']['VALUE']) && is_array($arResult['PR
</div>
<div class="modal-body">
<form class="" id="review-form" action="#" method="post">
<input type="hidden" value="<?=$arResult['ID']?>" name="QUEST"/>
<input type="hidden" value="<?= $arResult['ID'] ?>" name="QUEST"/>
<div class="stars change" id="star">
<span class="fa fa-star-o "></span>
<span class="fa fa-star-o "></span>
......@@ -174,7 +181,7 @@ if (!empty($arResult['PROPERTIES']['SLIDER']['VALUE']) && is_array($arResult['PR
<span class="fa fa-star-o "></span>
</div>
<input type="hidden" value="0" id="input-star" name="RAITING" />
<input type="hidden" value="0" id="input-star" name="RAITING"/>
<div class="form-group">
<label class="control-label required" for="name">Имя <span
class="required">*</span></label>
......@@ -188,7 +195,7 @@ if (!empty($arResult['PROPERTIES']['SLIDER']['VALUE']) && is_array($arResult['PR
type="text"/></textarea>
<div class="help-block-comment">Необходимо заполнить поле "Комменнтарий"</div>
</div>
<div class="g-recaptcha" data-sitekey="<?=RE_SITE_KEY?>"></div>
<div class="g-recaptcha" data-sitekey="<?= RE_SITE_KEY ?>"></div>
<div class="help-block-comment">Вы не прошли проверку</div>
<div class="modal-footer">
<input class="" type="submit" name="send" value="Отправить"/>
......@@ -201,187 +208,67 @@ if (!empty($arResult['PROPERTIES']['SLIDER']['VALUE']) && is_array($arResult['PR
</div>
<a name="schedule" id="scheduleanchor"></a>
<div class="reservation">
<div class="reservation_bottom">
<div class="modal fade" id="reserve" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;
</button>
<h4 class="modal-title" id="myModalLabel"
style="font-size: 23px;text-align: center;font-weight: bold;">Забронировать
квест</h4>
<div class="order-children">
<form class="form form-inline" id="zakaz-form" method="post">
<input type="hidden" name="QUEST" value="<?=$arResult['ID']?>">
<h1>Форма заказа</h1>
<div class="form-group">
<select class="form-control" id="zakaz1" name="POVOD">
<option value="">Повод для праздника</option>
<?foreach($arResult["POVODS"] as $povod){?>
<option value="<?=$povod['ID']?>"><?=$povod['VALUE']?></option>
<?}?>
</select>
</div>
<div class="modal-body">
<p style="text-align: center; font-size: 18px;"><strong>Название квеста: </strong><span
data-template="title"></span></p>
<p style="text-align: center; font-size: 18px;"><strong>Время и дата: </strong><span
data-template="date"></span> в <span data-template="time"></span></p>
<div data-template-quest-id="44" style="display: none">
<p style="text-align: center; font-size: 18px;"><strong>Стоимость: </strong><span
data-template="price"></span> с человека. </p>
</div>
<div data-template-quest-id="all">
<p style="text-align: center; font-size: 18px;"><strong>Стоимость: </strong><span
data-template="price"></span> (до 4 игроков). </p>
<p style="text-align: center; font-size: 18px;"><strong>Доплата: </strong> свыше 4
игроков: по 600 р/ч.</p>
</div>
</div>
<form data-type="ajax-form" class="form" id="reserve-form" action="/quest/koma-experement"
method="post">
<input type="hidden" value="7db83ad4c0241b556ec85cf71339fddaa881fdd1"
name="YUPE_TOKEN"/>
<div class="modal-body">
<div class="body-form">
<input data-template="quest_id" name="QuestDate[quest_id]"
id="QuestDate_quest_id" type="hidden"/> <input data-template="price"
name="QuestDate[price]"
id="QuestDate_price"
type="hidden"/> <input
data-template="date" name="QuestDate[date]" id="QuestDate_date"
type="hidden"/> <input data-template="time" name="QuestDate[time]"
id="QuestDate_time" type="hidden"/>
<div class="form-group"><label class="control-label required"
for="QuestDate_email">Email <span
class="required">*</span></label><input class="form-control"
placeholder="Email"
name="QuestDate[email]"
id="QuestDate_email"
type="text"
maxlength="255"/></div>
<div class="form-group"><label class="control-label required"
for="QuestDate_name">Имя <span
class="required">*</span></label><input class="form-control"
placeholder="Имя"
name="QuestDate[name]"
id="QuestDate_name"
type="text"
maxlength="255"/></div>
<div class="form-group"><label class="control-label required"
for="QuestDate_phone">Телефон <span
class="required">*</span></label><input data-mask="phone"
class="form-control"
placeholder="Телефон"
name="QuestDate[phone]"
id="QuestDate_phone"
type="text"
maxlength="255"/></div>
<div class="form-group"><label class="control-label" for="QuestDate_comment">Коментарий</label><textarea
placeholder="Комментарий:
У вас день рождения, корпоратив, мальчишник, выпускной или другой праздник? Скажите нам это или что-нибудь еще."
rows="4" class="form-control" name="QuestDate[comment]"
id="QuestDate_comment"></textarea></div>
<div class="form-group"><label class="control-label required"
for="QuestDate_type_payment">Способ оплаты <span
class="required">*</span></label><input
id="ytQuestDate_type_payment" type="hidden" value=""
name="QuestDate[type_payment]"/><span
id="QuestDate_type_payment"><label class="radio"><input
placeholder="Способ оплаты" id="QuestDate_type_payment_0"
value="1" checked="checked" type="radio"
name="QuestDate[type_payment]"/>Наличные при посещении</label></span>
</div>
<div class="promo-field hidden">
<div class="form-group"><label class="control-label" for="QuestDate_promo">Промокод</label><input
data-url="/quest/quest/promo" data-price=""
data-template-id="price" class="form-control"
placeholder="Промокод" name="QuestDate[promo]"
id="QuestDate_promo" type="text" maxlength="255"/></div>
</div>
<hr/>
<p>Предоплата в праздничные и выходные дни (подробности по телефону)</p>
<div class="help-block1">Необходимо заполнить поле «Повод для праздника».</div>
<div class="form-group">
<select class="form-control" id="zakaz2" name="KOLVO">
<option value="">Кол-во участников</option>
<? for ($i = 0; $i <= 5; $i++) {?>
<option value="<?=$i?>"><?=$i?></option>
<?} ?>
<option value="10">10 и более</option>
</select>
</div>
<div class="help-block1">Необходимо заполнить поле «Кол-во участников».</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<i class="fa fa-calendar"></i></span>
<input class="form-control ct-form-control" id="date" type="text"
placeholder="Дата мероприятия" name="DATE" id="date">
</div>
</div>
<div class="modal-footer">
<input class="btn btn-primary hide-after-send" data-send="ajax"
onclick="yaCounter46824699.reachGoal(&#039;bron&#039;); return true;"
type="submit" name="yt0" value="ЗАБРОНИРОВАТЬ КВЕСТ"/>
<button type="button" class="btn btn-default" data-dismiss="modal">Закрыть</button>
<div class="help-block1">Необходимо заполнить поле «Дата мероприятия».</div>
<div class="form-group">
<input class="form-control" placeholder="Имя" name="NAME" id="zakaz3" type="text">
</div>
</form>
<div class="help-block1">Необходимо заполнить поле «Имя».</div>
<div class="form-group">
<input class="form-control" placeholder="Телефон" name="PHONE" id="phone" type="text">
</div>
<div class="help-block1">Необходимо заполнить поле «Телефон».</div>
<div class="form-group">
<input class="form-control" placeholder="E-mail" name="EMAIL" id="zakaz4" type="text">
</div>
<div class="help-block1">Необходимо заполнить поле «E-mail».</div>
<div class="form-group check">
<div class="checkbox">
<label class="inline">
<input name="i_agree" id="i_agree" value="1" type="checkbox">
Я ознакомился и согласен с правилами
</label>
</div>
<span id="needRightTime" data-toggle="modal" data-target="#myModal">Нужное время занято?</span>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" l
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<form class="form form" data-type="ajax-form" id="need-right-time-model"
action="/quest/koma-experement" method="post">
<input type="hidden" value="7db83ad4c0241b556ec85cf71339fddaa881fdd1"
name="YUPE_TOKEN"/>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title" id="myModalLabel">Нужное время занято</h4>
</div>
<div class="modal-body">
<div class="help-block1">Вы должны ознакомиться с правилами</div>
<div class="modal-body">
<div class="form-group"><label class="control-label required"
for="NeedRightTimeModel_name">Имя <span
class="required">*</span></label><input class="form-control"
placeholder="Имя"
name="NeedRightTimeModel[name]"
id="NeedRightTimeModel_name"
type="text"/></div>
<input value="Кома. Эксперимент" name="NeedRightTimeModel[questName]"
id="NeedRightTimeModel_questName" type="hidden"/>
<div class="form-group"><label class="control-label required"
for="NeedRightTimeModel_phone">Телефон <span
class="required">*</span></label><input data-mask="phone"
class="form-control"
placeholder="Телефон"
name="NeedRightTimeModel[phone]"
id="NeedRightTimeModel_phone"
type="text"/></div>
<div class="form-group"><label class="control-label"
for="NeedRightTimeModel_email">E-mail</label><input
class="form-control" placeholder="E-mail"
name="NeedRightTimeModel[email]" id="NeedRightTimeModel_email"
type="text"/></div>
</div>
<div class="modal-footer">
<input id="callback-button" class="btn btn-default callback-form-button"
data-send="ajax" type="submit" name="yt1" value="Отправить"/></div>
<div class="form-group submit">
<input id="callback-button" class="btn btn-default callback-form-button" data-send="ajax" type="submit"
name="send" value="Заказать праздник">
</div>
</form>
</div>
</div>
</div>
<div class="reservation_bottom__btn">
<div class="reservation_bottom__link">
<a class="but_polygon" href="/quest/quest/schedules">Перейти к общему расписанию</a>
</div>
</div>
</div>
<div class="dop__yslugi">
<h2>Дополнительные услуги</h2>
<div class="dop__yslugi__item">
<i class="icon-anime"></i>
<span>Аниматор</span>
</div>
<div class="dop__yslugi__item">
<i class="icon-photo"></i>
<span>Фотограф</span>
</div>
<div class="dop__yslugi__item">
<i class="icon-happy"></i>
<span>Пакет «День рождения»</span>
</div>
</div>
<div class="clearfix"></div>
<div class="reservation__info2">
Указана стоимость игры с команды
<span>(команда 2-4 | макс. 8 игроков)</span>
</div>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment