=".$subnet_range['start']." and A.ip_int<=".$subnet_range['stop']; }
}
$d_filter='';
if ($f_building_id > 0) { $d_filter .= ' and D.building_id=' . $f_building_id; }
if ($f_devtype_id > 0) { $d_filter .= ' and D.device_type=' . $f_devtype_id; } else { $d_filter .= ' and D.device_type>2'; }
$ip_list_filter = $ou_filter.$subnet_filter;
unset($_POST);
print_device_submenu($page_url);
?>
1 '; } else {
if (!empty($f_vendor_select) and $f_vendor_select>=1) {
$u_filter = " AND V.id=".$f_vendor_select." ";
}
}
$countSQL="SELECT Count(*) FROM User_auth A, User_list L, devices D, device_models M, vendors V
WHERE D.user_id=L.id AND A.ip = D.ip AND D.device_model_id=M.id AND M.vendor_id=V.id AND A.deleted =0
$u_filter $ip_list_filter $d_filter";
$res = mysqli_query($db_link, $countSQL);
$count_records = mysqli_fetch_array($res);
$total=ceil($count_records[0]/$displayed);
if ($page>$total) { $page=$total; }
if ($page<1) { $page=1; }
$start = ($page * $displayed) - $displayed;
print_navigation($page_url,$page,$displayed,$count_records[0],$total);
?>