%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/home/bitrix/www/local/components/p4/p.portfolio.profile/
Upload File :
Create Path :
Current File : //proc/self/root/home/bitrix/www/local/components/p4/p.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)*8;
	$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"=>8), 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["DETAIL_PICTURE"]);
		$d_pict = CFile::GetPath($ar_fields["DETAIL_PICTURE"]);
		$pic_info = CFile::GetByID($ar_fields["PREVIEW_PICTURE"]);
		$arPicInfo = $pic_info->Fetch();
		$type_im = intval($arPicInfo['HEIGHT']) > intval($arPicInfo['WIDTH']) ? 'V' : 'H';
		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):?>
							<figure class="col-xs-3">
								<a href="<?=$d_pict?>" title="<?=$album?>, #<?=$imgCount?>"
									class="portfolio-item-link pil2" data-gallery data-imp="N" data-item-id="<?=$ar_fields['ID']?>">
									<img class="img-responsive" style="background: url(<?=$pr_pict?>) center <?=$type_im == 'V' ? 'top' : '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>
							</figure>
		<?else:?>
							<figure class="col-xs-3">
								<a class="pil2 nonactivelink">
									<img class="img-responsive blur_filter" data-id="<?=$ar_fields['ID']?>" style="background: url(<?=$pr_pict?>) center <?=$type_im == 'V' ? 'top' : 'center';?> no-repeat; background-size: cover;" alt="" />
									<span class="public18"></span>
									<div class="blurf" data-id="<?=$ar_fields['ID']?>"></div>									
								</a>
							</figure>
		<?endif;?>
		<?
	} 
}
?>

Zerion Mini Shell 1.0