Created
May 26, 2018 07:18
-
-
Save egorguscha/2fcba06caf48fd10ccddcc80617a0d20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/header.php"); | |
$APPLICATION->SetTitle("1С-Битрикс: Управление сайтом"); | |
CModule::IncludeModule('iblock'); | |
$arrConcert = array(); | |
$res3 = CIBlockElement::GetList(array('PROPERTY_DATE' => 'ASC'),array( 'IBLOCK_ID' => 1,)); | |
while ($obj = $res3->GetNextElement()){ | |
$fields = $obj->GetFields(); | |
$fields["PROPERTIES"] = $obj->GetProperties(); | |
$arrConcert[] = $fields; | |
} | |
function rdate($param, $time = 0) | |
{ | |
if (intval($time) == 0) $time = time(); | |
$MonthNames = array("Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", "Августа", "Сентября", "Октября", "Ноября", "Декабря"); | |
if (strpos($param, 'M') === false) return date($param, $time); | |
else return date(str_replace('M', $MonthNames[date('n', $time) - 1], $param), $time); | |
} | |
function rdate2($param, $time = 0) | |
{ | |
if (intval($time) == 0) $time = time(); | |
$MonthNames = array("Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"); | |
if (strpos($param, 'M') === false) return date($param, $time); | |
else return date(str_replace('M', $MonthNames[date('n', $time) - 1], $param), $time); | |
} | |
?> | |
<section class="full-win home"> | |
<div class="side-wrap side-wrap-left"> | |
<span class="date-list__program date-list__program_mobile">Программа тура</span> | |
<div class="important-concert"> | |
<? foreach ($arrConcert as $item) { | |
if ($item["PROPERTIES"]["IMPORTANT_CONCERT"]["VALUE"] === 'да') { | |
?> | |
<div class="date-list-item date-list-item_important"> | |
<a href="<?= $item["PROPERTIES"]["HREF"]["VALUE"] ?>" class="date-list-side date-list-side_left"> | |
<span class="date-list__city"><?= $item["NAME"] ?></span> | |
<span class="date-list__space"><?= $item["PROPERTIES"]["SPACE"]["VALUE"] ?></span> | |
</a> | |
<div class="date-list-side"> | |
<span class="date-list__time"><?= rdate('d M', strtotime($item["PROPERTIES"]["DATE"]["VALUE"])) ?></span> | |
<!--Если билеты проданы добавить класс sold-out--><a href="<?= $item["PROPERTIES"]["HREF"]["VALUE"] ?>" target="_blank" class="date-list__ticket-status ">купить билет</a> | |
</div> | |
</div> | |
<? } | |
} | |
?> | |
</div> | |
<div class="swiper-container slider-1 date-list"> | |
<div class="swiper-wrapper active-justify"> | |
<?foreach ($arrConcert as $item) { | |
if ($item["PROPERTIES"]["IMPORTANT_CONCERT"]["VALUE"] === '') { | |
?> | |
<div class="swiper-slide" data-month="<?= rdate2('M', strtotime($item["PROPERTIES"]["DATE"]["VALUE"])) ?>"> | |
<div class="date-list-item"> | |
<a href="<?= $item["PROPERTIES"]["HREF"]["VALUE"] ?>" class="date-list-side date-list-side_left"> | |
<span class="date-list__city"><?= $item["NAME"] ?></span> | |
<span class="date-list__space"><?= $item["PROPERTIES"]["SPACE"]["VALUE"] ?></span> | |
</a> | |
<div class="date-list-side"> | |
<span class="date-list__time"><?= rdate('d M', strtotime($item["PROPERTIES"]["DATE"]["VALUE"])) ?></span> | |
<!--Если билеты проданы добавить класс sold-out--><a href="<?= $item["PROPERTIES"]["HREF"]["VALUE"] ?>" target="_blank" class="date-list__ticket-status ">купить билет</a> | |
</div> | |
</div> | |
</div> | |
<? }} ?> | |
</div> | |
<div class="swiper-controls"> | |
<span class="next-month month-name"></span><span class="prev-month month-name"></span> | |
<div class="swiper-button-next swiper-button-custom prev-1"></div> | |
<span class="date-list__program">Программа тура</span> | |
<div class="swiper-button-prev swiper-button-custom next-1"></div> | |
</div> | |
</div> | |
</div> | |
<div class="side-wrap side-wrap-right"> | |
<div class="home-content"> | |
<div class="smart-title"> | |
<div class="anim-large-title"> | |
<div class="smart-title-item smart-title-item_first"> | |
<span class="smart-title__large">Feduk</span></div> | |
<div class="smart-title-item"> | |
<span class="smart-title__large">One love</span><span class="smart-title__large smart-title__large_under">tour</span> | |
</div> | |
</div> | |
<div class="smart-title-item smart-title-item_third"> | |
<a class="smart-title__sub time-left" href=""></a></div> | |
</div> | |
<div class="home-content__pic"> | |
<img src="<?= SITE_TEMPLATE_PATH ?>/img/Feduk.png" alt=""></div> | |
<div class="bg-title"><span>Feduk</span></div> | |
</div> | |
</div> | |
</section> | |
<? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/footer.php"); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment