function Description()
 {
     $tmp = "";
     if ($this->criteria != " " && $this->criteria != "") {
         $tmp = $tmp . _("Product Type") . ' = (' . GetSourceType($this->criteria, $this->db) . ')' . $this->cs->GetClearCriteriaString($this->export_name) . '<BR>';
     }
     return $tmp;
 }
Exemplo n.º 2
0
}
$i = 0;
// The below is due to changes in the queries...
// We need to verify that it works all the time -- Kevin
$and = strpos($where, "WHERE") != 0 ? " AND " : " WHERE ";
$i = 0;
$report_data = array();
// data to fill report_data
if (is_array($_SESSION["server"]) && $_SESSION["server"][0] != "") {
    $_conn = $dbo->custom_connect($_SESSION["server"][0], $_SESSION["server"][2], $_SESSION["server"][3]);
} else {
    $_conn = $dbo->connect();
}
while (($myrow = $result->baseFetchRow()) && $i < $qs->GetDisplayRowCnt()) {
    $ctx = $myrow["ctx"];
    $product_type = GetSourceType($myrow["product_type"], $db);
    $total_occurances = $myrow["events"];
    $urlp = "base_qry_main.php?new=1&submit=" . gettext("Query DB") . "&sourcetype=" . urlencode($myrow["product_type"]);
    //$urlp = "base_stat_ptypes.php?sort=occur_d&sourcetype=".urlencode($myrow["product_type"]);
    qroPrintEntryHeader($i);
    qroPrintEntry('&nbsp;&nbsp<a href="' . $urlp . '">' . $product_type . '</a>', 'left', "", "nowrap");
    qroPrintEntry('&nbsp;<a href="' . $urlp . '">' . Util::number_format_locale($total_occurances, 0) . '</a>', "center", "", "");
    qroPrintEntry(Session::show_entities() && !empty($entities[$ctx]) ? $entities[$ctx] : (Session::show_entities() ? _("Unknown") : GetSensorName($ctx, $db)), "center", "", "");
    qroPrintEntry("&nbsp<A class='usig' id='sg" . $myrow["product_type"] . "-{$ctx}' HREF='{$urlp}'>-</a>", "left", "", "");
    qroPrintEntry("<div id='ts" . $myrow["product_type"] . "-{$ctx}'>-</div>", "center", "", "nowrap");
    qroPrintEntryFooter();
    $i++;
    $prev_time = null;
}
$result->baseFreeRows();
$dbo->close($_conn);
Exemplo n.º 3
0
 if (preg_match("/\\d+\\.\\d+\\.\\d+\\.\\d+/", $cell_data['SENSOR'])) {
     $cell_data['SENSOR'] = '<A alt="' . $cell_data['SENSOR'] . '" title="' . $cell_data['SENSOR'] . '" HREF="base_stat_ipaddr.php?ip=' . $cell_data['SENSOR'] . '&amp;netmask=32">' . Host::ip2hostname($_conn, $cell_data['SENSOR'], true) . '</A>';
 }
 $cell_align['SENSOR'] = "center";
 $cell_data['CID'] = $myrow["cid"];
 $cell_align['CID'] = "center";
 $cell_data['PLUGIN_ID'] = $myrow["plugin_id"];
 $cell_align['PLUGIN_ID'] = "center";
 $cell_data['PLUGIN_SID'] = $myrow["plugin_sid"];
 $cell_align['PLUGIN_SID'] = "center";
 if (in_array("PLUGIN_NAME", $_SESSION['views'][$_SESSION['current_cview']]['cols']) || in_array("PLUGIN_DESC", $_SESSION['views'][$_SESSION['current_cview']]['cols'])) {
     list($cell_data['PLUGIN_NAME'], $cell_data['PLUGIN_DESC']) = GetPluginNameDesc($myrow["plugin_id"], $db);
     $cell_align['PLUGIN_NAME'] = $cell_align['PLUGIN_DESC'] = "left";
 }
 if (in_array("PLUGIN_SOURCE_TYPE", $_SESSION['views'][$_SESSION['current_cview']]['cols'])) {
     $cell_data['PLUGIN_SOURCE_TYPE'] = $opensource ? _("Only in Profesional version") : GetSourceType($myrow["plugin_id"], $db);
     $cell_align['PLUGIN_SOURCE_TYPE'] = "center";
 }
 if (in_array("PLUGIN_SID_CATEGORY", $_SESSION['views'][$_SESSION['current_cview']]['cols']) || in_array("PLUGIN_SID_SUBCATEGORY", $_SESSION['views'][$_SESSION['current_cview']]['cols'])) {
     list($cell_data['PLUGIN_SID_CATEGORY'], $cell_data['PLUGIN_SID_SUBCATEGORY']) = $opensource ? array(_("Only in Profesional version"), _("Only in Profesional version")) : GetCategorySubCategory($myrow["plugin_id"], $myrow["plugin_sid"], $db);
     $cell_align['PLUGIN_SID_CATEGORY'] = $cell_align['PLUGIN_SID_SUBCATEGORY'] = "center";
 }
 //
 $current_sip32 = $myrow["ip_src"];
 $current_sip = baseLong2IP($current_sip32);
 $current_dip32 = $myrow["ip_dst"];
 $current_dip = baseLong2IP($current_dip32);
 $current_proto = $myrow["ip_proto"];
 $current_sport = $current_dport = "";
 if ($myrow["layer4_sport"] != 0) {
     $current_sport = ":" . $myrow["layer4_sport"];