当前位置: 首页>>代码示例>>PHP>>正文


PHP Host::get_homelan_icon方法代码示例

本文整理汇总了PHP中Host::get_homelan_icon方法的典型用法代码示例。如果您正苦于以下问题:PHP Host::get_homelan_icon方法的具体用法?PHP Host::get_homelan_icon怎么用?PHP Host::get_homelan_icon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Host的用法示例。


在下文中一共展示了Host::get_homelan_icon方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: qroPrintEntryHeader

 }
 qroPrintEntryHeader($i);
 /* Generating checkbox value -- nikns */
 $addr_type == SOURCE_IP ? $src_ip = $myrow[0] : ($dst_ip = $myrow[0]);
 $tmp_rowid = $src_ip . "_" . $dst_ip;
 echo '    <TD><INPUT TYPE="checkbox" NAME="action_chk_lst[' . $i . ']" VALUE="' . $tmp_rowid . '">';
 echo '    <INPUT TYPE="hidden" NAME="action_lst[' . $i . ']" VALUE="' . $tmp_rowid . '"></TD>';
 /* Check for a NULL IP which indicates an event (e.g. portscan)
  * which has no IP
  */
 if ($no_ip) {
     qroPrintEntry('<A HREF="' . $BASE_urlpath . '/help/base_app_faq.php#1">' . gettext("unknown") . '</A>');
 } else {
     $country = strtolower(geoip_country_code_by_addr($gi, $currentIP));
     $country_name = geoip_country_name_by_addr($gi, $currentIP);
     $homelan = ($match_cidr = Net::is_ip_in_cache_cidr($_conn, $currentIP)) || in_array($currentIP, $hosts_ips) ? " <a href='javascript:;' class='scriptinfo' style='text-decoration:none' ip='{$currentIP}'><img src=\"" . Host::get_homelan_icon($currentIP, $icons, $match_cidr, $_conn) . "\" border=0></a>" : "";
     if ($country) {
         $country_img = " <img src=\"/ossim/pixmaps/flags/" . $country . ".png\" title=\"" . $country_name . "\">";
         $slnk = $current_url . "/pixmaps/flags/" . $country . ".png";
     } else {
         $country_img = "";
         $slnk = $homelan != "" ? $current_url . "/forensics/images/homelan.png" : "";
     }
     $sip_aux = $sensors[$currentIP] != "" ? $sensors[$currentIP] : ($hosts[$currentIP] != "" ? $hosts[$currentIP] : $currentIP);
     $div = '<div id="' . $currentIP . ';' . $ip_aux . '" class="HostReportMenu">';
     $bdiv = '</div>';
     qroPrintEntry($div . BuildAddressLink($currentIP, 32) . $currentIP . '</A>&nbsp;' . $country_img . $homelan . $bdiv, 'center', '', 'nowrap');
 }
 if ($resolve_IP == 1) {
     qroPrintEntry('&nbsp;&nbsp;' . baseGetHostByAddr($currentIP, $db, $dns_cache_lifetime) . '&nbsp;&nbsp;');
 }
开发者ID:jhbsz,项目名称:ossimTest,代码行数:31,代码来源:base_stat_uaddr.php

示例2: host_row

function host_row($host, $conn, $criterias, $has_criterias, $networks, $hosts_ips, $icons)
{
    $ip = $host->get_ip();
    $gi = geoip_open("/usr/share/geoip/GeoIP.dat", GEOIP_STANDARD);
    $country = strtolower(geoip_country_code_by_addr($gi, $ip));
    $country_name = geoip_country_name_by_addr($gi, $ip);
    geoip_close($gi);
    if ($country) {
        $country_img = " <img src=\"../pixmaps/flags/" . $country . ".png\" alt=\"{$country_name}\" title=\"{$country_name}\">";
    } else {
        $country_img = "";
    }
    $homelan = ($match_cidr = Net::is_ip_in_cache_cidr($conn, $ip, $networks)) || in_array($ip, $hosts_ips) ? " <a href=\"javascript:;\" class=\"scriptinfo\" style=\"text-decoration:none\" ip=\"" . $ip . "\"><img src=\"" . Host::get_homelan_icon($ip, $icons, $match_cidr, $conn) . "\" border=0></a>" : "";
    $os = Host_os::get_os_pixmap($conn, $ip);
    $row = '
	<tr>
		<td style="padding-bottom:10px" class="nobborder">
			<table class="noborder" style="background-color:white">
				<tr>
					<td class="nobborder"><a href="../report/host_report.php?host=' . $ip . '" id="' . $ip . ';' . $host->get_hostname() . '" class="HostReportMenu" style="color:#17457c;text-decoration:underline;font-size:15px;text-align:left"><b>' . $ip . '</b> <font style="font-size:12px">HostName: <b>' . $host->get_hostname() . '</b>' . $country_img . $homelan . ' ' . $os . '</font></a></td>
				</tr>
				<tr>
					<td class="nobborder">
						<table class="noborder" style="background-color:white" height="100%"><tr>';
    foreach ($criterias as $type => $subtypes_arr) {
        $row .= '<td class="nobborder" valign="top">' . Util::print_gadget($type, "white", criteria_row($conn, $ip, $type, $subtypes_arr, $has_criterias)) . '</td>';
    }
    $row .= '
						</tr></table>
					</td>
				</tr>
			</table>
		</td>
	</tr>';
    echo str_replace("\n", "", str_replace("\r", "", $row));
}
开发者ID:jhbsz,项目名称:ossimTest,代码行数:36,代码来源:functions.php

示例3: DisplayProcessing


