31f6d32a92ec4755d1a85734806e41cf.php 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:6:{s:79:"D:\phpstudy_pro\WWW\minongyun\public/../application/admin\view\index\index.html";i:1709714141;s:69:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\meta.html";i:1709714141;s:71:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\header.html";i:1709714141;s:69:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\menu.html";i:1709714141;s:72:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\control.html";i:1709714141;s:71:"D:\phpstudy_pro\WWW\minongyun\application\admin\view\common\script.html";i:1711415624;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <!-- 加载样式及META信息 -->
  6. <meta charset="utf-8">
  7. <title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
  9. <meta name="renderer" content="webkit">
  10. <meta name="referrer" content="never">
  11. <meta name="robots" content="noindex, nofollow">
  12. <link rel="shortcut icon" href="/assets/img/favicon.ico" />
  13. <!-- Loading Bootstrap -->
  14. <link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
  15. <?php if(\think\Config::get('fastadmin.adminskin')): ?>
  16. <link href="/assets/css/skins/<?php echo \think\Config::get('fastadmin.adminskin'); ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">
  17. <?php endif; ?>
  18. <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
  19. <!--[if lt IE 9]>
  20. <script src="/assets/js/html5shiv.js"></script>
  21. <script src="/assets/js/respond.min.js"></script>
  22. <![endif]-->
  23. <script type="text/javascript">
  24. var require = {
  25. config: <?php echo json_encode($config); ?>
  26. };
  27. </script>
  28. </head>
  29. <body class="hold-transition sidebar-collapse <?php echo (\think\Config::get('fastadmin.adminskin') ?: 'skin-black-blue'); ?> sidebar-mini <?php echo \think\Cookie::get('sidebar_collapse')?'sidebar-collapse':''; ?> fixed <?php echo \think\Config::get('fastadmin.multipletab')?'multipletab':''; ?> <?php echo \think\Config::get('fastadmin.multiplenav')?'multiplenav':''; ?>" id="tabs">
  30. <div class="wrapper">
  31. <!-- 头部区域 -->
  32. <header id="header" class="main-header">
  33. <?php if(preg_match('/\/admin\/|\/admin\.php|\/admin_d75KABNWt\.php/i', url())): ?>
  34. <div class="alert alert-danger-light text-center" style="margin-bottom:0;border:none;">
  35. <?php echo __('Security tips'); ?>
  36. </div>
  37. <?php endif; ?>
  38. <!-- Logo -->
  39. <a href="javascript:;" class="logo">
  40. <!-- 迷你模式下Logo的大小为50X50 -->
  41. <span class="logo-mini"><?php echo htmlentities(mb_strtoupper(mb_substr($site['name'],0,4,'utf-8'),'utf-8')); ?></span>
  42. <!-- 普通模式下Logo -->
  43. <span class="logo-lg"><?php echo htmlentities($site['name']); ?></span>
  44. </a>
  45. <!-- 顶部通栏样式 -->
  46. <nav class="navbar navbar-static-top">
  47. <!--第一级菜单-->
  48. <div id="firstnav">
  49. <!-- 边栏切换按钮-->
  50. <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
  51. <span class="sr-only"><?php echo __('Toggle navigation'); ?></span>
  52. </a>
  53. <!--如果不想在顶部显示角标,则给ul加上disable-top-badge类即可-->
  54. <ul class="nav nav-tabs nav-addtabs disable-top-badge hidden-xs" role="tablist">
  55. <?php echo $navlist; ?>
  56. </ul>
  57. <div class="navbar-custom-menu">
  58. <ul class="nav navbar-nav">
  59. <!--<li class="hidden-xs">-->
  60. <!--<a href="/" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> <?php echo __('Home'); ?></a>-->
  61. <!--</li>-->
  62. <!-- 清除缓存 -->
  63. <li class="hidden-xs">
  64. <a href="javascript:;" data-toggle="dropdown" title="<?php echo __('Wipe cache'); ?>">
  65. <i class="fa fa-trash"></i> <?php echo __('Wipe cache'); ?>
  66. </a>
  67. <ul class="dropdown-menu wipecache">
  68. <li><a href="javascript:;" data-type="all"><i class="fa fa-trash fa-fw"></i> <?php echo __('Wipe all cache'); ?></a></li>
  69. <li class="divider"></li>
  70. <li><a href="javascript:;" data-type="content"><i class="fa fa-file-text fa-fw"></i> <?php echo __('Wipe content cache'); ?></a></li>
  71. <li><a href="javascript:;" data-type="template"><i class="fa fa-file-image-o fa-fw"></i> <?php echo __('Wipe template cache'); ?></a></li>
  72. <li><a href="javascript:;" data-type="addons"><i class="fa fa-rocket fa-fw"></i> <?php echo __('Wipe addons cache'); ?></a></li>
  73. <li><a href="javascript:;" data-type="browser"><i class="fa fa-chrome fa-fw"></i> <?php echo __('Wipe browser cache'); ?>
  74. <span data-toggle="tooltip" data-title="<?php echo __('Wipe browser cache tips'); ?>"><i class="fa fa-info-circle"></i></span>
  75. </a></li>
  76. </ul>
  77. </li>
  78. <!--多语言列表 -->
  79. <!--<?php if(\think\Config::get('lang_switch_on')): ?>-->
  80. <!--<li class="hidden-xs">-->
  81. <!--<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-language"></i></a>-->
  82. <!--<ul class="dropdown-menu">-->
  83. <!--<li class="<?php echo $config['language']=='zh-cn'?'active':''; ?>">-->
  84. <!--<a href="?ref=addtabs&lang=zh-cn">简体中文</a>-->
  85. <!--</li>-->
  86. <!--<li class="<?php echo $config['language']=='en'?'active':''; ?>">-->
  87. <!--<a href="?ref=addtabs&lang=en">English</a>-->
  88. <!--</li>-->
  89. <!--</ul>-->
  90. <!--</li>-->
  91. <!--<?php endif; ?>-->
  92. <!-- 全屏按钮 -->
  93. <li class="hidden-xs">
  94. <a href="#" data-toggle="fullscreen" title="全屏或取消全屏">全屏或取消全屏&nbsp;<i class="fa fa-arrows-alt"></i></a>
  95. </li>
  96. <!-- 账号信息下拉框 -->
  97. <li class="dropdown user user-menu">
  98. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  99. <img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="user-image" alt="">
  100. <span class="hidden-xs"><?php echo htmlentities($admin['nickname']); ?></span>
  101. </a>
  102. <ul class="dropdown-menu">
  103. <!-- User image -->
  104. <li class="user-header">
  105. <img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="img-circle" alt="">
  106. <p>
  107. <?php echo htmlentities($admin['nickname']); ?>
  108. <small><?php echo date("Y-m-d H:i:s",$admin['logintime']); ?></small>
  109. </p>
  110. </li>
  111. <li class="user-body">
  112. <div class="visible-xs">
  113. <div class="pull-left">
  114. <a href="/" target="_blank"><i class="fa fa-home" style="font-size:14px;"></i> <?php echo __('Home'); ?></a>
  115. </div>
  116. <div class="pull-right">
  117. <a href="javascript:;" data-type="all" class="wipecache"><i class="fa fa-trash fa-fw"></i> <?php echo __('Wipe all cache'); ?></a>
  118. </div>
  119. </div>
  120. </li>
  121. <!-- Menu Footer-->
  122. <li class="user-footer">
  123. <div class="pull-left">
  124. <a href="general/profile" class="btn btn-primary addtabsit"><i class="fa fa-user"></i>
  125. <?php echo __('Profile'); ?></a>
  126. </div>
  127. <div class="pull-right">
  128. <a href="<?php echo url('index/logout'); ?>" class="btn btn-danger"><i class="fa fa-sign-out"></i>
  129. <?php echo __('Logout'); ?></a>
  130. </div>
  131. <script>
  132. //删除缓存
  133. localStorage.removeItem("mobile");
  134. </script>
  135. </li>
  136. </ul>
  137. </li>
  138. <!-- 控制栏切换按钮 -->
  139. <li class="hidden-xs">
  140. <a href="javascript:;" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
  141. </li>
  142. </ul>
  143. </div>
  144. </div>
  145. <?php if(\think\Config::get('fastadmin.multiplenav')): ?>
  146. <!--第二级菜单,只有在multiplenav开启时才显示-->
  147. <div id="secondnav">
  148. <ul class="nav nav-tabs nav-addtabs disable-top-badge" role="tablist">
  149. <?php if($fixedmenu): ?>
  150. <li role="presentation" id="tab_<?php echo $fixedmenu['id']; ?>" class="<?php echo $referermenu?'':'active'; ?>"><a href="#con_<?php echo $fixedmenu['id']; ?>" node-id="<?php echo $fixedmenu['id']; ?>" aria-controls="<?php echo $fixedmenu['id']; ?>" role="tab" data-toggle="tab"><i class="fa fa-dashboard fa-fw"></i> <span><?php echo $fixedmenu['title']; ?></span> <span class="pull-right-container"> </span></a></li>
  151. <?php endif; if($referermenu): ?>
  152. <li role="presentation" id="tab_<?php echo $referermenu['id']; ?>" class="active"><a href="#con_<?php echo $referermenu['id']; ?>" node-id="<?php echo $referermenu['id']; ?>" aria-controls="<?php echo $referermenu['id']; ?>" role="tab" data-toggle="tab"><i class="fa fa-list fa-fw"></i> <span><?php echo $referermenu['title']; ?></span> <span class="pull-right-container"> </span></a> <i class="close-tab fa fa-remove"></i></li>
  153. <?php endif; ?>
  154. </ul>
  155. </div>
  156. <?php endif; ?>
  157. </nav>
  158. </header>
  159. <!-- 左侧菜单栏 -->
  160. <aside class="main-sidebar">
  161. <!-- 左侧菜单栏 -->
  162. <section class="sidebar">
  163. <!-- 管理员信息 -->
  164. <div class="user-panel hidden-xs">
  165. <div class="pull-left image">
  166. <a href="general/profile" class="addtabsit"><img src="<?php echo htmlentities(cdnurl($admin['avatar'])); ?>" class="img-circle" /></a>
  167. </div>
  168. <div class="pull-left info">
  169. <p><?php echo htmlentities($admin['nickname']); ?></p>
  170. <i class="fa fa-circle text-success"></i> <?php echo __('Online'); ?>
  171. </div>
  172. </div>
  173. <!--菜单搜索 -->
  174. <form action="" method="get" class="sidebar-form" onsubmit="return false;">
  175. <div class="input-group">
  176. <input type="text" name="q" class="form-control" placeholder="<?php echo __('Search menu'); ?>">
  177. <span class="input-group-btn">
  178. <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
  179. </button>
  180. </span>
  181. <div class="menuresult list-group sidebar-form hide">
  182. </div>
  183. </div>
  184. </form>
  185. <!-- 移动端一级菜单 -->
  186. <div class="mobilenav visible-xs">
  187. </div>
  188. <!-- 左侧菜单栏 -->
  189. <ul class="sidebar-menu <?php if(\think\Config::get('fastadmin.show_submenu')): ?>show-submenu<?php endif; ?>">
  190. <!-- 菜单可以在 后台管理->权限管理->菜单规则 中进行增删改排序 -->
  191. <?php echo $menulist; ?>
  192. </ul>
  193. </section>
  194. </aside>
  195. <!-- 主体内容区域 -->
  196. <div class="content-wrapper tab-content tab-addtabs">
  197. <?php if($fixedmenu): ?>
  198. <div role="tabpanel" class="tab-pane <?php echo $referermenu?'':'active'; ?>" id="con_<?php echo $fixedmenu['id']; ?>">
  199. <iframe src="<?php echo $fixedmenu['url']; ?>?addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
  200. </div>
  201. <?php endif; if($referermenu): ?>
  202. <div role="tabpanel" class="tab-pane active" id="con_<?php echo $referermenu['id']; ?>">
  203. <iframe src="<?php echo $referermenu['url']; ?>?addtabs=1" width="100%" height="100%" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling-x="no" scrolling-y="auto" allowtransparency="yes"></iframe>
  204. </div>
  205. <?php endif; ?>
  206. </div>
  207. <!-- 底部链接,默认隐藏 -->
  208. <footer class="main-footer hide">
  209. <div class="pull-right hidden-xs">
  210. </div>
  211. <strong>Copyright &copy; 2017-<?php echo date("Y"); ?> <a href="/"><?php echo $site['name']; ?></a>.</strong> All rights reserved.
  212. </footer>
  213. <!-- 右侧控制栏 -->
  214. <div class="control-sidebar-bg"></div>
  215. <style>
  216. .skin-list li{
  217. float:left; width: 33.33333%; padding: 5px;
  218. }
  219. .skin-list li a{
  220. display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4);
  221. }
  222. .skin-list li a span{
  223. display: block;
  224. float:left;
  225. }
  226. .skin-list li.active a {
  227. opacity: 1;
  228. filter: alpha(opacity=100);
  229. }
  230. .skin-list li.active p {
  231. color: #fff;
  232. }
  233. </style>
  234. <!-- Control Sidebar -->
  235. <aside class="control-sidebar control-sidebar-dark">
  236. <!-- Create the tabs -->
  237. <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
  238. <li class="active"><a href="#control-sidebar-setting-tab" data-toggle="tab" aria-expanded="true"><i class="fa fa-wrench"></i></a></li>
  239. <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li>
  240. <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
  241. </ul>
  242. <!-- Tab panes -->
  243. <div class="tab-content">
  244. <!-- Home tab content -->
  245. <div class="tab-pane active" id="control-sidebar-setting-tab">
  246. <h4 class="control-sidebar-heading"><?php echo __('Layout Options'); ?></h4>
  247. <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-config="multiplenav" <?php if(\think\Config::get('fastadmin.multiplenav')): ?>checked<?php endif; ?> class="pull-right"> <?php echo __('Multiple Nav'); ?></label><p><?php echo __("Toggle the top menu state (multiple or single)"); ?></p></div>
  248. <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-config="multipletab" <?php if(\think\Config::get('fastadmin.multipletab')): ?>checked<?php endif; ?> class="pull-right"> <?php echo __('Multiple Tab'); ?></label><p><?php echo __("Always show multiple tab when multiple nav is set"); ?></p></div>
  249. <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-layout="sidebar-collapse" class="pull-right"> <?php echo __('Toggle Sidebar'); ?></label><p><?php echo __("Toggle the left sidebar's state (open or collapse)"); ?></p></div>
  250. <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-enable="expandOnHover" class="pull-right"> <?php echo __('Sidebar Expand on Hover'); ?></label><p><?php echo __('Let the sidebar mini expand on hover'); ?></p></div>
  251. <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-menu="show-submenu" class="pull-right"> <?php echo __('Show sub menu'); ?></label><p><?php echo __('Always show sub menu'); ?></p></div>
  252. <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-controlsidebar="control-sidebar-open" class="pull-right"> <?php echo __('Toggle Right Sidebar Slide'); ?></label><p><?php echo __('Toggle between slide over content and push content effects'); ?></p></div>
  253. <div class="form-group"><label class="control-sidebar-subheading"><input type="checkbox" data-sidebarskin="toggle" class="pull-right"> <?php echo __('Toggle Right Sidebar Skin'); ?></label><p><?php echo __('Toggle between dark and light skins for the right sidebar'); ?></p></div>
  254. <h4 class="control-sidebar-heading"><?php echo __('Skins'); ?></h4>
  255. <ul class="list-unstyled clearfix skin-list">
  256. <li><a href="javascript:;" data-skin="skin-blue" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #4e73df;"></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Blue</p></li>
  257. <li><a href="javascript:;" data-skin="skin-black" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #000;"></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Black</p></li>
  258. <li><a href="javascript:;" data-skin="skin-purple" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #605ca8;"></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Purple</p></li>
  259. <li><a href="javascript:;" data-skin="skin-green" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="width: 80%; height: 7px;"></span></div><div><span style="width: 20%; height: 20px; background: #000;"></span><span style="width: 80%; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Green</p></li>
  260. <li><a href="javascript:;" data-skin="skin-red" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="width: 80%; height: 7px;"></span></div><div><span style="width: 20%; height: 20px; background: #000;"></span><span style="width: 80%; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Red</p></li>
  261. <li><a href="javascript:;" data-skin="skin-yellow" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="width: 80%; height: 7px;"></span></div><div><span style="width: 20%; height: 20px; background: #000;"></span><span style="width: 80%; height: 20px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Yellow</p></li>
  262. <li><a href="javascript:;" data-skin="skin-blue-light" class="clearfix full-opacity-hover"><div><span style="width: 100%; height: 7px; background: #4e73df;"></span></div><div><span style="width: 100%; height: 20px; background: #f9fafc;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Blue Light</p></li>
  263. <li><a href="javascript:;" data-skin="skin-black-light" class="clearfix full-opacity-hover"><div><span style="width: 100%; height: 7px; background: #000;"></span></div><div><span style="width: 100%; height: 20px; background: #f9fafc;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Black Light</p></li>
  264. <li><a href="javascript:;" data-skin="skin-purple-light" class="clearfix full-opacity-hover"><div><span style="width: 100%; height: 7px; background: #605ca8;"></span></div><div><span style="width: 100%; height: 20px; background: #f9fafc;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Purple Light</p></li>
  265. <li><a href="javascript:;" data-skin="skin-green-light" class="clearfix full-opacity-hover"><div><span style="width: 100%; height: 7px;" class="bg-green"></span></div><div><span style="width: 100%; height: 20px; background: #f9fafc;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Green Light</p></li>
  266. <li><a href="javascript:;" data-skin="skin-red-light" class="clearfix full-opacity-hover"><div><span style="width: 100%; height: 7px;" class="bg-red"></span></div><div><span style="width: 100%; height: 20px; background: #f9fafc;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Red Light</p></li>
  267. <li><a href="javascript:;" data-skin="skin-yellow-light" class="clearfix full-opacity-hover"><div><span style="width: 100%; height: 7px;" class="bg-yellow"></span></div><div><span style="width: 100%; height: 20px; background: #f9fafc;"></span></div></a><p class="text-center no-margin" style="font-size: 12px">Yellow Light</p></li>
  268. <li><a href="javascript:;" data-skin="skin-black-blue" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #000;"><span style="width: 100%; height: 3px; margin-top:10px; background: #4e73df;"></span></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Black Blue</p></li>
  269. <li><a href="javascript:;" data-skin="skin-black-purple" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #000;"><span style="width: 100%; height: 3px; margin-top:10px; background: #605ca8;"></span></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Black Purple</p></li>
  270. <li><a href="javascript:;" data-skin="skin-black-green" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #000;"><span style="width: 100%; height: 3px; margin-top:10px;" class="bg-green"></span></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Black Green</p></li>
  271. <li><a href="javascript:;" data-skin="skin-black-red" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #000;"><span style="width: 100%; height: 3px; margin-top:10px;" class="bg-red"></span></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Black Red</p></li>
  272. <li><a href="javascript:;" data-skin="skin-black-yellow" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #000;"><span style="width: 100%; height: 3px; margin-top:10px;" class="bg-yellow"></span></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Black Yellow</p></li>
  273. <li><a href="javascript:;" data-skin="skin-black-pink" class="clearfix full-opacity-hover"><div><span style="width: 20%; height: 27px; background: #000;"><span style="width: 100%; height: 3px; margin-top:10px; background: #f5549f;"></span></span><span style="width: 80%; height: 27px; background: #f4f5f7;"></span></div></a><p class="text-center no-margin">Black Pink</p></li>
  274. </ul>
  275. </div>
  276. <!-- /.tab-pane -->
  277. <!-- Home tab content -->
  278. <div class="tab-pane" id="control-sidebar-home-tab">
  279. <h4 class="control-sidebar-heading"><?php echo __('Home'); ?></h4>
  280. </div>
  281. <!-- /.tab-pane -->
  282. <!-- Settings tab content -->
  283. <div class="tab-pane" id="control-sidebar-settings-tab">
  284. <h4 class="control-sidebar-heading"><?php echo __('Setting'); ?></h4>
  285. </div>
  286. <!-- /.tab-pane -->
  287. </div>
  288. </aside>
  289. <!-- /.control-sidebar -->
  290. </div>
  291. <!-- 加载JS脚本 -->
  292. <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
  293. <input type="hidden" value="<?php echo \think\Session::get('admin.username'); ?>" name="" id="username">
  294. <input type="hidden" value="<?php echo \think\Session::get('admin.company'); ?>" name="" id="company">
  295. <script>
  296. function watermark(element, config) {
  297. // 获取元素的坐标
  298. function getOffset(el) {
  299. if (el.offsetParent) {
  300. return {
  301. x: el.offsetLeft + getOffset(el.offsetParent).x,
  302. y: el.offsetTop + getOffset(el.offsetParent).y,
  303. };
  304. }
  305. return {
  306. x: el.offsetLeft,
  307. y: el.offsetTop,
  308. };
  309. }
  310. if (!element) return;
  311. // 默认配置
  312. const _config = {
  313. text1: '张三', //文本1
  314. text2: '13868686868', // 文本2
  315. start_x: 0, // x轴起始位置
  316. start_y: 0, // y轴起始位置
  317. space_x: 100, // x轴间距
  318. space_y: 50, // y轴间距
  319. width: 210, // 宽度
  320. height: 80, // 长度
  321. fontSize: 14, // 字体
  322. color: '#aaa', // 字色
  323. alpha: 0.4, // 透明度
  324. rotate: 15, // 倾斜度
  325. };
  326. // 替换默认配置
  327. if (arguments.length === 2 && typeof arguments[1] === "object") {
  328. const src = arguments[1] || {};
  329. for (let key in src) {
  330. if (src[key] && _config[key] && src[key] === _config[key]) {
  331. continue;
  332. } else if (src[key]) {
  333. _config[key] = src[key];
  334. }
  335. }
  336. }
  337. // 节点的总宽度
  338. const total_width = element.scrollWidth;
  339. // 节点的总高度
  340. const total_height = element.scrollHeight;
  341. // 创建文本碎片,用于包含所有的插入节点
  342. const mark = document.createDocumentFragment();
  343. // 水印节点的起始坐标
  344. const position = getOffset(element);
  345. let x = position.x + _config.start_x, y = position.y + _config.start_y;
  346. // 先循环y轴插入水印
  347. do {
  348. // 再循环x轴插入水印
  349. do {
  350. // 创建单个水印节点
  351. const item = document.createElement('div');
  352. item.className = 'watermark-item';
  353. // 设置节点的样式
  354. item.style.position = "absolute";
  355. item.style.zIndex = 99999;
  356. item.style.left = `${x}px`;
  357. item.style.top = `${y}px`;
  358. item.style.width = `${_config.width}px`;
  359. item.style.height = `${_config.height}px`;
  360. item.style.fontSize = `${_config.fontSize}px`;
  361. item.style.color = _config.color;
  362. item.style.textAlign = 'center';
  363. item.style.opacity = _config.alpha;
  364. item.style.filter = `alpha(opacity=${_config.alpha * 100})`;
  365. // item.style.filter = `opacity(${_config.alpha * 100}%)`;
  366. item.style.webkitTransform = `rotate(-${_config.rotate}deg)`;
  367. item.style.MozTransform = `rotate(-${_config.rotate}deg)`;
  368. item.style.msTransform = `rotate(-${_config.rotate}deg)`;
  369. item.style.OTransform = `rotate(-${_config.rotate}deg)`;
  370. item.style.transform = `rotate(-${_config.rotate}deg)`;
  371. item.style.pointerEvents = 'none'; //让水印不遮挡页面的点击事件
  372. // 创建text1水印节点
  373. const text1 = document.createElement('div');
  374. text1.appendChild(document.createTextNode(_config.text1));
  375. item.append(text1);
  376. // 创建text2水印节点
  377. const text2 = document.createElement('div');
  378. text2.appendChild(document.createTextNode(_config.text2));
  379. item.append(text2);
  380. // 添加水印节点到文本碎片
  381. mark.append(item);
  382. // x坐标递增
  383. x = x + _config.width + _config.space_x;
  384. // 超出文本右侧坐标停止插入
  385. } while (total_width + position.x > x + _config.width);
  386. // 重置x初始坐标
  387. x = position.x + _config.start_x;
  388. // y坐标递增
  389. y = y + _config.height + _config.space_y;
  390. // 超出文本底部坐标停止插入
  391. } while (total_height + position.y > y + _config.height);
  392. // 插入文档碎片
  393. element.append(mark);
  394. }
  395. var username = document.getElementById('username');
  396. var company = document.getElementById('company');
  397. //找到存放水印的盒子
  398. const element = document.getElementsByTagName('body')[0];
  399. watermark(element,{text1:username.value,text2:company.value});
  400. </script>
  401. </body>
  402. </html>