You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
4.3 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. <!DOCTYPE html><html><head><title><?php echo sysconfig('CMS_WEBNAME'); ?>后台管理</title>
  2. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
  3. <meta name="viewport" content="width=device-width, initial-scale=1">
  4. <link rel="stylesheet" href="<?php echo route('home'); ?>/css/bootstrap.min.css"><link rel="stylesheet" href="<?php echo route('home'); ?>/css/admin.css">
  5. <script src="<?php echo route('home'); ?>/js/jquery.min.js"></script><script src="<?php echo route('home'); ?>/js/respond.min.js"></script><script src="<?php echo route('home'); ?>/js/ad.js"></script><script src="<?php echo route('home'); ?>/js/bootstrap.min.js"></script></head><body>
  6. <div class="blog-masthead clearfix"><nav class="blog-nav">
  7. <a class="blog-nav-item active" href="<?php echo route('admin'); ?>"><span class="glyphicon glyphicon-star"></span> <strong>后台管理中心</strong> <span class="glyphicon glyphicon-star-empty"></span></a>
  8. <a class="blog-nav-item" href="<?php echo route('home'); ?>" target="_blank"><span class="glyphicon glyphicon-home"></span> 网站主页</a>
  9. <a class="blog-nav-item" href="<?php echo route('admin'); ?>/index/upcache"><span class="glyphicon glyphicon-refresh"></span> 更新缓存</a>
  10. <a class="blog-nav-item" id="navexit" href="<?php echo route('admin_logout'); ?>"><span class="glyphicon glyphicon-off"></span> 注销</a>
  11. <a class="blog-nav-item pull-right" href="javascript:;"><small>您好:<span class="glyphicon glyphicon-user"></span> <?php if(isset($_SESSION['admin_user_info'])){echo $_SESSION['admin_user_info']['username'].' ['.$_SESSION['admin_user_info']['rolename'].']';} ?></small></a>
  12. </nav></div>
  13. <div class="container-fluid">
  14. <div class="row">
  15. <!-- 左边开始 --><div class="col-sm-3 col-md-2 sidebar">
  16. <script type="text/javascript">
  17. $(document).ready(function(){
  18. $('.inactive').click(function(){
  19. var className=$(this).parents('li').parents().attr('class');
  20. if($(this).siblings('ul').css('display')=='none')
  21. {
  22. if(className=="leftmenu")
  23. {
  24. $(this).parents('li').siblings('li').children('ul').parent('li').children('a').removeClass('active');
  25. $(this).parents('li').siblings('li').children('ul').slideUp(100);
  26. $(this).parents('li').children('ul').children('li').children('ul').parent('li').children('a').removeClass('active');
  27. $(this).parents('li').children('ul').children('li').children('ul').slideUp(100);
  28. }
  29. $(this).addClass('active');
  30. $(this).siblings('ul').slideDown(100);
  31. }
  32. else
  33. {
  34. $(this).removeClass('active');
  35. $(this).siblings('ul').slideUp(100);
  36. }
  37. });
  38. $('.active').trigger("click");
  39. });
  40. </script>
  41. <div class="menu">
  42. <ul class="leftmenu">
  43. <?php if($menus){ foreach($menus as $k=>$first){if(!isset($first['child']) && $first['deep']==0){}else{ ?>
  44. <!-- 一级菜单 -->
  45. <li><a href="<?php if(isset($first['child'])){echo 'javascript:;';}else{echo route($first['action']);} ?>" class="<?php if(isset($first['child'])){echo 'inactive ';} if($k==0){echo 'active ';} ?>"><?php if($first['icon']){echo '<small class="'.$first['icon'].'"></small>';} ?> <?php echo $first['name']; ?></a>
  46. <!-- 二级菜单 -->
  47. <?php if(isset($first['child'])){ ?>
  48. <ul style="display: none">
  49. <?php foreach($first['child'] as $second){ ?>
  50. <li><a target="appiframe" href="<?php if(isset($second['child'])){echo 'javascript:;';}else{echo route($second['action']);} ?>" class="<?php if(isset($second['child'])){echo 'inactive ';} ?>"><small class="glyphicon glyphicon-hand-right"></small> <?php echo $second['name']; ?></a>
  51. <!-- 三级菜单 -->
  52. <?php if(isset($second['child'])){ ?>
  53. <ul><?php foreach($second['child'] as $third){ ?>
  54. <li><a target="appiframe" href="{{ route($third['action']) }}"><small class="glyphicon glyphicon-menu-right"></small> <?php echo $third['name']; ?></a></li><?php } ?>
  55. </ul><?php } ?>
  56. </li>
  57. <?php } ?>
  58. </ul><?php } ?>
  59. </li>
  60. <?php }}} ?>
  61. </ul>
  62. </div>
  63. </div><!-- 左边结束 -->
  64. <!-- 右边开始 --><div class="col-sm-9 col-md-10 rightbox"><div id="mainbox">
  65. <script type="text/javascript">
  66. var viewH = document.documentElement.clientHeight;
  67. var mainbox = document.getElementById("mainbox");
  68. mainbox.style.height = (viewH - 75)+"px";
  69. </script>
  70. <iframe src="<?php echo route('admin_welcome'); ?>" frameborder="0" scrolling="yes" width="100%" height="100%" allowtransparency="true" id="appiframe" name="appiframe"></iframe>
  71. </div></div><!-- 右边结束 --></div></div>
  72. </body></html>