'ANY(SELECT id_agente FROM tagente WHERE id_grupo = ' . $group . ')'); db_process_sql_update('tagente_modulo', array('flag' => 1), $where); } else { db_pandora_audit("ACL Violation", "Trying to set flag for groups"); require ("general/noaccess.php"); exit; } } // Get group list that user has access $groups_full = users_get_groups ($config['id_user'], "AR", true, true); $groups = array(); foreach ($groups_full as $group) { $groups[$group['id_grupo']]['name'] = $group['nombre']; if ($group['id_grupo'] != 0) { $groups[$group['parent']]['childs'][] = $group['id_grupo']; $groups[$group['id_grupo']]['prefix'] = $groups[$group['parent']]['prefix'].' '; } else { $groups[$group['id_grupo']]['prefix'] = ''; } if (!isset($groups[$group['id_grupo']]['childs'])) { $groups[$group['id_grupo']]['childs'] = array(); } } if ($config["realtimestats"] == 0) { $updated_time = __('Last update') . " : " . ui_print_timestamp (db_get_sql ("SELECT min(utimestamp) FROM tgroup_stat"), true); } else { $updated_time = __("Updated at realtime"); } // Header ui_print_page_header (__("Group view"), "images/group.png", false, "", false, $updated_time ); if (tags_has_user_acl_tags()) { ui_print_tags_warning(); } // Init vars $groups_info = array (); $counter = 1; $agents = agents_get_group_agents(array_keys($groups)); $offset = (int)get_parameter('offset', 0); if (count($agents) > 0) { $groups_get_groups_with_agent = groups_get_groups_with_agent($config['id_user'], "AR", true, true); ui_pagination(count($groups_get_groups_with_agent)); echo '
" . __("Force") . " | "; //echo "" . __("Status") . " | "; echo "" . __("Group") . " | "; echo "" . __("Agents") . " | "; echo "" . __("Agent unknown") . " | "; echo "" . __("Unknown") . " | "; echo "" . __("Not Init") . " | "; echo "" . __("Normal") . " | "; echo "" . __("Warning") . " | "; echo "" . __("Critical") . " | "; echo "" . __("Alert fired") . " | "; $printed_groups = array(); // For each valid group for this user, take data from agent and modules $table_rows = array(); foreach ($groups as $id_group => $group) { $rows = groups_get_group_row($id_group, $groups, $group, $printed_groups); if (!is_array_empty($rows)) { $table_rows += $rows; } } $table_rows = array_slice($table_rows, $offset, $config['block_size']); foreach ($table_rows as $row) { echo $row; } echo "
---|