if (!empty($nagios)) { if (Asset_group_scan::is_plugin_in_group($conn, $id, 2007)) { Asset_group_scan::delete_plugin_from_db($conn, $id, 2007); } Asset_group_scan::save_plugin_in_db($conn, $id, 2007); foreach ($hosts as $host_id) { if (!Asset_host_scan::is_plugin_in_host($conn, $host_id, 2007)) { Asset_host_scan::save_plugin_in_db($conn, $host_id, 2007); } } } else { if (Asset_group_scan::is_plugin_in_group($conn, $id, 2007)) { Asset_group_scan::delete_plugin_from_db($conn, $id, 2007); } foreach ($hosts as $host_id) { if (Asset_host_scan::is_plugin_in_host($conn, $host_id, 2007)) { Asset_host_scan::delete_plugin_from_db($conn, $host_id, 2007); } } } $data['status'] = 'OK'; $data['data'] = _('Asset group saved successfully'); $db->close(); } 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>'; $config_nt = array('content' => $txt_error, 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'width: 80%; margin: 20px auto; text-align: left;');
$longitude = $location['lon']; $zoom = $location['zoom']; $asset_value = $host->get_asset_value(); $threshold_a = $host->get_threshold_a(); $threshold_c = $host->get_threshold_c(); //Host Ips $host_ips = $host->get_ips(); $ips = $host_ips->get_ips('string'); //Host Sensors $host_sensors = $host->get_sensors(); $sensors = $host_sensors->get_sensors(); //Host Devices $host_devices = $host->get_devices(); $devices = $host_devices->get_devices(); //Host Scan $is_nagios_enabled = Asset_host_scan::is_plugin_in_host($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"/> <script type="text/javascript" src="../js/jquery.min.js"></script>