--- alx-src/branches/alx-web-060/index.php 2011/09/07 08:54:25 2948 +++ alx-src/branches/alx-web-070/index.php 2015/09/09 11:20:52 7110 @@ -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 ''; echo ''; +//always enable showversion atm +$showversion = "on"; if($showversion=='on') echo ''; echo ''; @@ -133,7 +141,7 @@ else echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -154,14 +162,14 @@ { if($c['online']) { - //$alxinfo = sshdo('os_ver=$('.$alxver.''; echo '';
editserialhostnameiplast connectedversionup/down
'.substr($c['location'],0,1).''.substr($c['location'],0,3).''.strtoupper($pic).'#'.$c['serial'].''.$c['hostname'].''.$alxutils.'