//.........这里部分代码省略.........
                echo "<td class='center nobborder'>Geo Tools: <a href='' onclick='window.open(\"../kml/TourConfig.php?type=ip_dst&ip=&flows=1\",\"Flows destinations - Goggle Earth API\",\"width=1024,height=700,scrollbars=NO,toolbar=1\");return false'><img align='absmiddle' src='../pixmaps/google_earth_icon.png' border='0'></a>&nbsp;&nbsp;<a href='' onclick='window.open(\"../kml/IPGoogleMap.php?type=ip_dst&ip=&flows=1\",\"Flows destinations - Goggle Maps API\",\"width=1024,height=700,scrollbars=NO,toolbar=1\");return false'><img align='absmiddle' src='../pixmaps/google_maps_icon.png' border='0'></a></td>";
                echo "</tr>";
            }
            echo $list ? "<tr>\n                    <th>" . _("Date flow start") . "</th>\n                    <th>" . _("Duration") . "</th>\n                    <th>" . _("Proto") . "</th>\n                    <th>" . _("Src IP Addr:Port") . "</th>\n                    <th>" . _("Dst IP Addr:Port") . "</th>\n                    <th>" . _("Flags") . "</th>\n                    <th>" . _("Tos") . "</th>\n                    <th>" . _("Packets") . "</th>\n                    <th>" . _("Bytes") . "</th>\n                    <th>" . _("pps") . "</th>\n                    <th>" . _("bps") . "</th>\n                    <th>" . _("Bpp") . "</th>\n                    <th>" . _("Flows") . "</th>\n                \t" . ($solera ? "<th></th>" : "") . "\n                    </tr>" : "<tr>\n                    <th>" . _("Date flow seen") . "</th>\n                    <th>" . _("Duration") . "</th>\n                    <th>" . _("Proto") . "</th>\n                    <th>" . $titcol . "</th>\n                    <th>" . _("Flows") . "</th>\n                    <th>" . _("Packets") . "</th>\n                    <th>" . _("Bytes") . "</th>\n                    <th>" . _("pps") . "</th>\n                    <th>" . _("bps") . "</th>\n                    <th>" . _("bpp") . "</th>\n                \t" . ($solera ? "<th></th>" : "") . "\n                    </tr>";
            $status = $errors = array();
            //print_r($cmd_out['nfdump']);
            foreach ($cmd_out['nfdump'] as $k => $line) {
                echo "<tr>\n";
                #capture status
                if (preg_match("/^(Summary|Time window|Total flows processed|Sys)\\:/", $line, $found)) {
                    $status[$found[1]] = str_replace($found[1] . ":", "", $line);
                }
                # capture errors
                if (preg_match("/ error /i", $line, $found)) {
                    $errors[] = $line;
                }
                # print results
                $line = preg_replace("/\\(\\s(\\d)/", "(\\1", $line);
                // Patch for ( 0.3)
                $line = preg_replace("/(\\d)\\s([KMG])/", "\\1\\2", $line);
                // Patch for 1.2 M(99.6)
                $start = $end = $proto = "";
                $ips = $ports = array();
                if (preg_match($regex, preg_replace('/\\s*/', ' ', $line), $found)) {
                    foreach ($found as $ki => $field) {
                        if ($ki > 0) {
                            $wrap = $ki == 1 ? "nowrap" : "";
                            $field = preg_replace("/(\\:\\d+)\\.0\$/", "\\1", $field);
                            if (preg_match("/(\\d+\\.\\d+\\.\\d+\\.\\d+)(.*)/", $field, $fnd)) {
                                # match ip (resolve and geolocalize)
                                $ip = $fnd[1];
                                $port = $fnd[2];
                                $name = $sensors[$ip] != "" ? $sensors[$ip] : ($hosts[$ip] != "" ? $hosts[$ip] : $ip);
                                $homelan = ($match_cidr = Net::is_ip_in_cache_cidr($conn, $ip)) || in_array($ip, $hosts_ips) ? " <a href='javascript:;' class='scriptinfo' style='text-decoration:none' ip='{$ip}'><img src=\"" . Host::get_homelan_icon($ip, $icons, $match_cidr, $conn) . "\" border=0></a>" : "";
                                $country = strtolower(geoip_country_code_by_addr($gi, $ip));
                                $country_name = geoip_country_name_by_addr($gi, $ip);
                                if ($country) {
                                    $country_img = " <img src=\"/ossim/pixmaps/flags/" . $country . ".png\" alt=\"" . _($country_name) . "\" title=\"" . _($country_name) . "\">";
                                } else {
                                    $country_img = "";
                                }
                                $field = "<a href='javascript:;' class='HostReportMenu' id='{$ip};{$name}'>{$name}</a>{$port} {$country_img} {$homelan}";
                                $wrap = "nowrap";
                                $ips[] = $ip;
                                if ($geotools) {
                                    if ($ki == 4) {
                                        $geoips['ip_src'][$ip]++;
                                    } elseif ($ki == 5) {
                                        $geoips['ip_dst'][$ip]++;
                                    }
                                }
                                $ports[] = str_replace(":", "", $port);
                            }
                            if (preg_match("/(\\d+-\\d+-\\d+ \\d+:\\d+:\\d+)(.*)/", $field, $fnd)) {
                                # match date
                                $start = $end = $fnd[1];
                            }
                            if (preg_match("/(TCP|UDP|ICMP|RAW)/", $field, $fnd)) {
                                # match date
                                $proto = strtolower($fnd[1]);
                            }
                            print "<td {$wrap}>{$field}</td>";
                        }
                    }
                    // solera deepsee integration
                    if ($solera) {
开发者ID:jhbsz,项目名称:ossimTest,代码行数:67,代码来源:details.php


注:本文中的Host::get_homelan_icon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。