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.
24 lines
896 B
24 lines
896 B
<?php
|
|
require_once('../ajax_asm.php');
|
|
if( $CUser->Data['id'] > 1 ){
|
|
$VID = intval( $_POST['VID'] );
|
|
$DTS = intval( $_POST['TS'] );
|
|
if( $VID ){
|
|
$DS = date("Y/m/d", $DTS );
|
|
$QS = "SELECT * FROM `videos` WHERE `id` = {$VID}";
|
|
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
|
|
$LREC = $ZIZI->Query( $QS );
|
|
if( count( $LREC ) ){
|
|
$Data = $LREC[0];
|
|
$Data['base'] = $DS;
|
|
$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";
|
|
$TT = $DATABASE->Query( $QS );
|
|
$Data['qs'] = $QS;
|
|
$Data['node_id'] = intval( $TT[0]['node_id'] );
|
|
echo json_encode( $Data );
|
|
exit();
|
|
};
|
|
};
|
|
};
|
|
header('location: /');
|
|
?>
|