<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?if (!empty($arResult)):?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<?$previousLevel = 0;
foreach($arResult as $arItem):?>
<?if ($previousLevel && $arItem["DEPTH_LEVEL"] < $previousLevel):?>
<?if ($arItem["DEPTH_LEVEL"]!=1):?>
<?=str_repeat("</ul></li>", ($previousLevel - $arItem["DEPTH_LEVEL"]));?>
<?else:?>
<? echo str_repeat("</ul></td>", ($previousLevel - $arItem["DEPTH_LEVEL"]));?>
<?endif?>
<?endif?>
<?if ($arItem["IS_PARENT"]):?>
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<td align="center" <?if ($arItem["SELECTED"]):?> class="active"<?endif?>>
<a href="<?=$arItem["LINK"]?>" class="<?if ($arItem["SELECTED"]):?>root-item-selected<?else:?>root-item<?endif?>">
<div><?=$arItem["TEXT"]?></div></a>
<ul>
<?else:?>
<li>
<a href="<?=$arItem["LINK"]?>" class="parent"><?=strip_tags($arItem["TEXT"])?></a>
<ul>
<div style="width: 286px; height: 11px; background: url('../images/menu_background_lev0.png') 0 0 no-repeat;"></div>
<?endif?>
<?else:?>
<?if ($arItem["PERMISSION"] > "D"):?>
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<td align="center" <?if ($arItem["SELECTED"]):?> class="active"<?endif?>>
<a href="<?=$arItem["LINK"]?>" class="<?if ($arItem["SELECTED"]):?>root-item-selected<?else:?>root-item<?endif?>">
<div><?=$arItem["TEXT"]?></div></a></td>
<?else:?>
<li>
<a href="<?=$arItem["LINK"]?>"><?=strip_tags($arItem["TEXT"])?></a>
</li>
<?endif?>
<?else:?>
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<li><a href="" class="<?if ($arItem["SELECTED"]):?>root-item-selected<?else:?>root-item<?endif?>" title="<?=GetMessage("MENU_ITEM_ACCESS_DENIED")?>"><?=$arItem["TEXT"]?></a></li>
<?else:?>
<li><a href="" class="denied" title="<?=GetMessage("MENU_ITEM_ACCESS_DENIED")?>"><?=$arItem["TEXT"]?></a></li>
<?endif?>
<?endif?>
<?endif?>
<?$previousLevel = $arItem["DEPTH_LEVEL"];?>
<?endforeach?>
<?if ($previousLevel > 1)://close last item tags?>
<?=str_repeat("</ul></td>", ($previousLevel-1) );?>
<?endif?>
</tr>
</table>
<?endif?>
|