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 "