Пример #1
0
     if (!empty($month)) {
         $end_range .= Util::get_month_name($month, 'short') . ", ";
     }
     $hour = $policy_time->get_hour_end();
     $min = $policy_time->get_minute_end();
     if (isset($hour) && isset($min)) {
         $end_range .= $hour . "h : " . $min . "min";
     }
     $xml .= "<cell><![CDATA[" . $tzone . "<br>" . $begin_range . "<br>" . $end_range . "]]></cell>";
 } else {
     $xml .= "<cell><![CDATA[null]]></cell>";
 }
 $targets = "";
 if ($target_list = $policy->get_targets($conn)) {
     foreach ($target_list as $target) {
         if (!check_any($target->get_target_id())) {
             $targets .= ($targets == "" ? "" : "<br/>") . Server::get_name_by_id($conn, $target->get_target_id());
         }
     }
 }
 if (empty($targets)) {
     $targets = "<font color='#AAAAAA'><b>ANY</b></font>";
 }
 $xml .= "<cell><![CDATA[" . $targets . "]]></cell>";
 $role_list = $policy->get_role($conn);
 if (count($role_list) < 1) {
     $xml .= "<cell></cell>";
     $xml .= "<cell><![CDATA[" . ($policy->get_priority() == -1 ? "-" : $policy->get_priority()) . "]]></cell>";
     $xml .= "<cell></cell>";
     $xml .= "<cell></cell>";
     $xml .= "<cell></cell>";
Пример #2
0
    if ($minsrc < 1) {
        die(ossim_error(_("At least one Source IP, Host group,Net or Net group required")));
    }
}
/* DESTS */
$dest_ips = array();
$dest_host_groups = array();
$dest_nets = array();
$dest_net_groups = array();
$dests = POST('dests');
if ($is_engine) {
    $dest_ips[] = "any";
} else {
    $mindst = 0;
    foreach ($dests as $dest) {
        if (check_any($dest)) {
            $dest_ips[] = "any";
            $mindst++;
        } else {
            $src = explode("_", trim($dest), 2);
            ossim_valid($src[1], OSS_HEX, 'ANY', 'illegal:' . _($src[1]));
            if (ossim_error()) {
                die(ossim_error());
            }
            $src[0] = strtoupper($src[0]);
            if ($src[1] == "") {
                continue;
            }
            switch ($src[0]) {
                case "HOST":
                    $dest_ips[] = $src[1];
Пример #3
0
 if (!$is_engine) {
     //TAXONOMY
     if ($taxonomy_list = $policy->get_taxonomy_conditions($conn)) {
         foreach ($taxonomy_list as $tax) {
             $tax_id = $tax->get_product_type_id() . "@" . $tax->get_category_id() . "@" . $tax->get_subcategory_id();
             $tax_val = $filter['ptype'][$tax->get_product_type_id()] . " | " . $filter['cat'][$tax->get_category_id()] . " | " . $filter['subcat'][$tax->get_subcategory_id()];
             $tax_filters[$tax_id] = $tax_val;
             $flag_events = false;
         }
     }
 }
 //SENSOR
 $sensor_exist = $policy->exist_sensors($conn);
 if ($sensor_list = $policy->get_sensors($conn)) {
     foreach ($sensor_list as $sensor) {
         if (!check_any($sensor->get_sensor_id())) {
             if ($sensor_exist[$sensor->get_sensor_id()] != 'false') {
                 $sensors['sensor_' . $sensor->get_sensor_id()] = Av_sensor::get_name_by_id($conn, $sensor->get_sensor_id());
                 $flag_sensors = false;
             }
         } else {
             $sensors[$sensor->get_sensor_id()] = _('ANY');
         }
     }
 } else {
     $flag_sensors = FALSE;
 }
 //Time Filters
 if ($policy_time = $policy->get_time($conn)) {
     $time_begin[0] = $policy_time->get_month_start();
     $time_begin[1] = $policy_time->get_month_day_start();