人人商城

ip-list.html 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {template 'common/header'}
  2. <!--ip白名单-->
  3. <div class="iplist" ng-controller="ipWhiteListCtrl" ng-cloak>
  4. <div class="clearfix we7-margin-bottom">
  5. <form action="{php url('system/ipwhitelist')}" method="post" class="form-inline pull-left">
  6. <div class="input-group" style="width: 400px;">
  7. <input type="text" placeholder="输入要搜索的ip地址" class="form-control" name="keyword" value="{$keyword}"/>
  8. <span class="input-group-btn">
  9. <button class="btn btn-default">
  10. <i class="wi wi-search"></i>
  11. </button>
  12. </span>
  13. </div>
  14. </form>
  15. <div class="pull-right">
  16. <a href="#" class="btn btn-primary we7-padding-horizontal" data-toggle="modal" data-target="#myModalIp">添加白名单</a>
  17. </div>
  18. </div>
  19. <table class="table we7-table table-hover vertical-middle" ng-cloak>
  20. <col />
  21. <col />
  22. <col />
  23. <tr>
  24. <th>IP地址</th>
  25. <th>是否生效</th>
  26. <th class="text-right">操作</th>
  27. </tr>
  28. <tr ng-repeat="list in lists">
  29. <td>
  30. {{list.ip}}
  31. <!--<span class="color-gray we7-margin-left">中国 山西 太原 联通</span>-->
  32. </td>
  33. <td>
  34. <div class="we7-form">
  35. <input class='we7-toggle' type="checkbox" name='check-3' checked='checked' ng-if="list.status==1" ng-click="changeStatus(list.ip)"/>
  36. <input class='we7-toggle' type="checkbox" name='check-3' ng-if="list.status==0" ng-click="changeStatus(list.ip)"/>
  37. </div>
  38. </td>
  39. <td>
  40. <div class="link-group">
  41. <a href="{{links.delete_link_ip}}ip={{list.ip}}" class="del">删除</a>
  42. </div>
  43. </td>
  44. </tr>
  45. </table>
  46. <div class="modal fade" id="myModalIp" tabindex="-1" role="dialog" aria-labelledby="myModalLabel6">
  47. <div class="modal-dialog">
  48. <div class="modal-content">
  49. <div class="modal-header">
  50. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  51. <h4 class="modal-title" id="myModalLabel6">添加白名单</h4>
  52. </div>
  53. <div class="modal-body we7-padding">
  54. <div class="we7-margin-bottom-sm">请输入有效IP地址 <span class="color-gray">(如: 183.184.176.181)</span></div>
  55. <div class="panel panel-default">
  56. <div class="panel-body">
  57. <textarea ng-model="ips" name="ips" id="addips" rows="5" class="form-control" style="border: none; outline:none; box-shadow: none; resize:none; "></textarea>
  58. </div>
  59. <div class="panel-footer text-right color-gray">
  60. 按"回车"添加多个
  61. </div>
  62. </div>
  63. </div>
  64. <div class="modal-footer">
  65. <button type="button" class="btn btn-primary" ng-click="saveIp()">确定</button>
  66. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <!--end ip白名单-->
  73. <script type="text/javascript">
  74. angular.module('systemApp').value('config', {
  75. 'lists': {php echo !empty($lists) ? json_encode($lists) : 'null'},
  76. 'links' : {
  77. 'add_link_ips': "{php echo url('system/ipwhitelist/add')}",
  78. 'change_status': "{php echo url('system/ipwhitelist/change_status')}",
  79. 'delete_link_ip': "{php echo url('system/ipwhitelist/delete')}",
  80. },
  81. });
  82. angular.bootstrap($('.iplist'), ['systemApp']);
  83. </script>
  84. {template 'common/footer'}