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.

29 lines
925 B

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $Data = array();
  5. $GID = intval($_POST['NID']);
  6. $LTS = $_POST['LTS'];
  7. $TArr = explode( '.', $LTS );
  8. if( count( $TArr ) > 1 ){
  9. $tts = intval( $TArr[0] );
  10. $ttms = intval( $TArr[1] );
  11. $QS = "SELECT * FROM current_events_clowd WHERE ts > {$tts} AND ts_ms > {$ttms}";
  12. } else {
  13. $QS = "SELECT * FROM current_events_clowd";
  14. };
  15. $Result = $DATABASE->Query( $QS, false );
  16. foreach( $Result as $CD ){
  17. $cnode['id'] = $CD['id'];
  18. $cnode['group'] = $CD['device_id'];
  19. $cnode['content'] = 'Target';//'' . ( intval( $CD['ts'] ) + $CD['ts_ms'] / 1000 );
  20. //$cnode['title'] = 'Target';
  21. $cnode['start'] = intval( $CD['ts'] ) + $CD['ts_ms'] / 1000;
  22. $cnode['type'] = 'point';
  23. $Data[] = $cnode;
  24. };
  25. //$Data['LT'] = '' . microtime(true);
  26. echo json_encode( $Data );
  27. } else {
  28. header('location: /');
  29. };
  30. ?>