|
|
@@ -12,10 +12,17 @@ class Iplimit extends Base
|
|
|
$offset = (($param['pageNumber'] - 1) * $limit);
|
|
|
$where['object'] = $param['type'];
|
|
|
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();
|
|
|
}
|
|
|
|
|
|
$result = db('iplimit')->where($where)->limit($offset, $limit)->select();
|
|
|
+ if(!empty($res)){
|
|
|
+ for($i=0;$i<count($res);$i++){
|
|
|
+ $result[] = $res[$i];
|
|
|
+ }
|
|
|
+ }
|
|
|
$admins = db('admins')->select();
|
|
|
foreach ($result as $key => $vo) {
|
|
|
|