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.
41 lines
1.3 KiB
41 lines
1.3 KiB
<?php
|
|
require_once('../ajax_asm.php');
|
|
require_once('../php/onvif/toto.php');
|
|
require_once('../php/video/zlMediaServerController.php');
|
|
$Data = array();
|
|
$Data['success'] = false;
|
|
if( $CUser->Data['id'] > 1 ){
|
|
|
|
if( isset( $_POST['CID'] ) ){
|
|
$ECID = intval( $_POST['CID'] );
|
|
if( $ECID > 0 ){
|
|
//Check if Camera Already has password and discovered sources!
|
|
$QS = "SELECT * FROM media_streams WHERE source_id={$ECID}";
|
|
$Result = $DATABASE->Query($QS,false);
|
|
if( count( $Result ) > 0 ){
|
|
$QS = "SELECT * FROM cameras WHERE id = {$ECID}";
|
|
$Rlt = $DATABASE->Query($QS,false);
|
|
$Data['login'] = $Rlt[0]['access_login'];
|
|
$Data['password'] = $Rlt[0]['access_pass'];
|
|
$Data['password'] = $Rlt[0]['access_pass'];
|
|
$Data['auth_mode'] = $Rlt[0]['auth_mode'];
|
|
foreach( $Result as $CD ){
|
|
$cnode['id'] = $CD['id'];
|
|
$cnode['name'] = $CD['name'];
|
|
$cnode['size'] = $CD['img_width'].'x'.$CD['img_height'].'@'.$CD['fps'];
|
|
$cnode['encode'] = $CD['compression_type'];
|
|
$cnode['bitrate'] = $CD['bitrate'];
|
|
//$cnode['pic'] = $CD['picture'];
|
|
$Data['nodes'][] = $cnode;
|
|
};
|
|
$Data['success'] = true;
|
|
echo json_encode( $Data );
|
|
exit();
|
|
};
|
|
};
|
|
};
|
|
} else {
|
|
$Data['error']='Access Denied!';
|
|
};
|
|
echo json_encode( $Data );
|
|
?>
|