$login_text = _("All"); } if (preg_match("/#/", $host_id_ip)) { list($host_id, $host_ip) = explode("#", $host_id_ip); ossim_valid($host_ip, OSS_IP_ADDR, 'illegal:' . _("Host IP")); ossim_valid($host_id, OSS_HEX, 'illegal:' . _("Host ID")); } else { // only IP ossim_valid($host_id_ip, OSS_NULLABLE, OSS_IP_ADDR, 'illegal:' . _("Host IP")); } if (ossim_error()) { die(ossim_error()); } $results = array(); //Check if it is allowed $allowed = Vulnerabilities::is_allowed_credential($dbconn, $name, $login); if ($allowed) { //Autocomplete data $_hosts_data = Asset_host::get_basic_list($dbconn); $_hosts = $_hosts_data[1]; foreach ($_hosts as $_host_id => $_host_detail) { // get host IPs $hIPs = array(); $hIPs = explode(",", trim($_host_detail['ips'])); foreach ($hIPs as $hIP) { $hIP = trim($hIP); $hosts .= '{ txt:"' . $_host_detail['name'] . ' (' . $hIP . ')", id: "' . $_host_id . '#' . $hIP . '" },'; } } } //Check credentials