761055de2f430bef08441163fbb8bda7.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  1. <?php if (!defined('THINK_PATH')) exit();?><!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <title>后台 | 管理中心 - ADMIN EX</title>
  7. <!-- Loading Bootstrap -->
  8. <link rel="stylesheet" type="text/css" href="/Public/Admin/css/vendor/bootstrap/css/bootstrap.min.css">
  9. <link rel="stylesheet" type="text/css" href="/Public/Admin/css/base.css" media="all">
  10. <link rel="stylesheet" type="text/css" href="/Public/Admin/css/common.css" media="all">
  11. <link rel="stylesheet" type="text/css" href="/Public/Admin/css/module.css">
  12. <link rel="stylesheet" type="text/css" href="/Public/Admin/css/style.css" media="all">
  13. <link rel="stylesheet" type="text/css" href="/Public/Admin/css/default_color.css" media="all">
  14. <script type="text/javascript" src="/Public/Admin/js/jquery.min.js"></script>
  15. <script type="text/javascript" src="/Public/layer/layer.js"></script>
  16. <link rel="stylesheet" type="text/css" href="/Public/Admin/css/flat-ui.css">
  17. <script src="/Public/Admin/js/flat-ui.min.js"></script>
  18. <script src="/Public/Admin/js/application.js"></script>
  19. </head>
  20. <body>
  21. <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
  22. <div class="navbar-header">
  23. <a class="navbar-brand" style="width:200px;text-align:center;background-color:#3c434d;" href="<?php echo U('Index/index');?>">
  24. <img src="/Public/Admin/ecshe_img/logo_text.png" />
  25. </a>
  26. </div>
  27. <div class="navbar-collapse collapse">
  28. <ul class="nav navbar-nav">
  29. <!-- 主导航 -->
  30. <?php if(is_array($__MENU__["main"])): $i = 0; $__LIST__ = $__MENU__["main"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?><li <?php if(($menu["class"]) == "current"): ?>class="active"<?php endif; ?> >
  31. <a href="<?php echo (U($menu["url"])); ?>">
  32. <?php echo ($menu["title"]); ?>
  33. </a>
  34. </li><?php endforeach; endif; else: echo "" ;endif; ?>
  35. </ul>
  36. <ul class="nav navbar-nav navbar-rights" style="margin-right:10px;">
  37. <li class="dropdown">
  38. <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  39. <?php echo session('admin_username');?><b class="caret"></b>
  40. </a>
  41. <ul class="dropdown-menu">
  42. <li>
  43. <a href="<?php echo U('User/setpwd');?>">
  44. <span class="glyphicon glyphicon-wrench" aria-hidden="true"></span> 修改密码
  45. </a>
  46. </li>
  47. <li class="center">
  48. <a href="javascript:void(0);" onclick="lockscreen()">
  49. <span class="glyphicon glyphicon-lock" aria-hidden="true"></span> 锁屏休息
  50. </a>
  51. </li>
  52. <li class="dividers"></li>
  53. <li>
  54. <a href="<?php echo U('Login/loginout');?>">
  55. <span class="glyphicon glyphicon-log-out" aria-hidden="true"></span> 退出后台
  56. </a>
  57. </li>
  58. </ul>
  59. </li>
  60. <li>
  61. <a href="<?php echo U('Tools/delcache');?>" class="dropdown-toggle" title="清除缓存">
  62. <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
  63. </a>
  64. </li>
  65. <li>
  66. <a class="dropdown-toggle" title="打开前台" href="/" target="_blank">
  67. <span class="glyphicon glyphicon-share" aria-hidden="true"></span>
  68. </a>
  69. </li>
  70. </ul>
  71. </div>
  72. </div>
  73. <!-- 边栏 -->
  74. <div class="sidebar">
  75. <!-- 子导航 -->
  76. <div id="subnav" class="subnav" style="max-height: 94%;overflow-x: hidden;overflow-y: auto;">
  77. <?php if(!empty($_extra_menu)): ?> <?php echo extra_menu($_extra_menu,$__MENU__); endif; ?>
  78. <?php if(is_array($__MENU__["child"])): $i = 0; $__LIST__ = $__MENU__["child"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$sub_menu): $mod = ($i % 2 );++$i;?><!-- 子导航 -->
  79. <?php if(!empty($sub_menu)): if(!empty($key)): ?><h3><i class="icon icon-unfold"></i><?php echo ($key); ?></h3><?php endif; ?>
  80. <ul class="side-sub-menu">
  81. <?php if(is_array($sub_menu)): $i = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?><li>
  82. <a class="item" href="<?php echo (U($menu["url"])); ?>">
  83. <?php if(empty($menu["ico_name"])): ?><span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>
  84. <?php else: ?>
  85. <span class="glyphicon glyphicon-<?php echo ($menu["ico_name"]); ?>" aria-hidden="true"></span><?php endif; ?>
  86. <?php echo ($menu["title"]); ?>
  87. </a>
  88. </li><?php endforeach; endif; else: echo "" ;endif; ?>
  89. </ul>
  90. _
  91. <div>
  92. <audio id="remind">
  93. <source src="/Public/Admin/images/5f71a0c7a5c27778.mp3" type="audio/mpeg">
  94. </audio>
  95. </div><?php endif; ?>
  96. <!-- /子导航 --><?php endforeach; endif; else: echo "" ;endif; ?>
  97. </div>
  98. <!-- /子导航 -->
  99. </div>
  100. <!-- /边栏 -->
  101. <script type="text/javascript">
  102. $(function(){
  103. setInterval("tzfc()",5000);
  104. });
  105. function tzfc(){
  106. var st = 1;
  107. $.post("<?php echo U('Admin/Trade/getmyzrtz');?>",
  108. {'st':st},
  109. function(data){
  110. if(data.code == 1){
  111. var audio = document.getElementById('remind')
  112. audio.play()
  113. }
  114. });
  115. $.post("<?php echo U('Admin/Trade/gethyorder');?>",
  116. {'st':st},
  117. function(data){
  118. if(data.code == 1){
  119. layer.confirm('有新的合约订单', {
  120. btn: ['知道了'] //按钮
  121. }, function(){
  122. $.post("<?php echo U('Admin/Trade/settzstatus');?>",
  123. function(data){
  124. if(data.code == 1){
  125. window.location.reload();
  126. }
  127. });
  128. });
  129. }
  130. });
  131. }
  132. </script>
  133. <?php if(($versionUp) == "1"): ?><script type="text/javascript" charset="utf-8">
  134. /**顶部警告栏*/
  135. var top_alert = $('#top-alerta');
  136. top_alert.find('.close').on('click', function () {
  137. top_alert.removeClass('block').slideUp(200);
  138. // content.animate({paddingTop:'-=55'},200);
  139. });
  140. </script><?php endif; ?>
  141. <script type="text/javascript" src="/Public/layer/laydate/laydate.js"></script>
  142. <div id="main-content">
  143. <div id="top-alert" class="fixed alert alert-error" style="display: none;">
  144. <button class="close fixed" style="margin-top: 4px;">&times;</button>
  145. <div class="alert-content">警告内容</div>
  146. </div>
  147. <div id="main" class="main">
  148. <div class="main-title-h">
  149. <span class="h1-title"><a href="<?php echo U('Article/index');?>">公告管理</a> >></span>
  150. <span class="h1-title"><?php if(empty($data)): ?>添加公告<?php else: ?>编辑公告<?php endif; ?></span>
  151. </div>
  152. <div class="tab-wrap">
  153. <div class="tab-content">
  154. <form id="form" action="<?php echo U('Article/ggeditup');?>" method="post" class="form-horizontal" enctype="multipart/form-data">
  155. <div id="tab" class="tab-pane in tab">
  156. <div class="form-item cf">
  157. <table>
  158. <tr class="controls">
  159. <td class="item-label">公告标题:</td>
  160. <td>
  161. <input type="text" class="form-control input-10x" name="title" value="<?php echo ($data["title"]); ?>">
  162. </td>
  163. <td class="item-note"></td>
  164. </tr>
  165. <tr class="controls" >
  166. <td class="item-label">缩略图片 :</td>
  167. <td>
  168. <div id="addpicContainer">
  169. <?php if(!empty($data["img"])): ?><!--没有图片显示默认图片-->
  170. <img id="up_img" onclick="getElementById('inputfile').click()" style="cursor:pointer;max-width:100px;" title="点击添加图片" alt="点击添加图片" src="/Upload/article/<?php echo ($data["img"]); ?>">
  171. <?php else: ?>
  172. <!--没有图片显示默认图片-->
  173. <img id="up_img" onclick="getElementById('inputfile').click()" style="cursor:pointer;max-width:100px;" title="点击添加图片" alt="点击添加图片" src="/Public/Admin/images/addimg.png"><?php endif; ?>
  174. <input type="hidden" id="img" name="img" value="<?php echo ($data["img"]); ?>">
  175. <input type="file" id="inputfile" style="height:0;width:0;z-index: -1; position: absolute;left: 10px;top: 5px;" value="/Upload/wenzhang/<?php echo ($data["img"]); ?>"/>
  176. </div>
  177. </td>
  178. <td class="item-note"></td>
  179. </tr>
  180. <br /><br />
  181. <tr class="controls" style="margin-top:30px;">
  182. <td class="item-label">公告内容 :</td>
  183. <td>
  184. <textarea name="content" class="form-control input-10x"><?php echo ($data["content"]); ?></textarea>
  185. </td>
  186. <td class="item-note"></td>
  187. </tr>
  188. <tr class="controls">
  189. <td class="item-label">状态 :</td>
  190. <td>
  191. <select name="status" class="form-control input-10x">
  192. <option value="1" <?php if(($data["status"]) == "1"): ?>selected<?php endif; ?>>显示</option>
  193. <option value="2" <?php if(($data["status"]) == "2"): ?>selected<?php endif; ?>>隐藏</option>
  194. </select>
  195. </td>
  196. <td class="item-note"></td>
  197. </tr>
  198. <input type="hidden" name="id" value="<?php echo ($data["id"]); ?>" />
  199. <tr class="controls">
  200. <td class="item-label"></td>
  201. <td>
  202. <div class="form-item cf">
  203. <button class="ajax-post btn submit-btn" id="submit" type="submit" target-form="form-horizontal">提交</button>
  204. <a class="btn btn-return" href="<?php echo ($_SERVER['HTTP_REFERER']); ?>">返 回</a>
  205. <?php if(!empty($data["id"])): ?><input type="hidden" name="id" value="<?php echo ($data["id"]); ?>"/><?php endif; ?>
  206. </div>
  207. </td>
  208. </tr>
  209. </table>
  210. </div>
  211. </div>
  212. </form>
  213. <script type="text/javascript">
  214. //提交表单
  215. $('#submit').click(function () {
  216. $('#form').submit();
  217. });
  218. </script>
  219. </div>
  220. </div>
  221. </div>
  222. </div>
  223. <script type="text/javascript" src="/Public/kindeditor/kindeditor-min.js"></script>
  224. <script type="text/javascript">
  225. var editor;
  226. KindEditor.ready(function (K) {
  227. editor = K.create('textarea[name="content"]', {
  228. width: '800px',
  229. height: '300px',
  230. allowPreviewEmoticons: false,
  231. allowImageUpload: true,
  232. uploadJson: "<?php echo U('Article/edit','type=images');?>",//图片上传后的处理地址
  233. items: [
  234. 'source', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
  235. 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
  236. 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'fullscreen'],
  237. afterBlur: function () {
  238. this.sync();
  239. }
  240. });
  241. });
  242. </script>
  243. <script type="text/javascript">
  244. /** 手机端网站logo上传 **/
  245. $(document).ready(function () {
  246. //响应文件添加成功事件
  247. $("#inputfile").change(function () {
  248. //创建FormData对象
  249. var data = new FormData();
  250. //为FormData对象添加数据
  251. $.each($('#inputfile')[0].files, function (i, file) {
  252. data.append('upload_file' + i, file);
  253. });
  254. //发送数据
  255. $.ajax({
  256. url: '/Admin/Article/wenzhangimg',
  257. type: 'POST',
  258. data: data,
  259. cache: false,
  260. contentType: false, //不可缺参数
  261. processData: false, //不可缺参数
  262. success: function (data) {
  263. if (data) {
  264. $('#up_img').attr("src", '/Upload/article/' + $.trim(data));
  265. $('#img').val($.trim(data));
  266. $('#up_img').show();
  267. }
  268. },
  269. error: function () {
  270. alert('上传出错');
  271. $(".loading").hide(); //加载失败移除加载图片
  272. }
  273. });
  274. });
  275. });
  276. </script>
  277. <script type="text/javascript" src="/Public/Admin/js/common.js"></script>
  278. <script type="text/javascript">
  279. +function(){
  280. //$("select").select2({dropdownCssClass: 'dropdown-inverse'});//下拉条样式
  281. layer.config({
  282. extend: 'extend/layer.ext.js'
  283. });
  284. var $window = $(window), $subnav = $("#subnav"), url;
  285. $window.resize(function(){
  286. //$("#main").css("min-height", $window.height() - 90);
  287. }).resize();
  288. /* 左边菜单高亮 */
  289. url = window.location.pathname + window.location.search;
  290. url = url.replace(/(\/(p)\/\d+)|(&p=\d+)|(\/(id)\/\d+)|(&id=\d+)|(\/(group)\/\d+)|(&group=\d+)/, "");
  291. $subnav.find("a[href='" + url + "']").parent().addClass("current");
  292. /* 左边菜单显示收起 */
  293. $("#subnav").on("click", "h3", function(){
  294. var $this = $(this);
  295. $this.find(".icon").toggleClass("icon-fold");
  296. $this.next().slideToggle("fast").siblings(".side-sub-menu:visible").
  297. prev("h3").find("i").addClass("icon-fold").end().end().hide();
  298. });
  299. $("#subnav h3 a").click(function(e){e.stopPropagation()});
  300. /* 头部管理员菜单 */
  301. $(".user-bar").mouseenter(function(){
  302. var userMenu = $(this).children(".user-menu ");
  303. userMenu.removeClass("hidden");
  304. clearTimeout(userMenu.data("timeout"));
  305. }).mouseleave(function(){
  306. var userMenu = $(this).children(".user-menu");
  307. userMenu.data("timeout") && clearTimeout(userMenu.data("timeout"));
  308. userMenu.data("timeout", setTimeout(function(){userMenu.addClass("hidden")}, 100));
  309. });
  310. /* 表单获取焦点变色 */
  311. $("form").on("focus", "input", function(){
  312. $(this).addClass('focus');
  313. }).on("blur","input",function(){
  314. $(this).removeClass('focus');
  315. });
  316. $("form").on("focus", "textarea", function(){
  317. $(this).closest('label').addClass('focus');
  318. }).on("blur","textarea",function(){
  319. $(this).closest('label').removeClass('focus');
  320. });
  321. // 导航栏超出窗口高度后的模拟滚动条
  322. var sHeight = $(".sidebar").height();
  323. var subHeight = $(".subnav").height();
  324. var diff = subHeight - sHeight; //250
  325. var sub = $(".subnav");
  326. }();
  327. //导航高亮
  328. function highlight_subnav(url){
  329. $('.side-sub-menu').find('a[href="'+url+'"]').closest('li').addClass('current');
  330. }
  331. function lockscreen(){
  332. layer.prompt({
  333. title: '输入一个锁屏密码',
  334. formType: 1,
  335. btn: ['锁屏','取消'] //按钮
  336. }, function(pass){
  337. if(!pass){
  338. layer.msg('需要输入一个密码!');
  339. }else{
  340. $.post("<?php echo U('Login/lockScreen');?>",{pass:pass},function(data){
  341. layer.msg(data.info);
  342. layer.close();
  343. if(data.status){
  344. window.location.href = "<?php echo U('Login/lockScreen');?>";
  345. }
  346. },'json');
  347. }
  348. });
  349. }
  350. </script>
  351. <div style="display:none;">
  352. </div>
  353. </body>
  354. </html>
  355. <script type="text/javascript" charset="utf-8">
  356. //导航高亮
  357. highlight_subnav("<?php echo U('Article/index');?>");
  358. </script>