|
|
@@ -18,10 +18,10 @@
|
|
|
<input style="display:none;" type="text" value="2" id="type">
|
|
|
<div style="display: flex;">
|
|
|
<div class="ibox-title" style="width: 100px; cursor:pointer;" id="current1" onclick="current(2)">
|
|
|
- <h5>客服</h5>
|
|
|
+ <h5>客服白名单</h5>
|
|
|
</div>
|
|
|
<div class="ibox-title" id="current2" style="width: 100px; cursor:pointer; background: #eee" onclick="current(1)">
|
|
|
- <h5>用户</h5>
|
|
|
+ <h5>用户黑名单</h5>
|
|
|
</div>
|
|
|
<div class="ibox-title" style="width: calc(100% - 200px); background: #eee;">
|
|
|
</div>
|
|
|
@@ -32,12 +32,22 @@
|
|
|
</button>
|
|
|
</a>
|
|
|
|
|
|
+
|
|
|
+ <form action="/admin/sensitivec/disjunctor" enctype="multipart/form-data" method="post" role="form" class="form-inline pull-right">
|
|
|
+ <div class="content clearfix m-b">
|
|
|
+ <div class="form-group" style="margin-left: 20px">
|
|
|
+ <a href="javascript:disjunctor()" class="btn" style="margin-top:5px;" ><input type="button" id="disjunctor" class="btn {if($settings['ip_disjunctor']=='on')}btn-primary{else}btn-danger{/if} btn-sm" value="{$settings['disjunctor']}"></a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+
|
|
|
+
|
|
|
<!--搜索框开始-->
|
|
|
<form id='commentForm' role="form" method="post" class="form-inline pull-right">
|
|
|
<div class="content clearfix m-b" style="margin-top: 5px;">
|
|
|
<div class="form-group">
|
|
|
- <label>IP:</label>
|
|
|
- <input type="text" class="form-control" id="content" name="content" value="" placeholder="请输入IP">
|
|
|
+ <label>IP地址:</label>
|
|
|
+ <input type="text" class="form-control" id="content" name="content" value="" placeholder="请输入IP地址">
|
|
|
<input style="display: none">
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
@@ -171,6 +181,43 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+ function disjunctor(){
|
|
|
+ if($('#disjunctor').val() == '开启IP限制'){
|
|
|
+ var disjunctor = 'on';
|
|
|
+ }else{
|
|
|
+ var disjunctor = 'off';
|
|
|
+ }
|
|
|
+ layer.confirm('确认'+$('#disjunctor').val()+'?', {icon: 3, title:'提示'}, function(index){
|
|
|
+ //do something
|
|
|
+ $.getJSON("{:url('iplimit/disjunctor')}", {'disjunctor':disjunctor}, function(res){
|
|
|
+ //console.log(disjunctor);
|
|
|
+ console.log(res);
|
|
|
+ if(1 == res.code){
|
|
|
+ layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function(){
|
|
|
+ initTable();
|
|
|
+ if($('#disjunctor').val() == '开启IP限制'){
|
|
|
+ $('#disjunctor').val('关闭IP限制');
|
|
|
+ $("#disjunctor").addClass("btn-primary");
|
|
|
+ $("#disjunctor").removeClass("btn-danger");
|
|
|
+ }else{
|
|
|
+ $('#disjunctor').val('开启IP限制');
|
|
|
+ $("#disjunctor").addClass("btn-danger");
|
|
|
+ $("#disjunctor").removeClass("btn-primary");
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ }else if(111 == res.code){
|
|
|
+ window.location.reload();
|
|
|
+ }else{
|
|
|
+ layer.alert(res.msg, {title: '友情提示', icon: 2});
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ layer.close(index);
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|