コード例 #1
0
ファイル: net_form.php プロジェクト: AntBean/alienvault-ossim
    $net->load_from_db($conn);
    $is_new_net = FALSE;
    $can_i_modify_ips = Asset_net::can_i_modify_ips($conn, $id);
} else {
    //New net
    $id = Util::uuid();
    $net = new Asset_net($id);
    $can_i_modify_ips = TRUE;
}
//Getting net data
$id = $net->get_id();
$name = $net->get_name();
//Net Sensors
list($all_sensors, $s_total) = Av_sensor::get_list($conn, '', FALSE, TRUE);
//CTX
$ctx = $net->get_ctx();
$ctx_name = empty($ctx) ? _('None') : Session::get_entity_name($conn, $ctx);
$is_ext_ctx = FALSE;
$context_type = 'local';
$ext_ctxs = Session::get_external_ctxs($conn);
if (!empty($ext_ctxs[$ctx])) {
    $is_ext_ctx = TRUE;
    $context_type = 'remote';
}
$descr = $net->get_descr();
$icon = $net->get_html_icon();
$external = $net->get_external();
$asset_value = $net->get_asset_value();
$threshold_a = $net->get_threshold_a();
$threshold_c = $net->get_threshold_c();
$owner = $net->get_owner();