1 |
<? |
<? |
|
include('include/config.inc.php'); |
|
2 |
include('include/basesql.php'); |
include('include/basesql.php'); |
3 |
session_start(); |
session_start(); |
4 |
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'); |
24 |
function check_online($dat, $bla) |
function check_online($dat, $bla) |
25 |
{ |
{ |
26 |
global $comps; |
global $comps; |
27 |
|
global $pingcmd; |
28 |
|
|
29 |
if(!isset($comps[$dat['serial']])) return false; |
if(!isset($comps[$dat['serial']])) return false; |
30 |
|
|
31 |
passthru($pingcmd.$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval); |
passthru($pingcmd." ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval); |
32 |
if($retval==0) |
if($retval==0) |
33 |
{ |
{ |
34 |
$comps[$dat['serial']]['online'] = true; |
$comps[$dat['serial']]['online'] = true; |