<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<div id="menuover">
<?if (!empty($arResult)):?>
<ul id="menu">
<?
$previousLevel = 0;
foreach($arResult as $key => $arItem):?>
<?if ($previousLevel && $arItem["DEPTH_LEVEL"] < $previousLevel):?>
<?=str_repeat("</ul></li><hr class='head'>", ($previousLevel - $arItem["DEPTH_LEVEL"]));?>
<?endif?>
<?if ($arItem["IS_PARENT"]):?>
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<li class="parent"><a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a>
<ul>
<?else:?>
<li class="parent"><a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a><div class="head"></div>
<ul>
<?endif?>
<?else:?>
<?if ($arItem["PERMISSION"] > "D"):?>
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<li class="parent"><a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a></li><?if (sizeof($arResult) <> ($key+1)) echo '<hr class="head">';?>
<?else:?>
<li class="child"><a href="<?=$arItem["LINK"]?>"><?=$arItem["TEXT"]?></a></li>
<?endif?>
<?else:?>
<?if ($arItem["DEPTH_LEVEL"] == 1):?>
<li><a href="" title="<?=GetMessage("MENU_ITEM_ACCESS_DENIED")?>"><?=$arItem["TEXT"]?></a></li><hr class="head">
<?else:?>
<li><a href="" 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></li><hr class='head'>", ($previousLevel-1) );?>
<?endif?>
</ul>
<?endif?></div> |