--- alx-src/branches/alx-web-060/index.php 2011/06/15 13:14:25 2415 +++ alx-src/branches/alx-web-070/index.php 2017/08/30 15:08:15 10662 @@ -1,10 +1,18 @@ /dev/null && exit 0 || exit 1",$retval); - passthru($pingcmd." ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval); + $retval = ping_host($dat['ip'],$mcore_port,$ping_timeout); if($retval==0) { $comps[$dat['serial']]['online'] = true; @@ -48,8 +56,8 @@ if($_SESSION['alx_sort_onfirst']) { - if($a['online'] && !$b['online']) return -1; - if($b['online'] && !$a['online']) return 1; + if(isset($a['online']) && !isset($b['online'])) return -1; + if(isset($b['online']) && !isset($a['online'])) return 1; } if($_SESSION['alx_sort_krit']=='hostname') { @@ -65,12 +73,12 @@ else return ''; } -$comps = sqlarr("select client_serials.serial, client_serials.location, client_serials.mac, cfg_network.hostname, state_connected.mtime from client_serials left join cfg_network on client_serials.serial=cfg_network.serial left join state_connected on client_serials.serial=state_connected.serial", "serial"); - -sqlforeach('SELECT serial, ip, hostname, mac FROM state_connected', 'check_online', null); +$comps = sqlarr("select client_serials.serial, client_serials.enabled, client_serials.location, client_serials.mac, cfg_network.hostname, state_connected.mtime, state_connected.netboot from client_serials left join cfg_network on client_serials.serial=cfg_network.serial left join state_connected on client_serials.serial=state_connected.serial", "serial"); + +sqlforeach('SELECT state_connected.serial, state_connected.ip, cfg_network.hostname, state_connected.mac FROM state_connected left join cfg_network on cfg_network.serial=state_connected.serial', 'check_online', null); usort($comps, 'sortcomp'); echo ''; + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; echo ''; echo 'ALX Config - Index'; echo '