index.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <{include file='../public/admin_header.html'}>
  2. <{include file='../public/admin_navi.html'}>
  3. <!-- Right side column. Contains the navbar and content of the page -->
  4. <aside class="right-side">
  5. <!-- Content Header (Page header) -->
  6. <section class="content-header">
  7. <h1>
  8. 短信客户分组列表
  9. <small>Control panel</small>
  10. </h1>
  11. <ol class="breadcrumb">
  12. <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
  13. <li class="active">Blank page</li>
  14. </ol>
  15. </section>
  16. <!-- Main content -->
  17. <section class="content">
  18. <{if $info}>
  19. <div class="alert alert-success"><{$info}></div>
  20. <{/if}>
  21. <{if $error}>
  22. <div class="alert alert-danger alert-dismissable"><{$error}></div>
  23. <{/if}>
  24. <div id='main' class="form-actions">
  25. <a href="/?a=user_smsgroup_admin&m=add" style="font-weight:bold;text-decoration:underline;">添加客户分组</a>
  26. <form id="batch_delete" method="post" action="/?a=user_smsgroup_admin&m=batch_delete">
  27. <input class="btn btn-warning" onclick="toSubmit();" value="批量删除" style="float:right;width:200px;margin-bottom:20px;" />
  28. <table class="table table-bordered" style="margin-top:15px;clear:both;">
  29. <tr>
  30. <th style="width:80px;"><input type="checkbox" id="check-all" />&nbsp;&nbsp;全选</th>
  31. <th>ID</th>
  32. <th >客户分组名称</th>
  33. <th >数量</th>
  34. <th >排序</th>
  35. <th >添加时间</th>
  36. <th>操作</th>
  37. </tr>
  38. <{foreach from=$list item=item}>
  39. <tr>
  40. <td>
  41. <input type="checkbox" name="id_array[]" value="<{$item.id}>" />
  42. </td>
  43. <td><{$item.id}></td>
  44. <td><{$item.name}></td>
  45. <td><{$item.count}></td>
  46. <td><{$item.position}></td>
  47. <td><{$item.created_at}></td>
  48. <td>
  49. <a href="/?a=user_smsgroup_admin&m=update&id=<{$item.id}>">编辑</a>
  50. <a onclick="to_delete('<{$item.name}>','<{$item.id}>');" style="margin-left:50px;text-align:right;cursor:pointer;" >删除</a>
  51. </td>
  52. </tr>
  53. <{/foreach}>
  54. </table>
  55. </form>
  56. </div>
  57. <script src="static/AdminLTE/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js" type="text/javascript"></script>
  58. <script src="static/AdminLTE/js/plugins/iCheck/icheck.min.js" type="text/javascript"></script>
  59. <link href="static/AdminLTE/css/iCheck/minimal/blue.css" rel="stylesheet" type="text/css" />
  60. <link href="static/AdminLTE/css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
  61. <script src="static/AdminLTE/js/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
  62. <script type="text/javascript">
  63. $(function() {
  64. "use strict";
  65. //iCheck for checkbox and radio inputs
  66. $('input[type="checkbox"]').iCheck({
  67. checkboxClass: 'icheckbox_minimal-blue',
  68. radioClass: 'iradio_minimal-blue'
  69. });
  70. //When unchecking the checkbox
  71. $("#check-all").on('ifUnchecked', function(event) {
  72. //Uncheck all checkboxes
  73. $("input[type='checkbox']", ".table-bordered").iCheck("uncheck");
  74. });
  75. //When checking the checkbox
  76. $("#check-all").on('ifChecked', function(event) {
  77. //Check all checkboxes
  78. $("input[type='checkbox']", ".table-bordered").iCheck("check");
  79. });
  80. });
  81. </script>
  82. <script>
  83. function toSubmit(){
  84. var n = $("input:checked").length;
  85. if (n<=1) {
  86. alert("请选择要批量删除的黑名单吗");
  87. }else{
  88. if(confirm("确定要删除吗?")){
  89. $('#batch_delete').submit();
  90. }
  91. }
  92. }
  93. </script>
  94. </section><!-- /.content -->
  95. </aside><!-- /.right-side -->
  96. </div><!-- ./wrapper -->
  97. <script>
  98. $('#treeview9').addClass('active');
  99. $(".user_group_left").addClass('active');
  100. function to_delete(name,id){
  101. if(confirm("确定删除"+name)){
  102. window.location.href="/?a=user_smsgroup_admin&m=delete&id="+id+"&group_name="+name;
  103. }
  104. }
  105. </script>
  106. </body>
  107. </html>