Your IP : 3.144.244.100
<?
$mainBanner = array();
$arSelect = Array("ID", "IBLOCK_ID", "NAME", "DATE_ACTIVE_FROM","PROPERTY_*");//IBLOCK_ID и ID обязательно должны быть указаны, см. описание arSelectFields выше
$arFilter = Array("IBLOCK_ID"=>IntVal(IB_MAIN_MID_LOW_BANNER), "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y");
$res = CIBlockElement::GetList(Array("SORT"=>"asc"), $arFilter, false, Array("nPageSize"=>50), $arSelect);
while($ob = $res->GetNextElement())
{
$arProps = $ob->GetProperties();
$mainBanner [] = array("IMG"=>CFile::GetPath($arProps["IMG"]["VALUE"]),"LINK"=>$arProps["LINK"]["VALUE"]);
}
?>
<div class="home-block-promo bottom clearfix centered-on-page site-width space-after">
<?$bani=2;
foreach ($mainBanner as $elem):
if($bani+1==5)
$bani=2;
$bani++;?>
<div class="wrapper-push-banner">
<a title="_" class="push-banner-<?=$bani?>"
href="<?=$elem["LINK"]?>">
<img src="<?=$elem["IMG"]?>"
alt=""/>
</a>
</div>
<?endforeach;?>
</div>