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
794 B

4 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. if( $VID ){
  6. $QS = "SELECT * FROM `videos` WHERE `id` = {$VID}";
  7. $ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db');
  8. $LREC = $ZIZI->Query( $QS );
  9. if( count( $LREC ) ){
  10. $Data = $LREC[0];
  11. $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";
  12. $TT = $DATABASE->Query( $QS );
  13. $Data['qs'] = $QS;
  14. $Data['node_id'] = intval( $TT[0]['node_id'] );
  15. echo json_encode( $Data );
  16. exit();
  17. };
  18. };
  19. };
  20. header('location: /');
  21. ?>