<?$APPLICATION->SetPageProperty("maket", "special");?>
<input type='hidden' value='<?=$_REQUEST["sect_id"]?>' id='section_id'/>
<ul class="categories_new">
<li class="<?=(empty($_REQUEST['sect_id']) ? active : "")?>"><a href="/special/" data-filter="*">Все</a></li>
<? if(CModule::IncludeModule("iblock"))
{
//print_r($arResult);
$sec=CIBlockSection::GetList(Array("SORT"=>"ASC", "IBLOCK_SECTION_ID"=>"DESC"),Array("IBLOCK_ID"=>"6", "ACTIVE"=>"Y"));
$sect_arr = array();
while($item=$sec->GetNext())
{
if($item['DEPTH_LEVEL'] == 1)
$sect_arr[] = $item;
else
$sect_arr2[] = $item;
}
foreach($sect_arr as $sect_first)
{
$sect_depth = 1;
?><li class="<?=((($_REQUEST['sect_id'] == $sect_first['ID']) || ($_REQUEST['sect_id'] == $sect_first['ID'])) ? active : '')?>"><a data-filter='.<?=$sect_first["ID"]?>' href='?sect_id=<?=$sect_first['ID']?>'><?=$sect_first['NAME']?></a>
<?
foreach($sect_arr2 as $sect_first2)
{
if($sect_first2['IBLOCK_SECTION_ID'] == $sect_first['ID'])
{
if($sect_depth)
{
echo "<div class='groups_menu_sec_lvl'><ul>";
?> <li class="<?=(($_REQUEST['sect_id'] == $sect_first['ID']) ? active : "")?>"><a class='is_close' data-filter='.<?=$sect_first["ID"]?>' href='#'>Все</a></li> <?
$sect_depth = 0;
}
?>
<li class="<?=(($_REQUEST['sect_id'] == $sect_first2['ID']) ? active : '')?>"><a class='is_close' data-filter='.<?=$sect_first2["ID"]?>' href='?sect_id=<?=$sect_first2['ID']?>'><?=$sect_first2['NAME']?></a>
<?
}
}
if(!$sect_depth)
echo "</ul></div>";
?>
</li><?
}
}
?>
</ul>