nav.cmp.php 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php $data['manage/database.res']=Dever::load('manage/database.res') ?>
  2. <?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
  3. <?php $data['manage/auth.info']=Dever::load('manage/auth.info') ?>
  4. <?php $data['manage/menu.link']=Dever::load('manage/menu.link') ?>
  5. <?php $data['manage/top.get']=Dever::load('manage/top.get') ?>
  6. <div id="load_style" style="display:none;"><?php echo $data['manage/database.res']['css'] ?></div>
  7. <div id="dever-name" style="display:none;"><?php echo $data['manage/auth.config']['title'] ?></div>
  8. <div class="layui-header" id="nav" style="<?php echo Dever::load("manage/auth.loading") ? "display:none;" : "" ?>">
  9. <ul class="layui-nav layui-layout-left">
  10. <li class="layui-nav-item layadmin-flexible" lay-unselect>
  11. <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
  12. <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
  13. </a>
  14. </li>
  15. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  16. <a href="http://www.layui.com/admin/" target="_blank" title="前台">
  17. <i class="layui-icon layui-icon-website"></i>
  18. </a>
  19. </li>
  20. <li class="layui-nav-item" lay-unselect>
  21. <a href="javascript:;" layadmin-event="refresh" title="刷新">
  22. <i class="layui-icon layui-icon-refresh-3"></i>
  23. </a>
  24. </li>
  25. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  26. <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search" layadmin-event="serach" lay-action="template/search.html?keywords=">
  27. </li>
  28. </ul>
  29. <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
  30. <?php if(isset($data['manage/top.get']) && is_array($data['manage/top.get'])): ?><?php $t=count($data['manage/top.get'])-1 ?><?php $i=0 ?><?php foreach($data['manage/top.get'] as $k => $v): ?><li class="layui-nav-item auth-top" lay-unselect style="display:none">
  31. <a href="javascript:;">
  32. <cite><span><?php echo $v['name'] ?></span></cite>
  33. </a>
  34. <ul class="layui-nav-child">
  35. <?php if(isset($v['child']) && $v['child'] && is_array($v['child'])):foreach($v['child'] as $k1 => $v1):if($v1): ?><li><a lay-href="set/user/info.html" data-id="<?php echo $v1['id'] ?>" onclick="topMenu($(this))"><a lay-href="set/user/info.html" data-id="<?php echo $v1['id'] ?>" onclick="topMenu($(this))"><?php echo $v1['name'] ?></a></li><?php endif;endforeach;endif; ?>
  36. </ul>
  37. </li><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/top.get'] ?><?php endif; ?>
  38. <li class="layui-nav-item" lay-unselect style="display:none;">
  39. <a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">
  40. <i class="layui-icon layui-icon-notice"></i>
  41. <span class="layui-badge-dot"></span>
  42. </a>
  43. </li>
  44. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  45. <a href="javascript:;" layadmin-event="theme">
  46. <i class="layui-icon layui-icon-theme"></i>
  47. </a>
  48. </li>
  49. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  50. <a href="javascript:;" layadmin-event="note">
  51. <i class="layui-icon layui-icon-note"></i>
  52. </a>
  53. </li>
  54. <li class="layui-nav-item layui-hide-xs" lay-unselect>
  55. <a href="javascript:;" layadmin-event="fullscreen">
  56. <i class="layui-icon layui-icon-screen-full"></i>
  57. </a>
  58. </li>
  59. <li class="layui-nav-item" lay-unselect>
  60. <a href="javascript:;">
  61. <cite id="manage-name"><?php echo $data['manage/auth.info']['username'] ?></cite>
  62. </a>
  63. <dl class="layui-nav-child">
  64. <dd><a id="edit_password" onclick="pass($(this));" style="cursor: pointer;">修改密码</a></dd>
  65. <hr>
  66. <dd layadmin-event="logout" id="logout-url" style="text-align: center;" href="<?php echo $data['manage/menu.link']['logout'] ?>"><a>退出</a></dd>
  67. </dl>
  68. </li>
  69. <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
  70. <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
  71. </li>
  72. <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
  73. <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
  74. </li>
  75. </ul>
  76. </div>