menu.cmp.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
  2. <?php $data['manage/menu.link']=Dever::load('manage/menu.link') ?>
  3. <?php $data['manage/menu.all']=Dever::load('manage/menu.all') ?>
  4. <div class="layui-side layui-side-menu">
  5. <div class="layui-side-scroll">
  6. <div class="layui-logo" id="console-url" lay-href="<?php echo $data['manage/menu.link']['console'] ?>">
  7. <span id="dever-name"><?php echo $data['manage/auth.config']['title'] ?></span>
  8. </div>
  9. <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
  10. <?php if(isset($data['manage/menu.all']) && is_array($data['manage/menu.all'])): ?><?php $t=count($data['manage/menu.all'])-1 ?><?php $i=0 ?><?php foreach($data['manage/menu.all'] as $k => $v): ?><li data-name="home" class="layui-nav-item<?php if(Dever::input("menu") == $v['key'] || (!Dever::input("menu_id") && $k == "console")):?> layui-nav-itemed<?php endif; ?>">
  11. <a href="javascript:;" lay-tips="<?php echo $v['name'] ?>" lay-direction="2" data-target=".<?php echo $v['key'] ?>-menu" class="<?php if(Dever::input("menu") == $v['key'] || !Dever::input("menu")):?>layui-nav-itemed<?php endif; ?>">
  12. <i class="<?php echo $v['icon'] ? "layui-icon " . $v['icon'] : "layui-icon layui-icon-home" ?>"></i>
  13. <cite><?php echo $v['name'] ?></cite>
  14. </a>
  15. <dl class="layui-nav-child" id="<?php echo $v['key'] ?>-menu">
  16. <?php if(isset($v['child']) && $v['child'] && is_array($v['child'])):foreach($v['child'] as $k1 => $v1):if($v1): ?><dd data-name="console" class="<?php if(Dever::input("menu_id") == $v1['id']):?>layui-this<?php elseif(!Dever::input("menu_id") && $k1 == "console.index"): ?>layui-this<?php endif; ?>">
  17. <a lay-href="<?php echo $v1['link'] ?>"><?php echo $v1['name'] ?></a>
  18. </dd><?php endif;endforeach;endif; ?>
  19. </dl>
  20. </li><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/menu.all'] ?><?php endif; ?>
  21. </ul>
  22. </div>
  23. </div>