65e605872ed5d34210f5b33beb13f5a3.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  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. <div id="main-content">
  142. <div id="top-alert" class="fixed alert alert-error" style="display: none;">
  143. <button class="close fixed" style="margin-top: 4px;">&times;</button>
  144. <div class="alert-content">警告内容</div>
  145. </div>
  146. <div id="main" class="main">
  147. <div class="main-title-h">
  148. <span class="h1-title">用户管理</span>
  149. </div>
  150. <div class="cf">
  151. <div class="fl">
  152. <a class="btn btn-success " href="<?php echo U('User/edit');?>">新 增</a>
  153. <button class="ajax-post btn btn-info " url="<?php echo U('User/status',array('type'=>'1'));?>" target-form="ids">
  154. 冻结</button>
  155. <button class="ajax-post btn btn-danger" url="<?php echo U('User/status',array('type'=>'2'));?>" target-form="ids">
  156. 解冻</button>
  157. <button class="ajax-post btn btn-info " url="<?php echo U('User/status',array('type'=>'3'));?>" target-form="ids">
  158. 允许提币</button>
  159. <button class="ajax-post btn btn-danger" url="<?php echo U('User/status',array('type'=>'4'));?>" target-form="ids">
  160. 禁止提币</button>
  161. <button class="btn ajax-post confirm btn-danger " url="<?php echo U('User/status',array('type'=>'5'));?>" target-form="ids">
  162. 删除</button>
  163. <a class="btn btn-success" href="<?php echo U('User/sendnotice');?>?id=0&type=2">群发通知</a>
  164. </div>
  165. <div class="search-form fr cf">
  166. <div class="sleft">
  167. <form name="formSearch" id="formSearch" method="get" name="form1">
  168. <select style="width:120px;float:left;margin-right:10px;" name="status" class="form-control">
  169. <option value="" <?php if(empty($_GET['status'])): ?>selected<?php endif; ?> >全部状态</option>
  170. <option value="1" <?php if(($_GET['status']) == "1"): ?>selected<?php endif; ?> >正常状态</option>
  171. <option value="2" <?php if(($_GET['status']) == "2"): ?>selected<?php endif; ?> >冻结状态</option>
  172. </select>
  173. <select style="width:120px;float:left;margin-right:10px;" name="field" class="form-control">
  174. <option value="username"
  175. <?php if(empty($_GET['field'])): ?>selected<?php endif; ?>
  176. >邮箱账号</option>
  177. </select>
  178. <script type="text/javascript" src="/Public/layer/laydate/laydate.js"></script>
  179. <input type="text" name="name" class="search-input form-control" value="<?php echo ($_GET['name']); ?>" placeholder="请输入邮箱账号" style="">
  180. <a class="sch-btn" href="javascript:;" id="search"> <i class="btn-search"></i> </a>
  181. </form>
  182. <script>
  183. //搜索功能
  184. $(function () {
  185. $('#search').click(function () {
  186. $('#formSearch').submit();
  187. });
  188. });
  189. //回车搜索
  190. $(".search-input").keyup(function (e) {
  191. if (e.keyCode === 13) {
  192. $("#search").click();
  193. return false;
  194. }
  195. });
  196. </script>
  197. </div>
  198. </div>
  199. </div>
  200. <div class="data-table table-striped">
  201. <form id="form" method="post" class="form-horizontal">
  202. <table class="">
  203. <thead>
  204. <tr>
  205. <th class="row-selected row-selected">
  206. <input class="check-all" type="checkbox"/>
  207. </th>
  208. <th class="">会员资料</th>
  209. <th class="">注册IP/时间/地址</th>
  210. <th class="">推荐人</th>
  211. <th class="">状态</th>
  212. <th class="">操作</th>
  213. </tr>
  214. </thead>
  215. <tbody>
  216. <?php if(!empty($list)): if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
  217. <td>
  218. <input class="ids" type="checkbox" name="id[]" value="<?php echo ($vo["id"]); ?>"/>
  219. </td>
  220. <td>
  221. <span>ID:<?php echo ($vo["id"]); ?></span><span>邀请码:<?php echo ($vo["invit"]); ?></span><br>
  222. <span title="登录该用户"><a href=" <?php echo U('User/loginadmin?id='.$vo['id'].'&pass='.$vo['password']);?>" target="_blank"><?php echo ($vo["username"]); ?></a></span><br>
  223. <span>手机号:<?php echo ($vo["phone"]); ?></span><br>
  224. <span>登陆:<?php echo ($vo["logins"]); ?></span>次
  225. </td>
  226. <td>
  227. <span>IP:<?php echo ($vo["addip"]); ?></span><br />
  228. <span>时间:<?php echo date("Y-m-d H:i:s",$vo['addtime']);?></span><br />
  229. <span><?php echo ($vo["addr"]); ?></span>
  230. </td>
  231. <td>
  232. <?php if(($vo["invit_1"]) != ""): ?><a href="<?php echo U('User/index?name='.$vo['invit_1'].'&field=username');?>">1代:<?php echo ($vo['invit_1']); ?></a><br><?php endif; ?>
  233. <?php if(($vo["invit_2"]) != ""): ?><a href="<?php echo U('User/index?name='.$vo['invit_2'].'&field=username');?>">2代:<?php echo ($vo['invit_2']); ?></a><br><?php endif; ?>
  234. <?php if(($vo["invit_3"]) != ""): ?><a href="<?php echo U('User/index?name='.$vo['invit_3'].'&field=username');?>">3代:<?php echo ($vo['invit_3']); ?></a><br><?php endif; ?>
  235. </td>
  236. <td>
  237. 认证:
  238. <?php if(($vo["rzstatus"]) == "0"): ?>未提交<?php endif; ?>
  239. <?php if(($vo["rzstatus"]) == "1"): ?><span style="color:blue;">待审核</span><?php endif; ?>
  240. <?php if(($vo["rzstatus"]) == "2"): ?><span style="color:green;">认证成功</span><?php endif; ?>
  241. <?php if(($vo["rzstatus"]) == "3"): ?><span style="color:red;">认证驳回</span><?php endif; ?>
  242. <br />
  243. <?php if(($vo["status"]) == "1"): ?>登陆:<span style="color:green;">正常</span><?php endif; ?>
  244. <?php if(($vo["status"]) == "2"): ?>登陆:<span style="color:red;">冻结</span><?php endif; ?>
  245. <br />
  246. <?php if(($vo["txstate"]) == "1"): ?>提币:<span style="color:green;">正常</span><?php endif; ?>
  247. <?php if(($vo["txstate"]) == "2"): ?>提币:<span style="color:red;">禁止</span><?php endif; ?>
  248. </td>
  249. <td>
  250. <a class="btn btn-primary btn-xs" href="<?php echo U('User/edit');?>?id=<?php echo ($vo["id"]); ?>">编辑</a>
  251. <?php if(($vo["rzstatus"]) == "1"): ?><a class="btn btn-primary btn-xs" href="<?php echo U('User/authrz');?>?id=<?php echo ($vo["id"]); ?>">审核认证</a><?php endif; ?>
  252. <a class="btn btn-primary btn-xs" href="<?php echo U('User/sendnotice');?>?id=<?php echo ($vo["id"]); ?>&type=1">发送通知</a>
  253. <?php if(($vo["is_agent"]) == "0"): ?><input type="button" class="ajax-get btn btn-danger btn-xs" value="设为代理" onclick="setagent('<?php echo ($vo['id']); ?>');"/><?php endif; ?>
  254. <?php if(($vo["taxstatus"]) == "0"): if(($vo["is_tax"]) == "0"): ?><input type="button" class="ajax-get btn btn-info btn-xs" value="收取税金" onclick="setTax('<?php echo ($vo['id']); ?>',1);"/><?php endif; ?>
  255. <?php if(($vo["is_tax"]) == "1"): ?><input type="button" class="ajax-get btn btn-danger btn-xs" value="收取税金" onclick="setTax('<?php echo ($vo['id']); ?>',2);"/><?php endif; endif; ?>
  256. <?php if(($vo["taxstatus"]) == "1"): ?><input type="button" class="ajax-get btn btn-success btn-xs" value="已交税金" /><?php endif; ?>
  257. </td>
  258. </tr><?php endforeach; endif; else: echo "" ;endif; ?>
  259. <?php else: ?>
  260. <td colspan="12" class="text-center empty-info"><i class="glyphicon glyphicon-exclamation-sign"></i>暂无数据</td><?php endif; ?>
  261. </tbody>
  262. </table>
  263. </form>
  264. <div class="page">
  265. <div><?php echo ($page); ?></div>
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. <script type="text/javascript">
  271. //提交表单
  272. $('#submit').click(function () {
  273. $('#form').submit();
  274. });
  275. $(".page > div").children("a").each(function(){
  276. var ahref = $(this).attr('href');
  277. var ahrefarr = ahref.split("/");
  278. var ahlength = ahrefarr.length;
  279. var newhref = '';
  280. for(var i=0;i<ahlength;i++){
  281. if(i<3 && i>0){
  282. newhref += "/"+ahrefarr[i];
  283. }
  284. if(i==3){
  285. newhref += "/"+ahrefarr[i]+".html?";
  286. }
  287. if(i>=4 && i%2==0){
  288. newhref += "&"+ahrefarr[i]+"="+ahrefarr[i+1];
  289. }
  290. }
  291. $(this).attr("href",newhref);
  292. });
  293. </script>
  294. <script type="text/javascript" src="/Public/Admin/js/common.js"></script>
  295. <script type="text/javascript">
  296. +function(){
  297. //$("select").select2({dropdownCssClass: 'dropdown-inverse'});//下拉条样式
  298. layer.config({
  299. extend: 'extend/layer.ext.js'
  300. });
  301. var $window = $(window), $subnav = $("#subnav"), url;
  302. $window.resize(function(){
  303. //$("#main").css("min-height", $window.height() - 90);
  304. }).resize();
  305. /* 左边菜单高亮 */
  306. url = window.location.pathname + window.location.search;
  307. url = url.replace(/(\/(p)\/\d+)|(&p=\d+)|(\/(id)\/\d+)|(&id=\d+)|(\/(group)\/\d+)|(&group=\d+)/, "");
  308. $subnav.find("a[href='" + url + "']").parent().addClass("current");
  309. /* 左边菜单显示收起 */
  310. $("#subnav").on("click", "h3", function(){
  311. var $this = $(this);
  312. $this.find(".icon").toggleClass("icon-fold");
  313. $this.next().slideToggle("fast").siblings(".side-sub-menu:visible").
  314. prev("h3").find("i").addClass("icon-fold").end().end().hide();
  315. });
  316. $("#subnav h3 a").click(function(e){e.stopPropagation()});
  317. /* 头部管理员菜单 */
  318. $(".user-bar").mouseenter(function(){
  319. var userMenu = $(this).children(".user-menu ");
  320. userMenu.removeClass("hidden");
  321. clearTimeout(userMenu.data("timeout"));
  322. }).mouseleave(function(){
  323. var userMenu = $(this).children(".user-menu");
  324. userMenu.data("timeout") && clearTimeout(userMenu.data("timeout"));
  325. userMenu.data("timeout", setTimeout(function(){userMenu.addClass("hidden")}, 100));
  326. });
  327. /* 表单获取焦点变色 */
  328. $("form").on("focus", "input", function(){
  329. $(this).addClass('focus');
  330. }).on("blur","input",function(){
  331. $(this).removeClass('focus');
  332. });
  333. $("form").on("focus", "textarea", function(){
  334. $(this).closest('label').addClass('focus');
  335. }).on("blur","textarea",function(){
  336. $(this).closest('label').removeClass('focus');
  337. });
  338. // 导航栏超出窗口高度后的模拟滚动条
  339. var sHeight = $(".sidebar").height();
  340. var subHeight = $(".subnav").height();
  341. var diff = subHeight - sHeight; //250
  342. var sub = $(".subnav");
  343. }();
  344. //导航高亮
  345. function highlight_subnav(url){
  346. $('.side-sub-menu').find('a[href="'+url+'"]').closest('li').addClass('current');
  347. }
  348. function lockscreen(){
  349. layer.prompt({
  350. title: '输入一个锁屏密码',
  351. formType: 1,
  352. btn: ['锁屏','取消'] //按钮
  353. }, function(pass){
  354. if(!pass){
  355. layer.msg('需要输入一个密码!');
  356. }else{
  357. $.post("<?php echo U('Login/lockScreen');?>",{pass:pass},function(data){
  358. layer.msg(data.info);
  359. layer.close();
  360. if(data.status){
  361. window.location.href = "<?php echo U('Login/lockScreen');?>";
  362. }
  363. },'json');
  364. }
  365. });
  366. }
  367. </script>
  368. <div style="display:none;">
  369. </div>
  370. </body>
  371. </html>
  372. <script type="text/javascript">
  373. function setTax(id,st) {
  374. var uid = parseInt(id);
  375. if (uid == "" || uid == null || uid <=0) {
  376. layer.alert('参数错误!');
  377. return false;
  378. }
  379. var st = st;
  380. layer.load(0, {shade: [0.5,'#8F8F8F']});
  381. $.post("<?php echo U('User/settax');?>", {
  382. id: uid,st:st
  383. }, function (data) {
  384. setTimeout("closetanchu()",2000);
  385. if (data.status == 1) {
  386. layer.msg(data.info, {
  387. icon: 1
  388. });
  389. setTimeout("shuaxin()",1000);
  390. } else {
  391. layer.msg(data.info, {
  392. icon: 2
  393. });
  394. }
  395. }, "json");
  396. }
  397. function setagent(id) {
  398. var uid = parseInt(id);
  399. if (uid == "" || uid == null || uid <=0) {
  400. layer.alert('参数错误!');
  401. return false;
  402. }
  403. layer.load(0, {shade: [0.5,'#8F8F8F']});
  404. $.post("<?php echo U('User/setagent');?>", {
  405. id: uid
  406. }, function (data) {
  407. setTimeout("closetanchu()",2000);
  408. if (data.status == 1) {
  409. layer.msg(data.info, {
  410. icon: 1
  411. });
  412. setTimeout("shuaxin()",1000);
  413. } else {
  414. layer.msg(data.info, {
  415. icon: 2
  416. });
  417. }
  418. }, "json");
  419. }
  420. </script>
  421. <script type="text/javascript">
  422. function closetanchu(){
  423. layer.closeAll('loading');
  424. }
  425. function shuaxin(){
  426. window.location.href=window.location.href;
  427. }
  428. </script>
  429. <script type="text/javascript" charset="utf-8">
  430. //导航高亮
  431. highlight_subnav("<?php echo U('User/index');?>");
  432. </script>