--- alx-src/branches/alx-web-060/index.php 2012/02/01 10:54:50 3347 +++ alx-src/branches/alx-web-070/index.php 2015/09/11 15:25:31 7123 @@ -4,7 +4,10 @@ include('include/common-functions.php'); session_start(); -session_register('alx_sort_krit'); session_register('alx_sort_onfirst'); session_register('alx_sort_loc'); +//session_register('alx_sort_krit'); session_register('alx_sort_onfirst'); session_register('alx_sort_loc'); +$_SESSION['alx_sort_krit'] = $alx_sort_krit; +$_SESSION['alx_sort_onfirst'] = $alx_sort_onfirst; +$_SESSION['alx_sort_loc'] = $alx_sort_loc; $locations = sqlarr('SELECT location FROM client_locations', '', 'location'); $locations[] = ''; @@ -27,11 +30,14 @@ function check_online($dat, $bla) { global $comps; - global $pingcmd; + global $ssh_port; + global $mcore_port; + global $ping_timeout; if(!isset($comps[$dat['serial']])) return false; - //passthru("/bin/ping -I eth0 -c 1 -W 1 -q ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval); - passthru($pingcmd." ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval); + // first try mcore, then get ssh + $retval = ping_host($dat['ip'],$mcore_port,$ping_timeout); + if($retval==1) $retval = ping_host($dat['ip'],$ssh_port,$ping_timeout); if($retval==0) { $comps[$dat['serial']]['online'] = true; @@ -114,6 +120,8 @@ echo '
edit | serial | hostname | ip | last connected | '; +//always enable showversion atm +$showversion = "on"; if($showversion=='on') echo 'version | '; echo 'up/down | |||
---|---|---|---|---|---|---|---|---|---|
'; - echo ' | '.substr($c['location'],0,1).' | '; + echo ''.substr($c['location'],0,3).' | '; echo '![]() | ';
echo '#'.$c['serial'].' | '; echo ''.$alxutils.' | '; + echo ''.$alxver.' | '; + echo ''.$alxutils.' | '; } echo ''; @@ -178,7 +186,7 @@ else echo ''; echo ' | '; - echo '