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.

22 lines
683 B

6 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. require_once('../php/onvif/toto.php');
  4. if( $CUser->Data['id'] > 1 ){
  5. $Data = array();
  6. if( isset( $_POST['CID'] ) ){
  7. $ECID = intval( $_POST['CID'] );
  8. $QS = "SELECT * FROM camera_streams WHERE camera_id={$ECID}";
  9. $Result = $DATABASE->Query($QS,false);
  10. foreach( $Result as $CD ){
  11. $cnode['id'] = $CD['id'];
  12. $cnode['name'] = $CD['name'];
  13. $cnode['size'] = $CD['img_width'].'x'.$CD['img_height'].'@'.$CD['fps'];
  14. $cnode['encode'] = $CD['compression_type'];
  15. $cnode['bitrate'] = $CD['bitrate'];
  16. $Data['nodes'][] = $cnode;
  17. };
  18. };
  19. echo json_encode( $Data );
  20. } else {
  21. header('location: /');
  22. };
  23. ?>