// Main PHP/SQL code development, project architecture and management. // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation, version 2. // Load global vars require("include/config.php"); check_login(); if (give_acl($config["id_user"], 0, "AW")!=1) { audit_db($config["id_user"], $REMOTE_ADDR, "ACL Violation","Trying to access agent manager"); require ($config["homedir"]."/general/noaccess.php"); exit; }; echo "

".__('agent_conf')." > ".__('modules')."

"; // ========================== // Create module/type combo // ========================== echo ''; echo ''; echo ""; echo '
"; echo ''; echo ''; echo ""; echo "
"; // ========================== // MODULE VISUALIZATION TABLE // ========================== echo "

".__('assigned_modules')."

"; $sql1='SELECT * FROM tagente_modulo WHERE id_agente = "'.$id_agente.'" ORDER BY id_module_group, nombre '; $result=mysql_query($sql1); if ($row=mysql_num_rows($result)){ echo ''; echo ''; echo ""; echo ''; echo ''; echo ""; echo ""; echo ""; echo ""; $color=1; $last_modulegroup = "0"; while ($row = mysql_fetch_array($result)){ if ($color == 1){ $tdcolor = "datos"; $color = 0; } else { $tdcolor = "datos2"; $color = 1; } $id_tipo = $row["id_tipo_modulo"]; $id_module = $row["id_modulo"]; $nombre_modulo = $row["nombre"]; $descripcion = $row["descripcion"]; $module_max = $row["max"]; $module_min = $row["min"]; $module_interval2 = $row["module_interval"]; $module_group2 = $row["id_module_group"]; if ($module_group2 != $last_modulegroup ){ // Render module group names (fixed code) $nombre_grupomodulo = dame_nombre_grupomodulo ($module_group2); $last_modulegroup = $module_group2; echo ""; } if ($row["disabled"] == 0) echo ""; else echo ""; // Module type (by server type ) echo ""; // Module interval if ($module_interval2!=0){ echo ""; } else { echo ""; } echo ""; // MAX / MIN values echo ""; // Delete module echo "
".__('module_name')."'.__('S').''.__('type').'".__('interval')."".__('description')."".__('max_min')."".__('action')."
".$nombre_grupomodulo."
".$nombre_modulo."
$nombre_modulo"; if ($id_module > 0) { echo show_server_type ($id_module); echo ' '; } // Module type (by data type) echo ""; if ($id_tipo > 0) { echo ""; } echo "".$module_interval2." N/A ".substr($descripcion,0,30).""; if ($module_max == $module_min) { $module_max = "N/A"; $module_min = "N/A"; } echo $module_max." / ".$module_min; echo ""; echo "'; echo ""; echo " "; // Update module echo ""; echo ""; // Make a data normalization if (($id_tipo == 22 ) OR ($id_tipo == 1 ) OR ($id_tipo == 4 ) OR ($id_tipo == 7 ) OR ($id_tipo == 8 ) OR ($id_tipo == 11 ) OR ($id_tipo == 16) OR ($id_tipo == 22 )) { echo " "; echo "'; echo ""; } } echo "
"; } else echo "
".__('No available data to show')."
";