Ejemplo n.º 1
0
                $net->set_ips($ips_string);
            }
            $net->set_descr($descr);
            if ($icon != '') {
                $net->set_icon($icon);
            }
            $net->set_external($external);
            $net->set_asset_value($asset_value);
            $net->set_threshold_c($threshold_c);
            $net->set_threshold_a($threshold_a);
            $net->set_owner($owner);
            $net->set_sensors($sensors);
            $net->save_in_db($conn);
            Asset_net_scan::delete_plugin_from_db($conn, $id, 2007);
            if (!empty($nagios)) {
                Asset_net_scan::save_plugin_in_db($conn, $id, 2007);
            }
            $data['status'] = 'OK';
            $data['data'] = _('Net saved successfully');
            $db->close();
        } else {
            $data['status'] = 'error';
            $data['data'] = array('no_create_asset' => _("Sorry, you don't have permissions to create assets"));
        }
    } catch (Exception $e) {
        $data['status'] = 'error';
        $data['data'] = array('php_exception' => $e->getMessage());
    }
}
if ($data['status'] == 'error') {
    $txt_error = '<div>' . _('We Found the following errors') . ":</div>\n\t\t\t\t\t  <div style='padding: 10px;'>" . implode('<br/>', $data['data']) . '</div>';
Ejemplo n.º 2
0
    $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();
//Net Ips
$ips = $net->get_ips();
$net_sensors = $net->get_sensors();
$sensors = $net_sensors->get_sensors();
//Net Scan
$is_nagios_enabled = Asset_net_scan::is_plugin_in_net($conn, $id, 2007);
//Closing database connection
$db->close();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php 
echo _('OSSIM Framework');
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta http-equiv="Pragma" content="no-cache"/>