Форма бронирования

parent 15888960
<?
require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php");
CModule::IncludeModule("iblock");
if ($_POST['NAME']){
if (closed($_POST['DATE'],$_POST['TIME'],$_POST['QUEST'])>0){
echo "error";
} else {
$el = new CIBlockElement;
$PROP = [];
$PROP = $_POST;
$arLoad = array(
"MODIFIED_BY" => $USER->GetID(), // элемент изменен текущим пользователем
"IBLOCK_SECTION_ID" => false, // элемент лежит в корне раздела
"IBLOCK_ID" => 10,
"PROPERTY_VALUES" => $PROP,
"NAME" => $_POST['NAME'],
"ACTIVE" => "Y",
"PREVIEW_TEXT" => $_POST["COMMENT"]
);
$el->Add($arLoad);
echo "ok";
}
}
?>
<?
require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php");
CModule::IncludeModule("iblock");
?>
<?
if (!empty($_POST)){
$res = CIBlockElement::GetByID($_POST['quest']);
if($ar_res = $res->GetNext())
$name=$ar_res['NAME'];
echo json_encode(['name' => $name, 'date' => rusdate($_POST['date'])]);
}
?>
......@@ -55,5 +55,123 @@ function color($genre)
}
return $color;
}
// русские даты
function rusdate($currentDate)
{
$_monthsList = array(
".01" => "января",
".02" => "февраля",
".03" => "марта",
".04" => "апреля",
".05" => "мая",
".06" => "июня",
".07" => "июля",
".08" => "августа",
".09" => "сентября",
".10" => "октября",
".11" => "ноября",
".12" => "декабря"
);
$_mD = date(".m", strtotime($currentDate)); //для замены
$currentDate = str_replace($_mD, " " . $_monthsList[$_mD] . " ", $currentDate);
$year=date("Y");
$currentDate=str_replace(".".$year, "", $currentDate);
return $currentDate;
}
//получение дней недели
function dayweek($currentDate)
{
$dayofweek = date('w', strtotime($currentDate));
$days = array( 'Пн' , 'Вт' , 'Cр' , 'Чт' , 'Пт' , 'Сб' , 'Вс' );
return $days[$dayofweek];
}
// функция получения что дата и время забронировано
function closed($date,$time,$questId)
{
$locations = array(4, 48, 65, 76);
$iblockId = 10;
$date = date('Y-m-d', strtotime($date));
$arSelect = array("ID", "NAME", "DATE_ACTIVE_FROM");
if (in_array($questId, $locations)){
$loc=0;
foreach($locations as $location) {
$arFilter = array(
"IBLOCK_ID" => $iblockId,
"ACTIVE" => "Y",
"PROPERTY_DATE" => $date,
"PROPERTY_TIME" => $time,
"PROPERTY_QUEST" => $location,
);
$res = CIBlockElement::GetList(array(), $arFilter, false, false, $arSelect);
$count=$res->SelectedRowsCount();
if ($count>0) {
$loc=1;
break;
}
}
if (in_array($questId, $locations) && $loc==1){
return 1;
}
} else {
$arFilter = Array(
"IBLOCK_ID"=>$iblockId,
"ACTIVE"=>"Y",
"PROPERTY_DATE"=>$date,
"PROPERTY_TIME"=>$time,
"PROPERTY_QUEST"=>$questId,
);
$res = CIBlockElement::GetList(Array(), $arFilter, false, false, $arSelect);
return $res-> SelectedRowsCount();
}
}
// получение цен в зависимости от времени
function price($time,$questId){
$arSelect = array("ID", "NAME", "IBLOCK_ID","PROPERTY_*");
$ar=explode(":",$time);
$hour=(int)$ar[0];
$iblockId=12;
$arFilter = Array(
"IBLOCK_ID"=>$iblockId,
"ACTIVE"=>"Y",
"PROPERTY_QUEST"=>$questId,
);
$res = CIBlockElement::GetList(Array(), $arFilter, false, false, $arSelect);
if ( $res-> SelectedRowsCount()==0) return "5000";
$k=0;
$array =[];
while($ob = $res->GetNextElement())
{
$arItem = $ob->GetFields();
$arItem['PROPERTIES'] = $ob->GetProperties();
$arr= explode(":",$arItem['PROPERTIES']['TIME']['VALUE']);
$hourMin=(int)$arr[0];
$array[$k]['HOUR']=$hourMin;
$array[$k]['PRICE']=$arItem['PROPERTIES']['PRICE']['VALUE'];
$k++;
}
if ($hour>=$array[0]['HOUR'] && $hour<$array[1]['HOUR']){
return $array[0]['PRICE'];
} else return $array[1]['PRICE'];
}
?>
\ No newline at end of file
<?php
// текстовые блоки
if (!empty($arResult['PROPERTIES']['BLOCKS']['VALUE'])){
$arResult['BLOCKS']=[];
foreach($arResult['PROPERTIES']['BLOCKS']['VALUE'] as $elementId) {
if (!empty($arResult['PROPERTIES']['BLOCKS']['VALUE'])) {
$arResult['BLOCKS'] = [];
foreach ($arResult['PROPERTIES']['BLOCKS']['VALUE'] as $elementId) {
$element = \Bitrix\Iblock\Elements\ElementBlocksTable::getByPrimary($elementId, [
'select' => ['ID', 'NAME', 'PREVIEW_TEXT', 'PREVIEW_PICTURE'],
])->fetch();
$arResult['BLOCKS'][]=$element;
$arResult['BLOCKS'][] = $element;
}
}
}
// отзывЫ
$iblockId=8;
$iblockId = 8;
$arResult['REVIEWS']=[];
$arSelect = Array("ID", "IBLOCK_ID", "NAME","PREVIEW_TEXT","PROPERTY_RAITING");//IBLOCK_ID и ID обязательно должны быть
$arFilter = Array("IBLOCK_ID"=>$iblockId, "ACTIVE"=>"Y","PROPERTY_QUEST"=>$arResult['ID']);
$res = CIBlockElement::GetList(Array(), $arFilter, false, false, $arSelect);
while($ob = $res->GetNextElement()) {
$arResult['REVIEWS'] = [];
$arSelect = array("ID", "IBLOCK_ID", "NAME", "PREVIEW_TEXT", "PROPERTY_RAITING");//IBLOCK_ID и ID обязательно должны быть
$arFilter = array("IBLOCK_ID" => $iblockId, "ACTIVE" => "Y", "PROPERTY_QUEST" => $arResult['ID']);
$res = CIBlockElement::GetList(array(), $arFilter, false, false, $arSelect);
while ($ob = $res->GetNextElement()) {
$arFields = $ob->GetFields();
$arResult['REVIEWS'][] = $arFields;
}
// чайные комнаты
if (!empty($arResult['PROPERTIES']['TEAS']['VALUE'])) {
$arResult['TEAS'] = [];
foreach ($arResult['PROPERTIES']['TEAS']['VALUE'] as $elementId) {
$element = \Bitrix\Iblock\Elements\ElementTeasTable::getByPrimary($elementId, [
'select' => ['ID', 'NAME'],
])->fetch();
$arResult['TEAS'][$element["ID"]] = $element;
}
}
// прайсы для списка
$arSelect = array("ID", "IBLOCK_ID", "PROPERTY_*");//IBLOCK_ID и ID обязательно должны быть
$arResult['TIMES'] = [];
$iblockId=12;
$arFilter = Array(
"IBLOCK_ID"=>$iblockId,
"ACTIVE"=>"Y",
"PROPERTY_QUEST"=>$arResult['ID'],
);
$res = CIBlockElement::GetList(array('PRPPERTY_PRICE' => 'ASC'), $arFilter, false, false, $arSelect);
while($ob = $res->GetNextElement()) {
$arItem = $ob->GetFields();
$arItem['PROPERTIES'] = $ob->GetProperties();
$times=[];
$times["TIME"]=$arItem['PROPERTIES']['TIME']['VALUE'];
$times["PRICE"]=$arItem['PROPERTIES']['PRICE']['VALUE'];
$times["COLOR"]=$arItem['PROPERTIES']['COLOR']['VALUE'];
$arResult['TIMES'][]=$times;
}
?>
\ No newline at end of file
.book{
color: #fff;
font-size: 20px;
background: #bd4648;
padding: 10px;
border-radius: 3px;
transition: transform 0.35s, -webkit-transform 0.35s;
-webkit-transform: translate3d(0, 200%, 0);
transform: translate3d(0, 200%, 0);
margin-left: 30px;
position: relative;
top:-5px;
}
.quest_contact{
display: inline-block;
margin-left: 30px;
position: relative;
top:12px;
}
.fix_fon .quest__content .quest__content__title .quest__content__title_link .quest_contact span{
font-size: 22px;
padding-left: 16px;
}
.quest_contact .fa{
font-size: 20px;
}
.fix_fon .quest__content .quest__content__attribute.attr{
text-align: left;
padding-left: 30px;
}
.review-title{
font-size: 25px;
font-weight: bold;
margin-bottom: 10px;
}
.review-phone{
background: #000;
width: 100%;
padding: 0 30px 30px 30px;
}
.reviews{
-webkit-column-count: 4;
column-count: 4;
-webkit-column-gap: 20px;
column-gap: 40px;
display: flex;
}
.review {
width: 100%;
padding: 16px 20px;
position: relative;
background: #222;
border-radius: 6px;
margin-bottom: 20px;
display: inline-block;
}
.review-name{
font-size: 13px;
fomt-weight:bold;
margin-bottom: 10px;
}
.send-review{
color: #fff;
font-size: 20px;
background: #222;
padding: 10px;
border-radius: 3px;
text-align: center;
display: block;
margin-bottom: 20px;
width: 180px;
}
.send-review:hover{
color: #fff;
}
.stars{
margin-bottom: 20px;
}
.stars .fa{
font-size: 20px;
}
.stars .fa-star:before{
color: #cbad34;
}
#review-form, .modal-title{
color:#000;
}
.mt-15{
margin-top: 15px;
}
.help-block-name, .help-block-comment{
display: none;
color:red;
}
.form-control.error{
border:1px solid red;
}
.thanks{
color: #000;
}
.review-more-btn {
color: #fff;
font-size: 20px;
background: #222;
padding: 10px;
border-radius: 3px;
text-align: center;
display: inline-block;
margin-bottom: 20px;
width: 180px;
-webkit-column-break-inside: avoid; /* Chrome, Safari, Opera */
page-break-inside: avoid; /* Firefox */
break-inside: avoid; /* IE 10+ */
}
.review-more-btn:hover{
color: #fff;
}
.review-more{
display: none;
-webkit-column-count: 4;
column-count: 4;
-webkit-column-gap: 40px;
column-gap: 40px;
}
.review-more .review:nth-child(2){
display: block;
}
/* бронирование */
.timetable p {
font-size: 16px;
}
.timetable p:last-child{
margin-bottom: 20px;
}
.timetable{
margin-bottom: 20px;
padding-left: 30px;
}
.timetable h2{
margin-bottom: 20px;
}
.tt_v1__row:not([hidden]) {
display: flex;
}
.tt_v1__date {
-webkit-font-smoothing: antialiased;
border-top: solid 1px #3b3b3b;
color: #ccc;
padding-right: .6em;
padding-bottom: 5px;
white-space: nowrap;
align-self: flex-start;
margin-right: 1em;
min-width: 125px;
padding-top: 1px;
padding-left: .6em;
}
.tt_v1__cal-date {
display: inline-block;
min-width: 7ch;
}
.tt_v1__DOW {
color: #666;
}
.tt_v1__DOW--week-end {
color: #e25a5a;
}
[data-price="1"] {
--color: #FFCCCC;
}
[data-price="2"] {
--color: #FF9999;
}
[data-price="3"] {
--color: #FF6666;
}
[data-price="4"] {
--color: #FF3333;
}
[data-price="5"] {
--color: #FF0033;
}
[data-price="6"] {
--color: #CC0033;
}
.price-legend-1 .label {
display: inline-block;
background-color: var(--color);
font-weight: 700;
padding-top: .5em;
margin-right: 3px;
}
.time_table_label {
border: 0;
background-color: var(--color);
border-radius: 2px;
display: inline-block;
font-size: 14px;
font-weight: 400;
line-height: 1;
margin-bottom: 3px;
margin-left: 0;
margin-right: 3px;
margin-top: 0;
min-width: 50px;
padding: 5px;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
vertical-align: top;
white-space: nowrap;
color:#000;
}
.time_table_label.closed {
background-color: #393939;
color: #fff;
}
.bronblock{
display: flex;
justify-content: space-between;
}
.mt-20{
margin-top: 20px;
}
.mbt-5{
margin-top: 5px;
margin-bottom: 20px;
}
.info-block {
-webkit-font-smoothing: antialiased;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-around;
margin-left: 0;
margin-right: 0;
}
.info-block .column{
flex-basis: 33%;
text-align: center;
line-height: 1.4em;
font-size: 14px;
}
.info-block .fa {
display: block;
margin-left: auto;
margin-right: auto;
font-size: 25px;
line-height: 1.2;
color: #3aa5df;
}
.help-block-bron{
color: red;
display: none;
}
.help-block-bron.error{
display: block;
}
.bron_error{
color: red;
font-weight: bold;
padding-left: 30px;
display: none;
}
.bron_error.active{
display: block;
}
\ No newline at end of file
<? 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);
$imgtop = CFile::ResizeImageGet($arResult['DETAIL_PICTURE'], array('width' => 2000, 'height' => 1200)
, BX_RESIZE_IMAGE_PROPORTIONAL, true);
$kol = 3;
?>
<div class="fix_fon">
<img class="fix_img" src="<?= $imgtop['src'] ?>" alt=""/>
<div class="fix_fon_box" style='
background: url("<?= $imgtop['src'] ?>");
background-position: left center;
-webkit-background-size: cover;
-moz-background-size: cover;
-ms-background-size: cover;
-o-background-size: cover;
background-size: cover;'>
</div>
<div class="quest__content">
<div class="quest-block-top">&nbsp;</div>
<div class="quest-block-bottom">
<div class="quest__content__title">
<div class="quest__content__title_link">
<span><?= $arResult['NAME'] ?></span>
<a class="book" href="#timetable">Забронировать</a>
<div class="quest_contact">
<div class="quest__content__attribute__contact-address">
<i class="fa fa-map-marker" aria-hidden="true"></i>
<span><?= $arResult['PROPERTIES']['ADDRESS']['VALUE'] ?></span>
</div>
<div class="quest__content__attribute__contact-phone">
<i class="fa fa-phone" aria-hidden="true"></i>
<span>+7 (3532) 518-001</span>
</div>
</div>
</div>
<div class="quest__content__attribute attr">
<div class="quest__content__attribute-li quest__content__attribute__time">
<i class="icon-time"></i>
<span><?= $arResult['PROPERTIES']['TIME']['VALUE'] ?></span>
</div>
<div class="quest__content__attribute-li quest__content__attribute__quantity">
<i class="icon-people icon-people_big"></i>
<span><?= $arResult['PROPERTIES']['NUMBER']['VALUE'] ?></span>
</div>
</div>
<div class="quest__bottom">
<div class="quest__content__description">
<?= $arResult['DETAIL_TEXT'] ?>
</div>
</div>
</div>
</div>
<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){
?>
<div class="review">
<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'
?>"></span>
<? } ?>
</div>
</div>
<? 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)){ ?>
</div>
<? } ?>
<? } ?>
</div>
</div>
<?
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);
?>
<div>
<div>
<img title=""
href="<?= $img['src'] ?>"
class="gallery-image"
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'])) {
?>
<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);
?>
<div class="advantages__box__item">
<div class="advantages__box__item__img">
<img src="<?= $file['src'] ?>"
alt=""/></div>
<div class="advantages__box__item__text">
<span><?= $arItem['NAME'] ?></span>
<?= $arItem['PREVIEW_TEXT'] ?>
</div>
</div>
<? } ?>
</div>
<? } ?>
</div>
</div>
<? } ?>
</div>
</div>
<!--<div class="reservation"></div>-->
<? //модальное окно отзывов?>
<script src="https://www.google.com/recaptcha/api.js"></script>
<div class="modal fade" id="reviewModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Закрыть">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="myModalLabel">Оставить отзыв</h4>
</div>
<div class="modal-body">
<form class="" id="review-form" action="#" method="post">
<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>
<span class="fa fa-star-o "></span>
<span class="fa fa-star-o "></span>
<span class="fa fa-star-o "></span>
</div>
<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>
<input class="form-control" id="name" placeholder="Имя" name="NAME" type="text"/>
<div class="help-block-name">Необходимо заполнить поле "Имя"</div>
</div>
<div class="form-group">
<label class="control-label required" for="Comment">Комменнтарий <span
class="required">*</span></label>
<textarea class="form-control" id="comment" placeholder="Комментарий" name="COMMENT"
type="text"/></textarea>
<div class="help-block-comment">Необходимо заполнить поле "Комменнтарий"</div>
</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="Отправить"/>
</div>
</form>
</div>
</div>
</div>
</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>Забронировать квест <span id="js-quest-title"></span></h4>
</div>
<div class="modal-body">
<div class="info-block">
<div class="column quest-date">
<i class="fa fa-calendar"></i>
<span>20 сентября</span>
</div>
<div class="column order-price">
Стоимость<br>
<span>5000 р.</span></div>
<div class="column quest-time">
<i class="fa fa-clock-o"></i>
<span id="js-quest-time">20:00</span></div>
</div>
<div class="bron_error">Извините, время уже забронировано</div>
<form class="form" id="reserve-form" action="#"
method="post">
<input name="QUEST" type="hidden" id="quest" value="">
<input name="DATE" type="hidden" id="date" value="">
<input name="TIME" type="hidden" id="time" value="">
<div class="modal-body">
<div class="body-form">
<select name="GAMES" id="games">
</select>
<div class="form-group">
<label class="control-label required" for="QuestDate_name">Имя и фамилия<span
class="required">*</span></label><input class="form-control"
name="NAME"
id="bron1"
type="text"
maxlength="255"/>
<div class="help-block-bron">Необходимо заполнить поле "Имя и фамилия"</div>
</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="PHONE"
id="bron2"
type="text"
maxlength="255"/>
<div class="help-block-bron">Необходимо заполнить поле "Телефон"</div>
</div>
<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="EMAIL" id="bron3"
type="text"/>
<div class="help-block-bron">Необходимо заполнить поле "Телефон"</div>
</div>
<div class="form-group"><label class="control-label"
for="QuestDate_comment">Коментарий</label><textarea
placeholder="Комментарий:
У вас день рождения, корпоратив, мальчишник, выпускной или другой праздник? Скажите нам это или что-нибудь еще."
rows="4" class="form-control" name="COMMENT"
id="quest_comment" maxlength="150"></textarea>
</div>
<?if (!empty($arResult['TEAS'])){?>
<div class="form-group">
<select name="TEA">
<option value="">Выберите чайную комнату</option>
<? foreach ($arResult["TEAS"] as $item) {?>
<option value="<?=$item['ID']?>"><?=$item["NAME"]?></option>
<?}?>
</select>
</div>
<?}?>
<div class="modal-footer">
<input class="" type="submit" name="send" value="Отправить"/>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</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="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>
</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="bronblock">
<? if ($arResult['TIMES']){ ?>
<div class="timetable tt_v1" id="timetable" data-state="loaded" data-version="1" data-loaded="">
<h2>Онлайн бронирование</h2>
<p class="price-legend-1" data-role="price-legend">Стоимость игры:
<? foreach ($arResult['PRICES'] as $k=>$price) {?>
<span class="label" data-price="<?=($k+1)?>-of-4"><?=number_format($price, 0, '', ' ');
?> р</span>
<?}?>
<small> (Цена для команды из 2-4 человек,
доплата за 5, 6-го игроков - 700 руб./чел.)</small></p>
<p class="mt-20"><i class="fa fa-child fa-fw text-info"></i> Возрастное ограничение: 14+ (с 12
лет в сопровождении взрослых)</p>
<p class="mbt-5"><i class="fa fa-info-circle fa-fw text-info"></i> Выберите и забронируйте без
комиссии свободное время, кликнув по нему</p>
<? for ($i = 0; $i <= 13; $i++) { ?>
<div class="tt_v1__row ">
<?
$date = date('d.m.Y', strtotime('+' . $i . ' days'));
$dayweek=trim(dayweek($date));
?>
<time datetime="<?= $date ?>" class="tt_v1__date date">
<span class="tt_v1__cal-date"><?= rusdate($date) ?></span>
<span class="tt_v1__DOW <?=($dayweek=="Сб" || $dayweek=="Вс")?'tt_v1__DOW--week-end':''?>"><?=
$dayweek?></span>
</time>
<div class="slots tt_v1__slots">
<?
foreach ($arResult['TIMES'] as $item) {
$time=$item['TIME'];
$color=$item['COLOR'];
$price=$item['PRICE'];
?>
<?//если бронь недоступна
if (closed($date,$time, $arResult['ID'])>0){?>
<button type="button" data-toggle="tooltip"
class="item time_table_label closed"><?=$time?>
</button>
<?}else{?>
<button type="button" data-action="show-order-form"
data-quest="<?= $arResult['ID'] ?>" data-date="<?= $date ?>"
data-time="<?= $time ?>"
data-type="quest"
data-cost="<?=$price?>"
data-price="<?=$color?>" class="item time_table_label free">
<?= $time ?>
</button>
<?
}
}
?>
</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>
<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