Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
697 B

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$NodeID = intval($_POST['NID']);
$Master = intval($_POST['MST']);
$QS = "SELECT * FROM nodes WHERE id={$NodeID}";
$Data = array();
$result = $DATABASE->Query( $QS, false );
if( count( $result ) ){
$T = $result[0];
$AID = $T['aux_id'];
$QS = "SELECT * FROM lrf_sensors WHERE id={$AID}";
$result = $DATABASE->Query( $QS, false );
if( count($result)) {
$R = $result[0];
$R['name'] = $T['name'];
$R['data_status'] = intval( $R['data_status'] );
$R['online'] = intval($T['online']);
$Data = $R;
};
};
echo json_encode( $Data );
exit();
};
header('location: /');
?>