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.

24 lines
914 B

4 years ago
​
​
3 years ago
3 years ago
3 years ago
4 years ago
​
​
​
​
​
4 years ago
​
​
4 years ago
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $EID = intval( $_POST['ID'] );
  5. $DTS = intval( $_POST['TS'] );
  6. if( $EID ){
  7. $DS = date("Y/m/d", $DTS );
  8. //$QS = "SELECT * FROM `videos` WHERE `id` = {$VID}";
  9. $QS = "SELECT `videos`.`id`, `videos`.`fps`,`videos`.`uts` as `ts`, `videos`.`md5`, `videos`.`media_stream_id`, `events_2_videos`.`frame` FROM `events_2_videos` LEFT JOIN `videos` ON( `videos`.`id` = `events_2_videos`.`video_id` ) WHERE `events_2_videos`.`evt_id`={$EID}";
  10. $ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
  11. $LREC = $ZIZI->Query( $QS );
  12. if( count( $LREC ) ){
  13. $Pack = array();
  14. $Pack['ts'] = $DTS;
  15. $Pack['videos'] = array();
  16. foreach( $LREC as $Data ) $Pack['videos'][] = $Data;
  17. echo json_encode( $Pack );
  18. exit();
  19. };
  20. echo "[]";
  21. exit();
  22. };
  23. };
  24. header('location: /');
  25. ?>