Session::logcheck('environment-menu', 'PolicyHosts'); /**************************************************** ******************** Host Data ********************* ****************************************************/ //Database connection $db = new ossim_db(); $conn = $db->connect(); $id = GET('id'); $msg = GET('msg'); ossim_valid($id, OSS_HEX, 'illegal:' . _('Asset group ID')); if (ossim_error()) { echo ossim_error(_('Error! Asset group not found')); exit; } $asset_group = new Asset_group($id); $asset_group->can_i_edit($conn); $asset_group->load_from_db($conn); //Getting group data $id = $asset_group->get_id(); $name = $asset_group->get_name(); $owner = $asset_group->get_owner(); $descr = $asset_group->get_descr(); $threshold_a = $asset_group->get_threshold('a'); $threshold_c = $asset_group->get_threshold('c'); $nagios = Asset_group_scan::is_plugin_in_group($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>
if (Asset_net::is_in_db($conn, $id)) { $asset_type = 'network'; Session::logcheck('environment-menu', 'PolicyNetworks'); $breadcrumb = array('section' => _('Networks'), 'current' => _('Network Details')); $edit = Asset_net::can_i_modify_ips($conn, $id); $delete = Asset_net::can_delete($conn, $id); $p_plugin = Session::am_i_admin(); $deploy_agent = FALSE; } else { if (Asset_group::is_in_db($conn, $id)) { $asset_type = 'group'; Session::logcheck('environment-menu', 'PolicyHosts'); $breadcrumb = array('section' => _('Groups'), 'current' => _('Group Details')); $gobj = new Asset_group($id); try { $edit = $gobj->can_i_edit($conn); } catch (Exception $err) { $edit = FALSE; } try { $delete = $gobj->can_delete_group($conn); } catch (Exception $err) { $delete = FALSE; } $p_plugin = Session::am_i_admin(); $deploy_agent = FALSE; } else { $error = _('Invalid Asset ID'); Av_exception::throw_error(Av_exception::USER_ERROR, $error); } }