// Please see http://pandora.sourceforge.net for full contribution list // 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 for version 2. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // ======================== // AGENT GENERAL DATA FORM // ======================== // Load global vars require("include/config.php"); if (give_acl($id_user, 0, "AW")!=1) { audit_db($id_usuario,$REMOTE_ADDR, "ACL Violation","Trying to access agent manager"); require ("general/noaccess.php"); exit; } echo "

".lang_string ("agent_conf"); if (isset($_GET["create_agent"])){ $create_agent = 1; echo " > ".lang_string ("create_agent"); } else { echo " > ".lang_string ("update_agent"); } echo "

"; echo "
"; // Agent remote configuration editor $agent_md5 = md5($nombre_agente, FALSE); if (isset($_GET["disk_conf"])){ require ("agent_disk_conf_editor.php"); exit; } // Agent remote configuration DELETE if (isset($_GET["disk_conf_delete"])){ $agent_md5 = md5($nombre_agente, FALSE); $file_name = $config["remote_config"] . "/" . $agent_md5 . ".conf"; unlink ($file_name); $file_name = $config["remote_config"] . "/" . $agent_md5 . ".md5"; unlink ($file_name); } echo '
'; echo ''; echo ""; echo '"; } echo '"; echo ''; echo ''; echo '
'.lang_string ("agent_name").' ' . $lang_label["agent_name_help"] . ''; print_input_text ('agente', $nombre_agente, '', 30, 100); if (isset ($id_agente) && $id_agente != "") { echo " "; } // Remote configuration available if (file_exists ($config["remote_config"] . "/" . $agent_md5 . ".md5")) { echo " "; } echo '
'; echo ''.lang_string ("ip_address").''; echo ''; print_input_text ('direccion', $direccion_agente, '', 16, 100); if ($create_agent != 1) { echo "    "; echo '"; echo " ".lang_string ("delete_sel"); echo "
'.lang_string ("Parent").''; echo ''; print_select_from_sql ('SELECT id_agente, nombre FROM tagente ORDER BY nombre', 'id_parent', $id_parent, '', 'None', '0'); echo '
'.lang_string ("group").''; echo ''; print_select_from_sql ('SELECT id_grupo, nombre FROM tgrupo ORDER BY nombre', 'grupo', $grupo, '', '', ''); echo "
"; echo "".lang_string("interval")."'; echo '
'.lang_string("os").''; print_select_from_sql ('SELECT id_os, name FROM tconfig_os ORDER BY name', 'id_os', $id_os, '', '', ''); // Network server echo '
'; echo $lang_label["network_server"]; echo ' '.$lang_label["network_server_help"].''; echo ''; $none = ''; $none_value = ''; if ($id_network_server == 0) { $none = lang_string ('None'); $none_value = 0; } print_select_from_sql ('SELECT id_server, name FROM tserver WHERE network_server = 1 ORDER BY name', 'network_server', $id_network_server, '', $none, $none_value); // Plugin Server echo '
'; echo $lang_label["plugin_server"]; echo ' '.$lang_label["plugin_server_help"].''; echo ''; $none_str = lang_string ('None'); $none = ''; $none_value = ''; if ($id_plugin_server == 0) { $none = $none_str; $none_value = 0; } print_select_from_sql ('SELECT id_server, name FROM tserver WHERE plugin_server = 1 ORDER BY name', 'plugin_server', $id_plugin_server, '', $none, $none_value); // WMI Server echo '
'; echo $lang_label["wmi_server"]; echo ' '.$lang_label["wmi_server_help"].''; echo ''; $none = ''; $none_value = ''; if ($id_plugin_server == 0) { $none = $none_str; $none_value = 0; } print_select_from_sql ('SELECT id_server, name FROM tserver WHERE wmi_server = 1 ORDER BY name', 'wmi_server', $id_wmi_server, '', $none, $none_value); // Prediction Server echo '
'; echo $lang_label["prediction_server"]; echo ' '.$lang_label["prediction_server_help"].''; echo ''; $none = ''; $none_value = ''; if ($id_prediction_server == 0) { $none = $none_str; $none_value = 0; } print_select_from_sql ('SELECT id_server, name FROM tserver WHERE prediction_server = 1 ORDER BY name', 'prediction_server', $id_prediction_server, '', $none, $none_value); // Description echo '
'; echo lang_string ("description"); echo ''; print_input_text ('comentarios', $comentarios, '', 45, 255); // Learn mode / Normal mode echo '
'; echo lang_string ("module_definition"); pandora_help("module_definition"); echo ''; echo lang_string ("learning_mode"); print_radio_button_extended ("modo", 1, '', $modo, false, '', 'style="margin-right: 40px;"'); echo lang_string ("normal_mode"); print_radio_button_extended ("modo", 0, '', $modo, false, '', 'style="margin-right: 40px;"'); // Status (Disabled / Enabled) echo '
'.lang_string("status").''; echo ''; echo lang_string ("disabled"); print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"'); echo lang_string ("active"); print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"'); // Remote configuration echo '
'.lang_string("Remote configuration").''; echo ''; $filename = $config["remote_config"] . "/" . $agent_md5 . ".md5"; if (file_exists($filename)){ echo date("F d Y H:i:s.", fileatime($filename)); // Delete remote configuration echo ""; } else { echo ''.lang_string("Not available").''; } echo '
'; if ($create_agent == 1) { print_submit_button (lang_string ('create'), 'crtbutton', false, 'class="sub wand"'); print_input_hidden ('create_agent', 1); } else { print_submit_button (lang_string ('update'), 'updbutton', false, 'class="sub upd"'); print_input_hidden ('update_agent', 1); print_input_hidden ('id_agente', $id_agente); } echo "
"; ?>