".__('Agent configuration')." » ".__('Agents defined in Pandora').""; // Show group selector if (isset($_POST["ag_group"])){ $ag_group = get_parameter_post ("ag_group"); echo "
"; } else { echo ""; } echo ""; echo ""; echo "
".__('Group').""; echo ""; echo " "; echo __('Free text for search (*)'); echo ""; // Show group selector if (isset($_POST["ag_group"])){ $group_mod = "&ag_group_refresh=".get_parameter_post ("ag_group"); } else { $group_mod =""; } echo "
"; echo ""; echo "
"; echo ""; echo ""; echo "
"; $search_sql = ''; if ($search != ""){ $search_sql = " AND ( nombre LIKE '%$search%' OR direccion LIKE '%$search%') "; } else { } // Show only selected groups if ($ag_group > 1) { $sql = sprintf ('SELECT COUNT(*) FROM tagente WHERE id_grupo = %d %s', $ag_group, $search_sql); $total_agents = get_db_sql ($sql); $sql = sprintf ('SELECT * FROM tagente WHERE id_grupo = %d %s ORDER BY nombre LIMIT %d, %d', $ag_group, $search_sql, $offset, $config["block_size"]); } else { $sql = sprintf ('SELECT COUNT(*) FROM tagente WHERE id_grupo IN (%s) %s', implode (',', array_keys (get_user_groups ())), $search_sql); $total_agents = get_db_sql ($sql); $sql = sprintf ('SELECT * FROM tagente WHERE id_grupo IN (%s) %s ORDER BY nombre LIMIT %d, %d', implode (',', array_keys (get_user_groups ())), $search_sql, $offset, $config["block_size"]); } $agents = get_db_all_rows_sql ($sql); // Prepare pagination pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group", $offset); echo "
"; if ($agents !== false) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $color=1; foreach ($agents as $agent) { $id_grupo = $agent["id_grupo"]; if (! give_acl ($config["id_user"], $id_grupo, "AW")) continue; if ($color == 1){ $tdcolor = "datos"; $color = 0; } else { $tdcolor = "datos2"; $color = 1; } // Agent name echo ""; echo ""; // Operating System icon echo ""; // Group icon and name echo ""; // Description echo ""; // Action echo ""; } echo "
".__('Agent name')."".__('R')."".__('OS')."".__('Group')."".__('Description')."".__('Delete')."
"; if ($agent["disabled"]){ echo ""; } echo ''; echo "".substr(strtoupper($agent["nombre"]),0,20).""; if ($agent["disabled"]) { echo ""; } echo ''; echo ""; // Has remote configuration ? $agent_md5 = md5 ($agent["nombre"], false); if (file_exists ($config["remote_config"]."/".$agent_md5.".md5")) { echo ""; echo ""; echo ""; } echo ""; print_os_icon ($agent["id_os"], false); echo "".print_group_icon ($id_grupo, true)."".$agent["comentarios"]."'; echo "
"; echo "
"; } else { echo "
".__('There are no defined agents')."
"; echo " 
"; } // Create agent button echo '
'; print_input_hidden ('new_agent', 1); print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"'); echo "
"; ?>