%PDF- %PDF-
Direktori : /proc/self/root/home/bitrix/www/local/components/UB/portfolio.profile/ |
Current File : //proc/self/root/home/bitrix/www/local/components/UB/portfolio.profile/ajax_get_portfotos.php |
<? require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'); if (CModule::IncludeModule("iblock") && CModule::IncludeModule("main")){ $pg = $_GET["page"]; $alb = $_GET["cat"]; $ust = $_GET["us_type"]; $imgCount = ($pg-1)*10; $secRes = CIBlockSection::GetByID($alb); if ($arAlbum = $secRes->Fetch()) $album = $arAlbum['NAME']; $res = CIBlockElement::GetList(Array("SORT"=>"ASC"), Array("IBLOCK_ID"=>4,"SECTION_ID"=>$alb), false, array("iNumPage"=>$pg, "nPageSize"=>10), array("IBLOCK_ID","ID","NAME","PREVIEW_PICTURE","DETAIL_PICTURE","PROPERTY_REAL_PICTURE","PROPERTY_FORUM_MESSAGE_CNT", "PROPERTY_ADULT")); while($ar_fields = $res->GetNext()){ $pr_pict = ''; $d_pict = ''; $pr_pict = CFile::GetPath($ar_fields["PREVIEW_PICTURE"]); $d_pict = CFile::GetPath($ar_fields["DETAIL_PICTURE"]); if (!$d_pict) $d_pict = CFile::GetPath($ar_fields["PROPERTY_REAL_PICTURE_VALUE"]); if (!$pr_pict) $pr_pict = $d_pict; if (!$d_pict) $d_pict = $pr_pict; $arVoteResult = CRatings::GetRatingVoteResult("IBLOCK_ELEMENT", $ar_fields['ID']); $imgCount++; ?> <?if (intval($ar_fields["PROPERTY_ADULT_VALUE"])<1 || intval($ust)>0):?> <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"> <div class="portfolio-item"> <a href="<?=$d_pict?>" title="<?=$album?>, #<?=$imgCount?>" class="portfolio-item-link pil2" data-gallery data-imp="N" data-item-id="<?=$ar_fields['ID']?>"> <img style="background: url(<?=$pr_pict?>) center center no-repeat; background-size: cover;" alt=""/> <div class="portfolio-item-social"> <span><i class="fa fa-thumbs-o-up"></i> <?=empty($arVoteResult)?0:$arVoteResult['TOTAL_VOTES']?></span> <span><i class="fa fa-comment-o"></i> <?=intval($ar_fields['PROPERTY_FORUM_MESSAGE_CNT_VALUE'])>0?$ar_fields['PROPERTY_FORUM_MESSAGE_CNT_VALUE']:'0'?></span> </div> </a> <div class="clearfix"></div> </div> </div> <?else:?> <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12"> <div class="portfolio-item"> <a class="pil2 nonactivelink"> <img class="img-responsive blur_filter" data-id="<?=$ar_fields['ID']?>" style="background: url(<?=$pr_pict;?>) center center no-repeat; background-size: cover;" alt="" /> <span class="public18"></span> <div class="blurf" data-id="<?=$ar_fields['ID']?>"></div> </a> </div> </div> <?endif;?> <? } } ?>