10bad90ba7af352e9fe4e52b115adce2.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:72:"D:\wamp64\www\Home-WEB\public/../application/admin\view\index\index.html";i:1557391016;}*/ ?>
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/html">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <title>麦帮官网</title>
  8. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  9. <!-- Bootstrap 3.3.7 -->
  10. <link rel="stylesheet" href="<?php echo PLUGINS_SITE_ROOT; ?>/layui/css/layui.css">
  11. <link rel="stylesheet" href="<?php echo ADMIN_SITE_ROOT; ?>/css/admin.css">
  12. <link rel="stylesheet" href="<?php echo ADMIN_SITE_ROOT; ?>/iconfont/iconfont.css">
  13. <script src="<?php echo PLUGINS_SITE_ROOT; ?>/jquery-2.1.4.min.js"></script>
  14. <script src="<?php echo ADMIN_SITE_ROOT; ?>/js/admin.js"></script>
  15. <script type="text/javascript" src="<?php echo PLUGINS_SITE_ROOT; ?>/layui/layui.js"></script>
  16. <script type="text/javascript">
  17. var BASESITEROOT = "<?php echo BASE_SITE_ROOT; ?>";
  18. var ADMINSITEROOT = "<?php echo ADMIN_SITE_ROOT; ?>";
  19. var BASESITEURL = "<?php echo BASE_SITE_URL; ?>";
  20. var HOMESITEURL = "<?php echo HOME_SITE_URL; ?>";
  21. var ADMINSITEURL = "<?php echo ADMIN_SITE_URL; ?>";
  22. </script>
  23. </head>
  24. <body>
  25. <style type="text/css">
  26. .layui-tab {
  27. position: absolute;
  28. left: 0;
  29. top: 0;
  30. height: 100%;
  31. width: 100%;
  32. z-index: 10;
  33. margin: 0;
  34. border: none;
  35. overflow: hidden;
  36. }
  37. .layui-tab-content {
  38. padding: 0;
  39. height: 100%;
  40. }
  41. .layui-tab-item {
  42. height: 100%;
  43. }
  44. .treeview .admin-nav-item{
  45. color: #a7b1c2 !important;
  46. padding-left: 5px;
  47. }
  48. .treeview .admin-nav-item:hover{
  49. color: #fff !important;
  50. }
  51. </style>
  52. <div class="admincp-header">
  53. <div class="logo">
  54. <img width="200" src="<?php echo ADMIN_SITE_ROOT; ?>/images/backlogo.png"/>
  55. </div>
  56. <div class="navbar">
  57. <ul class="fr" style="float:right" id="nav">
  58. <li>
  59. <span><?php echo \think\Lang::get('ds_shalom'); ?>,<?php echo \think\Session::get('admin_name'); ?></span>
  60. <dl class="layui-nav-child"> <!-- 二级菜单 -->
  61. <dd><a href="javascript:dsLayerOpen('<?php echo url('Index/modifypw'); ?>','<?php echo \think\Lang::get('ds_change_password'); ?>')"><?php echo \think\Lang::get('ds_change_password'); ?></a></dd>
  62. <dd><a href="<?php echo url('Login/logout'); ?>"><?php echo \think\Lang::get('ds_safe_withdrawing'); ?></a></dd>
  63. </dl>
  64. </li>
  65. <li><a href="javascript:dsLayerConfirm('<?php echo url('Index/clear'); ?>','<?php echo \think\Lang::get('ds_clear_cache_confirm'); ?>')"><?php echo \think\Lang::get('ds_clear_cache'); ?></a></li>
  66. </ul>
  67. </div>
  68. </div>
  69. <div class="admincp-container">
  70. <div class="admincp-container-left">
  71. <ul class="sidebar-menu" id="gloMenu">
  72. <?php if(is_array($menu_list) || $menu_list instanceof \think\Collection || $menu_list instanceof \think\Paginator): if( count($menu_list)==0 ) : echo "" ;else: foreach($menu_list as $fe_menu=>$menu): if(!empty($menu['children'])): ?>
  73. <li class="treeview">
  74. <div class="title" id="navT"><i class="iconfont icon-<?php echo $fe_menu; ?>"></i><span class="title-txt"> <?php echo $menu['text']; ?></span><span class="layui-nav-more"></span></div>
  75. <ul class="treeview-menu" id="navC" style="display:none;">
  76. <?php if(is_array($menu['children']) || $menu['children'] instanceof \think\Collection || $menu['children'] instanceof \think\Paginator): if( count($menu['children'])==0 ) : echo "" ;else: foreach($menu['children'] as $fe_submenu=>$submenu): if(array_intersect(explode("/",substr($submenu['url'],7,-5)),$gupinfo)): ?>
  77. <li><a data-id="<?php echo $fe_menu; ?>-<?php echo $fe_submenu; ?>" href="<?php echo $submenu['url']; ?>" class="admin-nav-item"><?php echo $submenu['text']; ?></a></li>
  78. <?php endif; endforeach; endif; else: echo "" ;endif; ?>
  79. </ul>
  80. </li>
  81. <?php else: ?>
  82. <li class="treeview">
  83. <div class="title" id="navT"><i class="iconfont icon-<?php echo $fe_menu; ?>"></i><a data-id="<?php echo $fe_menu; ?>" href="<?php echo $menu['url']; ?>" class="admin-nav-item"><?php echo $menu['text']; ?></a></div>
  84. </li>
  85. <?php endif; endforeach; endif; else: echo "" ;endif; ?>
  86. </ul>
  87. </div>
  88. <div class="admincp-container-right">
  89. <div class="layui-tab layui-tab-card" lay-filter="dsTab" lay-allowclose="true">
  90. <ul class="layui-tab-title">
  91. <li class="layui-this" lay-id="0">
  92. <cite><?php echo \think\Lang::get('ds_welcome'); ?></cite>
  93. </li>
  94. </ul>
  95. <div class="layui-tab-content">
  96. <div class="layui-tab-item layui-show">
  97. <iframe lay-id="0" src="<?php echo url('Wlcome/index'); ?>" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <script type="text/javascript">
  104. var width =document.body.clientWidth;
  105. var changesmall =function(){
  106. if($(".admincp-container-left").css("width")=="200px"){
  107. $(".admincp-container-left").css("width","55px");
  108. $("#layout-center").css({"position":"absolute","left":"55px","width":(width-55)+"px"});
  109. $(".title").attr('title',$(".title .title-txt").html())
  110. $(".title .title-txt").css("display","none");
  111. $('.admincp-container-right').css("left","55px");
  112. }else{
  113. $(".admincp-container-left").css("width","200px");
  114. $("#layout-center").css({"position":"absolute","left":"130px","width":(width-130)+"px"});
  115. $(".title").attr('title',"")
  116. $(".title span").css("display","inline-block");
  117. $('.admincp-container-right').css("left","200px");
  118. }
  119. }
  120. </script>
  121. <script type="text/javascript">
  122. layui.use(['jquery', 'element', 'layer'], function () {
  123. var $ = layui.jquery, element = layui.element, layer = layui.layer;
  124. $('.layui-tab-content').height($(window).height() - 145);
  125. var tab = {
  126. add: function (title, url, id) {
  127. element.tabAdd('dsTab', {
  128. title: title,
  129. content: '<iframe width="100%" height="100%" lay-id="' + id + '" frameborder="0" src="' + url + '" scrolling="yes" class="x-iframe"></iframe>',
  130. id: id
  131. });
  132. }, change: function (id) {
  133. element.tabChange('dsTab', id);
  134. }
  135. };
  136. $('.admin-nav-item').click(function (event) {
  137. var that = $(this);
  138. if ($('iframe[src="' + that.attr('href') + '"]')[0]) {
  139. tab.change(that.attr('data-id'));
  140. event.stopPropagation();
  141. return false;
  142. }
  143. if ($('iframe').length == 20) {
  144. layer.msg('最多可打开20个标签页');
  145. return false;
  146. }
  147. that.css({color: '#fff'});
  148. tab.add(that.text(), that.attr('href'), that.attr('data-id'));
  149. tab.change(that.attr('data-id'));
  150. event.stopPropagation();
  151. return false;
  152. });
  153. $(document).on('click', '.layui-tab-close', function () {
  154. $('.layui-nav-child a[data-id="' + $(this).parent('li').attr('lay-id') + '"]').css({color: 'rgba(255,255,255,.7)'});
  155. });
  156. });
  157. $('#gloMenu').on('click', '#navT', function () {
  158. var parent = $(this).closest('li');
  159. var index = parent.index();
  160. if (parent.find('#navC').find('li').length) {
  161. if (parent.hasClass('open')) {
  162. parent.find('#navC').stop(true).slideUp(300, function () {
  163. parent.removeClass('open')
  164. });
  165. } else {
  166. var openLi = $('.sidebar-menu').find('li.open');
  167. openLi.removeClass('open').find('#navC').stop(true).slideUp(300);
  168. parent.addClass('open').find('#navC').stop(true).slideDown(300);
  169. }
  170. }
  171. })
  172. $('#nav').on('click', '#nav1', function () {
  173. var parent = $(this).closest('li');
  174. var index = parent.index();
  175. if (parent.find('#nav2').find('li').length) {
  176. if (parent.hasClass('open')) {
  177. parent.find('#nav2').stop(true).slideUp(300, function () {
  178. parent.removeClass('open')
  179. });
  180. } else {
  181. var openLi = $('.sidebar-menu').find('li.open');
  182. openLi.removeClass('open').find('#nav2').stop(true).slideUp(300);
  183. parent.addClass('open').find('#nav2').stop(true).slideDown(300);
  184. }
  185. }
  186. })
  187. </script>
  188. </body>
  189. </html>