<div class="in">
<?php 

?>

<?php foreach($conf['sys_elangs'] as $k=>$v){?>
<h4><?=html($v)?></h4>
<ul>




<?php foreach($conf['sys_subjects'] as $k2=>$v2){?>
<h6><a href="<?=url(ROOTPATH.$k.'/'.$k2.'/')?>" ><?=htmlxlang($v2[0],$k)?></a></h6>
<ol>
<?php foreach($v2[1] as $v3){
    $_mod=$conf['sys_menus'][$v3]['mod'];
    $_act=$conf['sys_modules'][$_mod]['action'];
    $_k=$k==$conf['sys_lang']?'':($k.'/');
    if($_mod=='home_'){
        $url=$k==$conf['sys_lang']?ROOTPATH:url(RP);
    }else if($_mod=='fun_'){
                    $url=url(ROOTPATH.$_k.$k2.'-'.$conf['sys_menus'][$v3]['fun_'].'/');
            }else if($_mod=='page_'){                
                $url=url(ROOTPATH.$_k.$k2.'-'.$conf['sys_menus'][$v3]['page_'].'/');
            }else if($v['mod']=='link_'){
$url=$conf['sys_menus'][$v3]['link_'];
        } else {
            $url=url(ROOTPATH.$_k.$k2.'-'.$_mod.'/'.($conf['sys_modules'][$_mod]['action'] ==
                'index'?'':($conf['sys_modules'][$_mod]['action'].'/')).$v3.'/');
        }
    
    ?>
<li><a href="<?=$url?>" ><?=htmlxlang($conf['sys_menus'][$v3]['name'],$k)?></a></li>
<?php }?>
</ol>
<?php }?>


<?php foreach($conf['sys_pmenus'] as $k2=>$v2){
    if(!in_array('main',$v2['show'])) continue;
    
    $_mod=$conf['sys_menus'][$k2]['mod'];
    $_act=$conf['sys_modules'][$_mod]['action'];
    $_k=$k==$conf['sys_lang']?'':($k.'/');
    if($_mod=='home_'){
        $url=$k==$conf['sys_lang']?ROOTPATH:url(ROOTPATH.$k.'/');
    }else if($_mod=='fun_'){
                    $url=url(ROOTPATH.$_k.$conf['sys_menus'][$k2]['fun_'].'/');
            }else if($_mod=='page_'){                
                $url=url(ROOTPATH.$_k.$conf['sys_menus'][$k2]['page_'].'/');
            }else if($v['mod']=='link_'){
$url=$conf['sys_menus'][$k2]['link_'];
        } else {
            $url=url(ROOTPATH.$_k.$_mod.'/'.($conf['sys_modules'][$_mod]['action'] ==
                'index'?'':($conf['sys_modules'][$_mod]['action'].'/')).$k2.'/');
        }
    
    ?>

<h6><a href="<?=$url?>" ><?=htmlxlang($v2['name'],$k)?></a></h6>

<?php
if(!is_array($conf['sys_pmenus_sub'][$k2])) continue;
?>
<ol>
<?php
 foreach($conf['sys_pmenus_sub'][$k2] as $k3=>$v3){

    $_mod=$conf['sys_menus'][$k3]['mod'];
    $_act=$conf['sys_modules'][$_mod]['action'];
    if($_mod=='home_'){
        $url=$k==$conf['sys_lang']?ROOTPATH:url(ROOTPATH.$k.'/');
    }else if($_mod=='fun_'){
                    $url=url(ROOTPATH.$_k.$conf['sys_menus'][$k3]['fun_'].'/');
            }else if($_mod=='page_'){                
                $url=url(ROOTPATH.$_k.$conf['sys_menus'][$k3]['page_'].'/');
            }else if($v['mod']=='link_'){
$url=$conf['sys_menus'][$k3]['link_'];
        } else {
            $url=url(ROOTPATH.$_k.$_mod.'/'.($conf['sys_modules'][$_mod]['action'] ==
                'index'?'':($conf['sys_modules'][$_mod]['action'].'/')).$k3.'/');
        }
    ?>
<li><a href="<?=$url?>" ><?=htmlxlang($conf['sys_menus'][$k3]['name'],$k)?></a></li>
<?php }?>
</ol>
<?php }?>


<?php foreach($conf['sys_menus'] as $k2=>$v2){
    if(!in_array('foot',$v2['show'])) continue;
    $_mod=$conf['sys_menus'][$k2]['mod'];
    $_act=$conf['sys_modules'][$_mod]['action'];
    $_k=$k==$conf['sys_lang']?'':($k.'/');
    if($_mod=='home_'){
        $url=$k==$conf['sys_lang']?ROOTPATH:url(ROOTPATH.$k.'/');
    }else if($_mod=='fun_'){
                    $url=url(ROOTPATH.$_k.$conf['sys_menus'][$k2]['fun_'].'/');
            }else if($_mod=='page_'){                
                $url=url(ROOTPATH.$_k.$conf['sys_menus'][$k2]['page_'].'/');
            }else if($v['mod']=='link_'){
$url=$conf['sys_menus'][$k2]['link_'];
        } else {
            $url=url(ROOTPATH.$_k.$_mod.'/'.($conf['sys_modules'][$_mod]['action'] ==
                'index'?'':($conf['sys_modules'][$_mod]['action'].'/')).$k2.'/');
        }
    
    ?>
<h6><a href="<?=$url?>" ><?=htmlxlang($v2['name'],$k)?></a></h6>

<?php }?>

</ul>
<?php }?>

</div>
