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.

22 lines
662 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. if( isset( $_POST['NID'] ) ){
  5. $NID = intval( $_POST['NID'] );
  6. $QS = "SELECT * FROM `lrf_mask_schedule` WHERE `sensor_id`={$NID} ORDER BY `time`, `date`";
  7. $RR = $DATABASE->Query( $QS );
  8. if( count( $RR ) ){
  9. $Data['totalCount'] = count( $RR );
  10. $Data['rows'] = array();
  11. foreach( $RR as $R ){
  12. $CC['id'] = intval( $R['id'] );
  13. $CC['op_mask'] = intval( $R['op_mask'] );
  14. $CC['day_mask'] = intval( $R['day_mask'] );
  15. $Data['rows'][] = $CC;
  16. };
  17. echo json_encode( $Data );
  18. } else {
  19. echo "{ 'totalCount': 0, 'rows':[] }";
  20. };
  21. };
  22. };
  23. ?>