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.

23 lines
896 B

4 years ago
​
​
​
3 years ago
​
​
4 years ago
3 years ago
4 years ago
​
​
3 years ago
​
​
​
4 years ago
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $VID = intval( $_POST['VID'] );
  5. $DTS = intval( $_POST['TS'] );
  6. if( $VID ){
  7. $DS = date("Y/m/d", $DTS );
  8. $QS = "SELECT * FROM `videos` WHERE `id` = {$VID}";
  9. $ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
  10. $LREC = $ZIZI->Query( $QS );
  11. if( count( $LREC ) ){
  12. $Data = $LREC[0];
  13. $Data['base'] = $DS;
  14. $QS = "SELECT `no`.`id` as `node_id` FROM `nodes` `no` LEFT JOIN `cameras` `ca` ON ( `no`.`aux_id` = `ca`.`id` ) WHERE ( `no`.`type` = 10 OR `no`.`type` = 11 OR `no`.`type` = 12 OR `no`.`type` = 13 )AND `ca`.`stream_id`={$Data['media_stream_id']} LIMIT 1";
  15. $TT = $DATABASE->Query( $QS );
  16. $Data['qs'] = $QS;
  17. $Data['node_id'] = intval( $TT[0]['node_id'] );
  18. echo json_encode( $Data );
  19. exit();
  20. };
  21. };
  22. };
  23. header('location: /');
  24. ?>