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.
29 lines
992 B
29 lines
992 B
<?php
|
|
require_once('../ajax_asm.php');
|
|
if( $CUser->Data['id'] > 1 ){
|
|
$EID = intval( $_POST['ID'] );
|
|
$DTS = intval( $_POST['TS'] );
|
|
if( $EID ){
|
|
$DS = date("Y/m/d", $DTS );
|
|
//$QS = "SELECT * FROM `videos` WHERE `id` = {$VID}";
|
|
$QS = "SELECT `pictures`.`media_stream_id`, `pictures`.`md5`, `pictures`.`ext` FROM `events_2_pictures` LEFT JOIN `pictures` ON( `pictures`.`id` = `events_2_pictures`.`picture_id` ) WHERE `events_2_pictures`.`evt_id`={$EID}";
|
|
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/'.$DS.'/report.db');
|
|
$LREC = $ZIZI->Query( $QS );
|
|
if( count( $LREC ) ){
|
|
$Pack = array();
|
|
$Pack['pictures'] = array();
|
|
foreach( $LREC as $Data ){
|
|
$CP = array();
|
|
$CP['file'] = $DS.'/'. $Data['md5'].'.'.$Data['ext'];
|
|
$CP['media_stream_id'] = $Data['media_stream_id'];
|
|
$Pack['pictures'][] = $CP;
|
|
};
|
|
echo json_encode( $Pack );
|
|
exit();
|
|
};
|
|
echo "[]";
|
|
exit();
|
|
};
|
|
};
|
|
header('location: /');
|
|
?>
|