Web Interface For Lite Argus Control modules
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.

20 lines
573 B

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $AID = intval($_POST['DID']);
  5. $QS = "SELECT * FROM `lrf_uploads` WHERE `sensor_id`={$AID} AND `status` < 101";
  6. $result = $DATABASE->Query( $QS, false );
  7. $Data['count'] = count($result);
  8. if( count($result) ){
  9. foreach( $result as $R ){
  10. if( $R['status'] > -1 && $R['status'] < 101 ){
  11. $Data['current']=$R['file'];
  12. $Data['progress']=$R['status']/100.0;
  13. break;
  14. };
  15. };
  16. };
  17. echo json_encode( $Data );
  18. exit();
  19. };
  20. header('location: /');
  21. ?>