|
|
@@ -14,7 +14,7 @@ class Iplimit extends Base
|
|
|
if (strlen($param['searchText'])) {
|
|
|
$ip = bindec(decbin(ip2long($param['searchText'])));
|
|
|
$where['ip'] = ['like', '%' . $param['searchText'] . '%'];
|
|
|
- $res = db('iplimit')->where('start_ip','<=',$ip)->where('end_ip','>=',$ip)->where('object',$param['type'])->limit($offset, $limit)->select();
|
|
|
+ $res = db('iplimit')->where('start_ip','<',$ip)->where('end_ip','>',$ip)->where('object',$param['type'])->limit($offset, $limit)->select();
|
|
|
}
|
|
|
|
|
|
$result = db('iplimit')->where($where)->limit($offset, $limit)->select();
|
|
|
@@ -23,6 +23,8 @@ class Iplimit extends Base
|
|
|
$result[] = $res[$i];
|
|
|
}
|
|
|
}
|
|
|
+// array_unique($result, SORT_REGULAR);
|
|
|
+
|
|
|
$admins = db('admins')->select();
|
|
|
foreach ($result as $key => $vo) {
|
|
|
|
|
|
@@ -41,7 +43,8 @@ class Iplimit extends Base
|
|
|
}
|
|
|
|
|
|
// 总数据.
|
|
|
- $return['total'] = db('iplimit')->where($where)->count(); //总数据
|
|
|
+ $return['total'] = count($result); //总数据
|
|
|
+// $return['total'] = db('iplimit')->where($where)->count(); //总数据
|
|
|
$return['rows'] = $result;
|
|
|
|
|
|
return json($return);
|