Explorar o código

added a search for a part of the mac-address

root %!s(int64=2) %!d(string=hai) anos
pai
achega
1d82d7af18
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      html/admin/iplist/index.php

+ 2 - 2
html/admin/iplist/index.php

@@ -49,7 +49,7 @@ if ($ip_type>0) {
 $ip_where = '';
 if (!empty($f_ip)) {
     if (checkValidIp($f_ip)) { $ip_where = " and ip_int=inet_aton('" . $f_ip . "') "; }
-    if (checkValidMac($f_ip)) { $ip_where = " and mac='" . mac_dotted($f_ip) . "'  "; }
+        else { $ip_where = " and mac like '" . mac_dotted($f_ip) . "%'  "; }
     $ip_list_filter = $ip_where;
     } else {
     $ip_list_filter = $ou_filter.$cidr_filter.$enabled_filter.$ip_list_type_filter;
@@ -70,7 +70,7 @@ print_ip_submenu($page_url);
         <b><?php print WEB_network_subnet; ?> - </b><?php print_subnet_select_office_splitted($db_link, 'cidr', $rcidr); ?>
         <b><?php echo WEB_ips_show_by_state; ?> - </b><?php print_enabled_select('enabled', $enabled); ?>
         <b><?php echo WEB_ips_show_by_ip_type; ?> - </b><?php print_ip_type_select('ip_type', $ip_type); ?>
-        <?php echo WEB_ips_search_host; ?>:&nbsp<input type="text" name="ip" value="<?php echo $f_ip; ?>" pattern="^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}|([0-9a-fA-F]{4}[\\.-][0-9a-fA-F]{4}[\\.-][0-9a-fA-F]{4})|[0-9A-Fa-f]{12})$"/>
+        <?php echo WEB_ips_search_host; ?>:&nbsp<input type="text" name="ip" value="<?php echo $f_ip; ?>"/>
         <?php print WEB_rows_at_page."&nbsp"; print_row_at_pages('rows',$displayed); ?>
         <input id="btn_filter" name="btn_filter" type="submit" value="<?php echo WEB_btn_show; ?>">
         </td>