/************************************
Разделы
************************************/
$arSection = CIBlock::GetByID($IBLOCK_ID);
/************************************
Элементы
************************************/
$arSelect = array(
"ID",
"IBLOCK_ID",
"IBLOCK_SECTION_ID",
"NAME",
"PREVIEW_PICTURE",
"DETAIL_PICTURE",
"DETAIL_PAGE_URL",
"SHOW_COUNTER"
);
$arrFilter["ACTIVE"] = "Y";
$arrFilter["IBLOCK_ID"] = $IBLOCK_ID;
$arrFilter["IBLOCK_TYPE"] = $IBLOCK_TYPE;
$res = CIBlockElement::GetList(array($ELEMENT_SORT_FIELD => $ELEMENT_SORT_ORDER, "ID" => "desc"),Array("IBLOCK_ID"=>$IBLOCK_ID,"ACTIVE"=>"Y") , false, Array("nPageSize"=>$ELEMENT_COUNT), $arSelect);
if ($rsElements = $res):
$rsElements->NavStart($ELEMENT_COUNT);
$count = intval($rsElements->SelectedRowsCount());
if ($count>0):
/****************************************************************
HTML форма
****************************************************************/
?>
<a class="subtitletext" href="<?=$SECTION_URL?>&SECTION_ID=<?=$arSection["ID"]?>"><?echo htmlspecialchars($arSection["NAME"])?></a><br><img height="10" src="/bitrix/images/1.gif" width="1"><br>
<table cellpadding="10" cellspacing="0" border="0" width="80%">
<tr>
<?
$n=1;
$cell = 0;
while ($obElement = $rsElements->GetNextElement()):
$cell++;
$arElement = $obElement->GetFields();
$image1 = intval($arElement["PREVIEW_PICTURE"])<=0 ? $arElement["DETAIL_PICTURE"] : $arElement["PREVIEW_PICTURE"];
$image2 = intval($arElement["DETAIL_PICTURE"])<=0 ? $arElement["PREVIEW_PICTURE"] : $arElement["DETAIL_PICTURE"];
?>
<td valign="top" width="<?=(100/$LINE_ELEMENT_COUNT)?>%">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td valign="top"><?echo CFile::Show2Images($image1, $image2, 150, 150, "hspace='0' vspace='0' border='0' title='".$arElement["NAME"]."'", true);?></td>
</tr>
<tr>
<td valign="top"><font class="text"><a href="<?=$arElement["DETAIL_PAGE_URL"]?>"><?=$arElement["NAME"]?></a>
<?echo $arElement["SHOW_COUNTER"]; ?><br>
<?echo $arElement["IBLOCK_SECTION_ID"]; ?><br>
<?echo $ELEMENT_SORT_FIELD;?>
</font></td>
</tr>
</table></td>
<?
if($n%$LINE_ELEMENT_COUNT == 0):
&nb |