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.

23 lines
719 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. //$cnode['pic'] = $CD['picture'];
  17. $Data['nodes'][] = $cnode;
  18. };
  19. };
  20. echo json_encode( $Data );
  21. } else {
  22. header('location: /');
  23. };
  24. ?>