13 changed files with 237 additions and 103 deletions
-
BINlib/controller/data/mysqlitedb.db
-
BINlib/controller/data/reports.db
-
64lib/controller/delHistory.php
-
6lib/controller/getFilterEditor.php
-
37lib/controller/getHistoryDay.php
-
12lib/controller/getHistoryEvents.php
-
9lib/controller/getReportLayout.php
-
4lib/controller/getVideoInfo.php
-
54lib/controller/report/node_13.js
-
50lib/controller/report/node_3.js
-
89lib/javascript/jsapi_dynamic/mojo_reports.js
-
15style/style.css
-
BINstyle/wicons/038.png
Binary file not shown.
Binary file not shown.
@ -0,0 +1,64 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
if( $CUser->Data['access'] > 5 ){ |
||||
|
if( isset( $_POST['STY'] ) ){ |
||||
|
$SelectionType = intval( $_POST['STY'] ); |
||||
|
} else { |
||||
|
$SelectionType = 0; |
||||
|
}; |
||||
|
switch( $SelectionType ){ |
||||
|
case 0: { |
||||
|
// Complete Clear History
|
||||
|
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db'); |
||||
|
$QS = "DELETE FROM `events_2_videos`"; |
||||
|
$QS = "DELETE FROM `events_2_pictures`"; |
||||
|
$QS = "DELETE FROM `events`"; |
||||
|
$QS = "DELETE FROM `videos`"; |
||||
|
$QS = "DELETE FROM `pictures`"; |
||||
|
$CMD = `rm -R -f /srv/www/web/lib/controller/data/videos/*`; |
||||
|
break; |
||||
|
}; |
||||
|
case 1:{ |
||||
|
// Clear One Date
|
||||
|
}; |
||||
|
case 2:{ |
||||
|
// Clear One Event
|
||||
|
$BID = intval( $_POST['BID'] ); |
||||
|
$EID = intval( $_POST['EID'] ); |
||||
|
}; |
||||
|
}; |
||||
|
|
||||
|
if( $BID ){ |
||||
|
$QS = "SELECT * FROM nodes"; |
||||
|
$result = $DATABASE->Query( $QS, false ); |
||||
|
$NodeNames = array(); |
||||
|
foreach( $result as $R ) $NodeNames[$R['id']] = $R['name']; |
||||
|
$QS = "SELECT `events`.*, `events_2_videos`.* FROM `events` LEFT JOIN `events_2_videos` ON( `events`.`id` = `events_2_videos`.`evt_id` ) WHERE `id` >= {$BID} AND `id`<={$EID} ORDER BY `ts` ASC, `ts_ms` ASC"; |
||||
|
|
||||
|
//$LREC = array_reverse( $ZIZI->Query( $QS ) );
|
||||
|
$LREC = $ZIZI->Query( $QS ); |
||||
|
$Data['log'] = array(); |
||||
|
foreach( $LREC as $REC ){ |
||||
|
$CR['id'] = intval( $REC['id'] ); |
||||
|
$CR['node_id'] = intval( $REC['node_id'] ); |
||||
|
$CR['node_name'] = $NodeNames[$CR['node_id']]; |
||||
|
$CR['ts'] = intval( $REC['ts'] ); |
||||
|
$CR['ms'] = intval( $REC['ts_ms'] ); |
||||
|
$CR['dts'] = date( "H:i:s.{$CR['ms']}", $CR['ts'] ); |
||||
|
$CR['type'] = intval( $REC['evt_type'] ); |
||||
|
$CR['range'] = sprintf( "%0.2f", floatval( $REC['range'] )); |
||||
|
$CR['az'] = sprintf( "%0.2f", floatval( $REC['azimuth'] )); |
||||
|
$CR['el'] = sprintf( "%0.2f", floatval( $REC['elevation'] )); |
||||
|
$CR['r'] = intval( $REC['range_digital'] ); |
||||
|
$CR['width'] = intval( $REC['area'] ); |
||||
|
$CR['video_id'] = intval( $REC['video_id'] ); |
||||
|
$Data['log'][] = $CR; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
Binary file not shown.
|
After Width: 40 | Height: 40 | Size: 3.4 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue