diff --git a/pandora_console/extensions/net_tools.php b/pandora_console/extensions/net_tools.php index 4c5f77a2f7..4da4d88fad 100644 --- a/pandora_console/extensions/net_tools.php +++ b/pandora_console/extensions/net_tools.php @@ -83,37 +83,75 @@ function whereis_the_command ($command) { function main_net_tools () { $id_agente = get_parameter ("id_agente"); - $ip = db_get_sql ("SELECT direccion FROM tagente WHERE id_agente = $id_agente"); - if ($ip == "") { + $principal_ip = db_get_sql ("SELECT direccion FROM tagente WHERE id_agente = $id_agente"); + + $list_address = db_get_all_rows_sql ("select id_a from taddress_agent where id_agent = " . $id_agente); + foreach ($list_address as $address){ + $ids []= join(",",$address); + } + $ids_address = implode(",",$ids); + $ips = db_get_all_rows_sql ("select ip from taddress where id_a in (" . $ids_address . ")"); + + if ($ips == "") { echo "
" . __('The agent hasn\'t got IP') . "
"; return; } + echo " + "; + echo "
"; echo "
"; - echo ""; + echo "
"; echo ""; echo ""; + echo ""; echo "
"; echo __("Operation"); ui_print_help_tip(__('You can set the command path in the menu Administration -> Extensions -> Config Network Tools')); - echo ""; - echo ""; + echo ""; + echo ""; - echo __("SNMP Community"); - echo ""; + echo __("IP address"); + echo ""; + echo ""; + echo ""; + echo __("SNMP Community") . " "; echo ""; - echo ""; + echo ""; echo ""; + echo "
"; echo "
"; $operation = get_parameter ("operation", 0); $community = get_parameter ("community", "public"); + $ip = get_parameter("select_ips"); switch($operation) { case 1: