diff options
Diffstat (limited to 'admin/WebConsole/includes/RecopilaIpesMacs.php')
-rw-r--r-- | admin/WebConsole/includes/RecopilaIpesMacs.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/admin/WebConsole/includes/RecopilaIpesMacs.php b/admin/WebConsole/includes/RecopilaIpesMacs.php index 2ded1775..4601a4a2 100644 --- a/admin/WebConsole/includes/RecopilaIpesMacs.php +++ b/admin/WebConsole/includes/RecopilaIpesMacs.php @@ -166,4 +166,21 @@ function RecorreOrdenadores($cmd){ $rs->Cerrar(); } - +function get_netmasks($cmd, &$macs, &$netmasks){ + $macs = str_replace(";", "','", $macs); + $cmd->texto="SELECT mac, mascara + FROM ordenadores + WHERE mac IN ('".$macs."')"; + $rs=new Recordset; + $rs->Comando=&$cmd; + if (!$rs->Abrir()) return; + $macs = ""; + while (!$rs->EOF){ + $macs.=$rs->campos["mac"].";"; + $netmasks.=$rs->campos["mascara"].";"; + $rs->Siguiente(); + } + $rs->Cerrar(); + $macs = substr($macs, 0, -1); + $netmasks = substr($netmasks, 0, -1); +} |