'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/bricks.png", false, "", false, $updated_time ); // Init vars $groups_info = array (); $counter = 1; $agents = agents_get_group_agents(array_keys($groups)); if (count($agents) > 0) { echo '
".__("Group")." | "; echo ""; 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 foreach ($groups as $id_group => $group) { groups_get_group_row($id_group, $groups, $group, $printed_groups); } echo "
---|