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.
 
 
 
 

23 lines
662 B

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
if( isset( $_POST['NID'] ) ){
$NID = intval( $_POST['NID'] );
$QS = "SELECT * FROM `lrf_mask_schedule` WHERE `sensor_id`={$NID} ORDER BY `time`, `date`";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$Data['totalCount'] = count( $RR );
$Data['rows'] = array();
foreach( $RR as $R ){
$CC['id'] = intval( $R['id'] );
$CC['op_mask'] = intval( $R['op_mask'] );
$CC['day_mask'] = intval( $R['day_mask'] );
$Data['rows'][] = $CC;
};
echo json_encode( $Data );
} else {
echo "{ 'totalCount': 0, 'rows':[] }";
};
};
};
?>