98 changed files with 13512 additions and 2248 deletions
-
27__template.php
-
BINapp-debug-unaligned.apk
-
BINapp.apk
-
12ccal.php
-
43check_ericson.html
-
49check_ericson2.html
-
60check_face.html
-
50check_my_webrtc.html
-
50check_webrtc.html
-
63check_ws.html
-
27devices.php
-
37index.php
-
6info.php
-
BINlib.tar.bz2
-
3lib/ajax_asm.php
-
3lib/assembler.php
-
36lib/controller/AddCameraNode.php
-
2lib/controller/clearEventCloud.php
-
10lib/controller/clearServerLog.php
-
24lib/controller/dash/node_13.js
-
88lib/controller/dash/node_2.js
-
39lib/controller/getCameraSettings.php
-
123lib/controller/getDashBoardItems.php
-
14lib/controller/getDashBoardStatus.php
-
411lib/controller/getDeviceDraw.php
-
32lib/controller/getEventProps.php
-
2lib/controller/getEventRecords.php
-
62lib/controller/getGeoAlerts.php
-
456lib/controller/getGeoZones.php
-
2lib/controller/getLocationNodes.php
-
37lib/controller/getM3U8.php
-
9lib/controller/getOnvifCredentials.php
-
47lib/controller/getSettingsLRF.php
-
24lib/controller/listAccessLog.php
-
2lib/controller/listDiscoveredCameraSources.php
-
39lib/controller/listServerLog.php
-
27lib/controller/listUsers.php
-
3lib/controller/props/event_prop.js
-
29lib/controller/props/event_video.js
-
2lib/controller/removeNode.php
-
1lib/controller/updateUserSettings.php
-
67lib/defines.php
-
18lib/install.php
-
781lib/javascript/jsapi_dynamic/rgoose_camera_editor.js
-
61lib/javascript/jsapi_dynamic/rgoose_dashboard.js
-
93lib/javascript/jsapi_dynamic/rgoose_devices_module.js
-
82lib/javascript/jsapi_dynamic/rgoose_location_editor.js
-
245lib/javascript/jsapi_dynamic/rgoose_logs.js
-
52lib/javascript/jsapi_dynamic/rgoose_main.js
-
190lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js
-
523lib/javascript/jsapi_dynamic/rgoose_timeline.js
-
171lib/javascript/jsapi_dynamic/rgoose_users.js
-
BINlib/javascript/jsapi_dynamic/vatican_308px-100m.jpg
-
63lib/javascript/jsapi_static/rgoose_general.js
-
189lib/javascript/leaflet/Leaflet.ImageOverlay.Rotated.js
-
636lib/javascript/leaflet/leaflet.css
-
6lib/javascript/leaflet/leaflet.js
-
5lib/javascript/leaflet/leaflet__.js
-
2lib/javascript/videojs/videojs-offset.min.js
-
3lib/js_asm.php
-
54lib/php/auth/gplogger.auth.lib.php
-
58lib/php/auth/web.php
-
2lib/php/db/language_class.php
-
70lib/php/db/logio_class.php
-
175lib/php/db/user_class.php
-
184lib/php/ui/UI_functions.php
-
534lib/php/utm/gPoint.php
-
80lib/settings.php
-
74lib/settings.php.bk
-
2lib/soap_asm.php
-
1lib/ui_asm.php
-
54logerror
-
129old.php
-
BINouttest.png
-
BINouttest2.png
-
1registry.sjno
-
11saveimage.php
-
39setup/camera_ptz_protocols.sql
-
7751setup/dfsl_gunter.sql
-
625setup/dfsl_gunter_structs.sql
-
14setup/index.php
-
104setup/install.php
-
68setup/labels_js.sql
-
49setup/labels_php.sql
-
42setup/server_module_types.sql
-
74setup/settings.php
-
173soap.php
-
92some_test.php
-
BINstyle/assets/987698d-1.png
-
10style/style.css
-
25test_998.txt
-
36test_all_off.php
-
36test_all_on.php
-
11test_ffmpeg
-
22test_hls.html
-
8test_mp4.php
-
8test_my_video.html
-
6test_ogg.php
@ -1,27 +0,0 @@ |
|||
<?php |
|||
require_once('lib/assembler.php'); |
|||
// Disable Direct access without login
|
|||
if($CUser->Data[id] < 2 ){ |
|||
header('location: /'); |
|||
exit(); |
|||
}; |
|||
UI_PageHeader(); |
|||
if( $RTL_SITE ){ |
|||
UI_Begin2Section(); |
|||
} else { |
|||
UI_Begin2Section('120px'); |
|||
UI_SideMenu(); |
|||
UI_SectionDelimiter(); |
|||
}; |
|||
if( $CUser->Data[id] > 1 ){ |
|||
//Main Content
|
|||
} else { |
|||
UI_LoginForm(); |
|||
}; |
|||
if( $RTL_SITE ){ |
|||
UI_SectionDelimiter('120px'); |
|||
UI_SideMenu(); |
|||
} |
|||
UI_End2Section(); |
|||
UI_PageBottom(); |
|||
?>
|
|||
Binary file not shown.
Binary file not shown.
12
ccal.php
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,43 +0,0 @@ |
|||
<html> |
|||
<head> |
|||
<title>Video Chat</title> |
|||
<script type="text/javascript"> |
|||
window.onload = function () { |
|||
|
|||
var transceiver = new MediaStreamTransceiver("ws://192.168.0.115:8080/delayswitch?sid=0"); |
|||
var videoDevice = document.getElementsByTagName("device")[0]; |
|||
|
|||
videoDevice.onchange = function (evt) { |
|||
var videoStream = videoDevice.data; |
|||
var selfView = document.getElementById("self_view"); |
|||
|
|||
// exclude audio from the self view |
|||
selfView.src = videoStream.url + "#video"; |
|||
selfView.play(); |
|||
|
|||
// set the stream to share |
|||
transceiver.localStream = videoStream; |
|||
}; |
|||
|
|||
transceiver.onconnect = function () { |
|||
var remoteVideo = document.getElementById("remote_video"); |
|||
|
|||
// play the incoming stream |
|||
remoteVideo.src = transceiver.remoteStream.url; |
|||
remoteVideo.play(); |
|||
}; |
|||
} |
|||
</script> |
|||
</head> |
|||
<body> |
|||
<div><device type="media"></div> |
|||
<div style="float:left"> |
|||
<p>Self-view:</p> |
|||
<video width="320" height="240" id="self_view"></video> |
|||
</div> |
|||
<div style="float:left"> |
|||
<p>Remote video:</p> |
|||
<video width="320" height="240" id="remote_video"></video> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
@ -1,49 +0,0 @@ |
|||
<html> |
|||
<head> |
|||
<title>Streamer</title> |
|||
</head> |
|||
<body> |
|||
https://github.com/mpromonet/webrtc-streamer |
|||
https://medium.com/@alexcambose/webcam-live-streaming-with-websockets-and-base64-64b1b4992db8 |
|||
chrome://flags/#unsafely-treat-insecure-origin-as-secure |
|||
https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API |
|||
https://www.tutorialspoint.com/webrtc/webrtc_media_stream_apis.htm |
|||
https://webrtc.github.io/samples/ |
|||
https://phoboslab.org/log/2013/09/html5-live-video-streaming-via-websockets |
|||
https://github.com/phoboslab/jsmpeg |
|||
https://stackoverflow.com/questions/4241992/video-streaming-over-websockets-using-javascript |
|||
https://chromium.googlesource.com/chromium/src/+/master/net/server/web_socket_encoder.cc |
|||
https://tools.ietf.org/html/rfc7692#page-12 |
|||
https://tools.ietf.org/html/rfc6455#section-4.2.2 |
|||
https://habr.com/ru/company/ruvds/blog/342346/ |
|||
https://github.com/liwf616/awesome-live-stream |
|||
https://github.com/auscaster/webrtc-native-to-browser-peerconnection-example/blob/master/peerconnection/server/main.cc |
|||
<video autoplay></video> |
|||
<script> |
|||
// get video dom element |
|||
const video = document.querySelector('video'); |
|||
|
|||
// request access to webcam |
|||
navigator.mediaDevices.getUserMedia({video: {width: 426, height: 240}}).then((stream) => video.srcObject = stream); |
|||
|
|||
// returns a frame encoded in base64 |
|||
const getFrame = () => { |
|||
const canvas = document.createElement('canvas'); |
|||
canvas.width = video.videoWidth; |
|||
canvas.height = video.videoHeight; |
|||
canvas.getContext('2d').drawImage(video, 0, 0); |
|||
const data = canvas.toDataURL('image/png'); |
|||
return data; |
|||
} |
|||
const WS_URL = 'ws://192.168.0.115:8080'; |
|||
const FPS = 3; |
|||
const ws = new WebSocket(WS_URL); |
|||
ws.onopen = () => { |
|||
console.log(`Connected to ${WS_URL}`); |
|||
setInterval(() => { |
|||
ws.send(getFrame()); |
|||
}, 1000 / FPS); |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -1,60 +0,0 @@ |
|||
<!doctype html> |
|||
|
|||
<html lang="en"> |
|||
<head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<title>Capture Web camera image using WebcamJS and PHP - Theonlytutorials.com</title> |
|||
<style type="text/css"> |
|||
body { font-family: Helvetica, sans-serif; } |
|||
h2, h3 { margin-top:0; } |
|||
form { margin-top: 15px; } |
|||
form > input { margin-right: 15px; } |
|||
#results { float:right; margin:20px; padding:20px; border:1px solid; background:#ccc; } |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<div id="results">Your captured image will appear here...</div> |
|||
|
|||
<h1>Capture Web camera image using WebcamJS and PHP - Theonlytutorials.com</h1> |
|||
<h3>Demonstrates simple 600x460 capture & display</h3> |
|||
|
|||
<div id="my_camera"></div> |
|||
|
|||
<!-- First, include the Webcam.js JavaScript Library --> |
|||
<script type="text/javascript" src="/lib/javascript/webcam/webcam.js"></script> |
|||
|
|||
<!-- Configure a few settings and attach camera --> |
|||
<script language="JavaScript"> |
|||
Webcam.set({ |
|||
width: 600, |
|||
height: 460, |
|||
image_format: 'jpeg', |
|||
jpeg_quality: 90 |
|||
}); |
|||
Webcam.attach( '#my_camera' ); |
|||
</script> |
|||
|
|||
<!-- A button for taking snaps --> |
|||
<form> |
|||
<input type=button value="Take Snapshot" onClick="take_snapshot()"> |
|||
</form> |
|||
|
|||
<!-- Code to handle taking the snapshot and displaying it locally --> |
|||
<script language="JavaScript"> |
|||
function take_snapshot() { |
|||
// take snapshot and get image data |
|||
Webcam.snap( function(data_uri) { |
|||
// display results in page |
|||
|
|||
|
|||
Webcam.upload( data_uri, 'saveimage.php', function(code, text) { |
|||
document.getElementById('results').innerHTML = |
|||
'<h2>Here is your image:</h2>' + |
|||
'<img src="'+text+'"/>'; |
|||
} ); |
|||
} ); |
|||
} |
|||
</script> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -1,50 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
|
|||
<meta charset="utf-8"> |
|||
<title>Unreal Media Server WebRTC player</title> |
|||
|
|||
<script src="/lib/javascript/unrealmedia/webrtcadapter.js"></script> |
|||
<script src="/lib/javascript/unrealmedia/unrealwebrtcplayer2.js"></script> |
|||
|
|||
<script type="text/javascript"> |
|||
|
|||
var webrtcPlayer = null; |
|||
|
|||
</script> |
|||
|
|||
</head> |
|||
|
|||
<body> |
|||
|
|||
<div id="container" align="center"> |
|||
|
|||
Unreal Media Server WebRTC player<br><br>This player plays live near real time audio/video on any OS and mobile device, in all major browsers. This is original H264 video encoded by IP camera; server doesn't do any transcoding.<br><br> |
|||
|
|||
<video style="background-color:black" id="remoteVideo" width="800" height="450" autoplay playsinline controls muted></video> |
|||
|
|||
<script type="text/javascript"> |
|||
|
|||
//Parameters: |
|||
|
|||
//1. ID of video element. |
|||
//2. Alias of the live broadcast; video encoding supported: H264(AVC1), VP8, VP9; audio encoding supported: opus, G.711(PCMA/PCMU). |
|||
//3. Secure token for session based authentication, leave empty if none. Should not be used unless Media Server and Web Server run on different domains. |
|||
//4. IP address of Unreal Media Server. If you specify domain name (domain name must be used for signaling over secure websocket) AND your server is behind NAT, then you need to make a change in unrealwebrtcplayer.js, described in http://www.umediaserver.net/phpBB3/viewtopic.php?f=29&t=3563 |
|||
//5. Main port of Unreal Media Server for signaling over websocket (by default, 5119 for unsecure webscokets / 443 for secure websockets). Make sure these ports are open in the firewall. |
|||
//6. Use secure websocket for signaling; if true, make sure to set the port to secure port (443 by default) and configure SSL certificate in Unreal Media Server. If this parameter is false and this webpage is loaded under https:// then browsers will display "mixed content" warning; you will need to allow mixed content in your browser. |
|||
//7. Use single central port for actual WebRTC ICE connection. If true, the web browser will receive streaming media from predefined single port in Unreal Media Server, dedicated to WebRTC connections (by default 5135). If true, you only need to open port 5135 in firewall/NAT router for Unreal Media Server (together with signaling ports, 5119 or 443). If false, the WebRTC connection will be made over a random port; you will need to open all ports in the firewall, or add Unreal Media Server as an allowed app in the firewall. |
|||
//8. WebRTC transport protocol. Set to "udp" or "tcp". The central port can be used for both udp and tcp. |
|||
|
|||
webrtcPlayer = new UnrealWebRTCPlayer("remoteVideo", "livedemocam", "", "192.168.0.115", "8080", false, true, "tcp"); |
|||
|
|||
//Comment out next line not to start playing when webpage loads. Then user will need to click on Play button to play; you may want to use a video element with overlayed Play button - check out our SDK for sample webpages. |
|||
webrtcPlayer.Play(); //Start playing automatically when webpage loads. Notice that video element has a "muted" attribute; this is video-only stream anyway. A muted attribute helps to overcome Chrome's autoplay policy, and is not always needed, as described in http://www.umediaserver.net/phpBB3/viewtopic.php?f=29&t=3578 |
|||
|
|||
</script> |
|||
|
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -1,50 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
|
|||
<meta charset="utf-8"> |
|||
<title>Unreal Media Server WebRTC player</title> |
|||
|
|||
<script src="/lib/javascript/unrealmedia/webrtcadapter.js"></script> |
|||
<script src="/lib/javascript/unrealmedia/unrealwebrtcplayer.js"></script> |
|||
|
|||
<script type="text/javascript"> |
|||
|
|||
var webrtcPlayer = null; |
|||
|
|||
</script> |
|||
|
|||
</head> |
|||
|
|||
<body> |
|||
|
|||
<div id="container" align="center"> |
|||
|
|||
Unreal Media Server WebRTC player<br><br>This player plays live near real time audio/video on any OS and mobile device, in all major browsers. This is original H264 video encoded by IP camera; server doesn't do any transcoding.<br><br> |
|||
|
|||
<video style="background-color:black" id="remoteVideo" width="800" height="450" autoplay playsinline controls muted></video> |
|||
|
|||
<script type="text/javascript"> |
|||
|
|||
//Parameters: |
|||
|
|||
//1. ID of video element. |
|||
//2. Alias of the live broadcast; video encoding supported: H264(AVC1), VP8, VP9; audio encoding supported: opus, G.711(PCMA/PCMU). |
|||
//3. Secure token for session based authentication, leave empty if none. Should not be used unless Media Server and Web Server run on different domains. |
|||
//4. IP address of Unreal Media Server. If you specify domain name (domain name must be used for signaling over secure websocket) AND your server is behind NAT, then you need to make a change in unrealwebrtcplayer.js, described in http://www.umediaserver.net/phpBB3/viewtopic.php?f=29&t=3563 |
|||
//5. Main port of Unreal Media Server for signaling over websocket (by default, 5119 for unsecure webscokets / 443 for secure websockets). Make sure these ports are open in the firewall. |
|||
//6. Use secure websocket for signaling; if true, make sure to set the port to secure port (443 by default) and configure SSL certificate in Unreal Media Server. If this parameter is false and this webpage is loaded under https:// then browsers will display "mixed content" warning; you will need to allow mixed content in your browser. |
|||
//7. Use single central port for actual WebRTC ICE connection. If true, the web browser will receive streaming media from predefined single port in Unreal Media Server, dedicated to WebRTC connections (by default 5135). If true, you only need to open port 5135 in firewall/NAT router for Unreal Media Server (together with signaling ports, 5119 or 443). If false, the WebRTC connection will be made over a random port; you will need to open all ports in the firewall, or add Unreal Media Server as an allowed app in the firewall. |
|||
//8. WebRTC transport protocol. Set to "udp" or "tcp". The central port can be used for both udp and tcp. |
|||
|
|||
webrtcPlayer = new UnrealWebRTCPlayer("remoteVideo", "livedemocam", "", "65.23.154.147", "80", false, true, "tcp"); |
|||
|
|||
//Comment out next line not to start playing when webpage loads. Then user will need to click on Play button to play; you may want to use a video element with overlayed Play button - check out our SDK for sample webpages. |
|||
webrtcPlayer.Play(); //Start playing automatically when webpage loads. Notice that video element has a "muted" attribute; this is video-only stream anyway. A muted attribute helps to overcome Chrome's autoplay policy, and is not always needed, as described in http://www.umediaserver.net/phpBB3/viewtopic.php?f=29&t=3578 |
|||
|
|||
</script> |
|||
|
|||
</div> |
|||
|
|||
</body> |
|||
</html> |
|||
@ -1,63 +0,0 @@ |
|||
<html> |
|||
<head> |
|||
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script> |
|||
<!-- Or if you want a more recent canary version --> |
|||
<!-- <script src="https://cdn.jsdelivr.net/npm/hls.js@canary"></script> --> |
|||
<script> |
|||
var video = document.getElementById('video'); |
|||
if( Hls.isSupported()) { |
|||
alert("HLS is OK"); |
|||
var hls = new Hls(); |
|||
hls.loadSource('https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8'); |
|||
hls.attachMedia(video); |
|||
hls.on(Hls.Events.MANIFEST_PARSED,function() { |
|||
video.play(); |
|||
}); |
|||
} |
|||
// hls.js is not supported on platforms that do not have Media Source Extensions (MSE) enabled. |
|||
// When the browser has built-in HLS support (check using `canPlayType`), we can provide an HLS manifest (i.e. .m3u8 URL) directly to the video element through the `src` property. |
|||
// This is using the built-in support of the plain video element, without using hls.js. |
|||
// Note: it would be more normal to wait on the 'canplay' event below however on Safari (where you are most likely to find built-in HLS support) the video.src URL must be on the user-driven |
|||
// white-list before a 'canplay' event will be emitted; the last video event that can be reliably listened-for when the URL is not on the white-list is 'loadedmetadata'. |
|||
else if (video.canPlayType('application/vnd.apple.mpegurl')) { |
|||
video.src = 'https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8'; |
|||
video.addEventListener('loadedmetadata',function() { |
|||
video.play(); |
|||
}); |
|||
}; |
|||
var socket; |
|||
function start_connection(){ |
|||
var socket = new WebSocket('ws://192.168.0.115:8080/koko/shmoko/zuzu?ID=2323089034'); |
|||
socket.onopen = function() { alert("Connection opened...") }; |
|||
socket.onclose = function() { |
|||
alert("Connection closed..."); |
|||
socket = null; |
|||
}; |
|||
socket.onopen = function(event) { |
|||
socket.send('Some message') |
|||
}; |
|||
socket.onmessage = function(event) { |
|||
var message = event.data; |
|||
alert( 'Resived:' + message ); |
|||
}; |
|||
}; |
|||
function chucha(){ |
|||
//var mimeCodec = 'video/mp4; codecs="avc1.4D401F"'; |
|||
var mimeCodec = 'video/mp4; codecs="avc1.64001E"' |
|||
if (MediaSource.isTypeSupported(mimeCodec)) { |
|||
// Create Media Source |
|||
var mediaSource = new MediaSource(); // mediaSource.readyState === 'closed' |
|||
alert('Codec OK'); |
|||
} else { |
|||
alert("Unsupported media format"); |
|||
} |
|||
}; |
|||
</script> |
|||
</head> |
|||
<body> |
|||
<input type="button" onclick="start_connection();" value="Connect"> |
|||
<input type="button" onclick="chucha();" value="Check Codec"> |
|||
<video id="video" controls ></video> |
|||
</video> |
|||
</body> |
|||
</html> |
|||
@ -1,27 +0,0 @@ |
|||
<?php |
|||
require_once('lib/assembler.php'); |
|||
// Disable Direct access without login
|
|||
if($CUser->Data[id] < 2 ){ |
|||
header('location: /'); |
|||
exit(); |
|||
}; |
|||
UI_PageHeader(); |
|||
if( $RTL_SITE ){ |
|||
UI_Begin2Section(); |
|||
} else { |
|||
UI_Begin2Section('120px'); |
|||
UI_SideMenu(); |
|||
UI_SectionDelimiter(); |
|||
}; |
|||
if( $CUser->Data[id] > 1 ){ |
|||
//Main Content
|
|||
} else { |
|||
UI_LoginForm(); |
|||
}; |
|||
if( $RTL_SITE ){ |
|||
UI_SectionDelimiter('120px'); |
|||
UI_SideMenu(); |
|||
} |
|||
UI_End2Section(); |
|||
UI_PageBottom(); |
|||
?>
|
|||
@ -1,34 +1,21 @@ |
|||
<?php |
|||
require_once('lib/assembler.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
UI_PageHeaderExt( |
|||
'rgoose_general.js', |
|||
array('rgoose_timeline.js','rgoose_camera_editor.js','rgoose_mediaserver_module.js','rgoose_sysmap_editor.js','rgoose_location_editor.js','rgoose_dashboard.js','rgoose_main.js', 'rgoose_devices_module.js') |
|||
); |
|||
if( $CUser->Data['access'] > 5 ){ |
|||
UI_PageHeaderExt( |
|||
'rgoose_general.js', |
|||
array('rgoose_timeline.js','rgoose_camera_editor.js','rgoose_mediaserver_module.js','rgoose_sysmap_editor.js','rgoose_location_editor.js','rgoose_dashboard.js', 'rgoose_devices_module.js', 'rgoose_users.js', 'rgoose_logs.js', 'rgoose_main.js') |
|||
); |
|||
} else { |
|||
UI_PageHeaderExt( |
|||
'rgoose_general.js', |
|||
array('rgoose_timeline.js', 'rgoose_dashboard.js','rgoose_main.js' ) |
|||
); |
|||
}; |
|||
UI_PageBottomExt(); |
|||
} else { |
|||
UI_PageHeader(); |
|||
//if( $RTL_SITE ){
|
|||
// UI_Begin2Section();
|
|||
//} else {
|
|||
// UI_Begin2Section('120px');
|
|||
// UI_SideMenu();
|
|||
// UI_SectionDelimiter();
|
|||
//};
|
|||
//Main Content
|
|||
//if( $CUser->Data[id] > 1 ){
|
|||
// UI_MainDashBoard();
|
|||
//} else {
|
|||
UI_LoginForm(); |
|||
//};
|
|||
|
|||
//if( $RTL_SITE ){
|
|||
// UI_SectionDelimiter('120px');
|
|||
// UI_SideMenu();
|
|||
//}
|
|||
// UI_End2Section();
|
|||
UI_LoginForm(); |
|||
UI_PageBottom(); |
|||
}; |
|||
|
|||
|
|||
?>
|
|||
@ -1,6 +0,0 @@ |
|||
<?php |
|||
|
|||
|
|||
phpinfo(); |
|||
|
|||
?>
|
|||
Binary file not shown.
@ -0,0 +1,10 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 5 ){ |
|||
if( $FID = fopen("data/server.log", "r")){ |
|||
fclose($FID); |
|||
}; |
|||
} else { |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,88 @@ |
|||
{ |
|||
id: 'db_node_%%%NODEID%%%', |
|||
width: 258, |
|||
height: 320, |
|||
title: '%%%NODENAME%%%', |
|||
listeners:{ |
|||
afterrender: function(){ |
|||
cleanupDraw( %%%NODEID%%% ); |
|||
drawZoomLevels[%%%NODEID%%%]=100; |
|||
} |
|||
}, |
|||
items:[{ |
|||
html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none;" width="200" height="210"></canvas></center>', |
|||
height: '260px' |
|||
},{ |
|||
id: 'status_%%%NODEID%%%', |
|||
border: true, |
|||
frame: true, |
|||
height: 36, |
|||
html: '' |
|||
}], |
|||
bbar:[{ |
|||
xtype: 'button', |
|||
text: '12.5%', |
|||
enableToggle: true, |
|||
id: 'zoom_bt12_%%%NODEID%%%', |
|||
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
|||
toggleHandler: function( bt, st ){ |
|||
if( st ){ |
|||
drawZoomLevels[%%%NODEID%%%]=12; |
|||
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
|||
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=12"; |
|||
img.onload = function(){ |
|||
cleanupDraw( %%%NODEID%%% ); |
|||
}; |
|||
}; |
|||
} |
|||
},{ |
|||
xtype: 'button', |
|||
text: '25%', |
|||
enableToggle: true, |
|||
id: 'zoom_bt25_%%%NODEID%%%', |
|||
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
|||
toggleHandler: function( bt, st ){ |
|||
if( st ){ |
|||
drawZoomLevels[%%%NODEID%%%]=25; |
|||
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
|||
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=25"; |
|||
img.onload = function(){ |
|||
cleanupDraw( %%%NODEID%%% ); |
|||
}; |
|||
}; |
|||
} |
|||
},{ |
|||
xtype: 'button', |
|||
text: '50%', |
|||
enableToggle: true, |
|||
id: 'zoom_bt50_%%%NODEID%%%', |
|||
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
|||
toggleHandler: function( bt, st ){ |
|||
if( st ){ |
|||
drawZoomLevels[%%%NODEID%%%]=50; |
|||
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
|||
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=50"; |
|||
img.onload = function(){ |
|||
cleanupDraw( %%%NODEID%%% ); |
|||
}; |
|||
}; |
|||
} |
|||
},{ |
|||
xtype: 'button', |
|||
text: '100%', |
|||
pressed: true, |
|||
enableToggle: true, |
|||
id: 'zoom_bt100_%%%NODEID%%%', |
|||
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
|||
toggleHandler: function( bt, st ){ |
|||
if( st ){ |
|||
drawZoomLevels[%%%NODEID%%%]=100; |
|||
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
|||
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100"; |
|||
img.onload = function(){ |
|||
cleanupDraw( %%%NODEID%%% ); |
|||
}; |
|||
}; |
|||
} |
|||
}] |
|||
} |
|||
@ -0,0 +1,39 @@ |
|||
<?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']; |
|||
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 ); |
|||
?>
|
|||
@ -1,219 +1,220 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); |
|||
header("Cache-Control: post-check=0, pre-check=0", false); |
|||
header("Pragma: no-cache"); |
|||
header("Content-Type: image/png"); |
|||
if(isset( $_POST['NID'] )){ |
|||
$NID = intval($_POST['NID']); |
|||
} else { |
|||
$NID = intval($_GET['NID']); |
|||
}; |
|||
if(isset( $_POST['AUX'] )){ |
|||
$AUX = intval($_POST['AUX']); |
|||
} else { |
|||
$AUX = intval($_GET['AUX']); |
|||
}; |
|||
$QS = "SELECT * FROM lrf_draw WHERE node_id={$NID} ORDER BY ts DESC LIMIT 1"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
if( count( $Result ) ){ |
|||
if( $Result[0]['rendered'] == 'Y' ){ |
|||
if( $AUX ){ |
|||
$FN = "data/{$Result[0]['md5']}_{$AUX}.png"; |
|||
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); |
|||
header("Cache-Control: post-check=0, pre-check=0", false); |
|||
header("Pragma: no-cache"); |
|||
header("Content-Type: image/png"); |
|||
if(isset( $_POST['NID'] )){ |
|||
$NID = intval($_POST['NID']); |
|||
} else { |
|||
$FN = "data/{$Result[0]['md5']}_100.png"; |
|||
$NID = intval($_GET['NID']); |
|||
}; |
|||
} else { |
|||
$FF = "data/{$Result[0]['md5']}.raw"; |
|||
$FN = "ddd"; |
|||
if( file_exists( $FF ) ) { |
|||
$FD = fopen( $FF, "rb" ); |
|||
if( $FD ){ |
|||
$CL = fread( $FD, 4 ); |
|||
$size = unpack( "V", $CL ); |
|||
$pts = array(); |
|||
$as = $size[1]; |
|||
for($i=0; $i< $as; $i++ ){ |
|||
$CL = fread( $FD, 4 ); |
|||
$T = unpack( "V", $CL ); |
|||
//print_r( $T );
|
|||
$pts[] = $T[1] >> 16; |
|||
}; |
|||
fclose( $FD ); |
|||
$QS = "SELECT ls.base_shift, ls.max_range FROM nodes ns LEFT JOIN lrf_sensors ls ON ( ls.id=ns.aux_id ) WHERE ns.id={$NID}"; |
|||
$PP = $DATABASE->Query( $QS ); |
|||
$stp = 2.0 * ( M_PI / $as ); |
|||
$MR = intval( $PP[0]['max_range'] ); |
|||
$S = ( M_PI / 3000.0 ) * intval( $PP[0]['base_shift'] ); |
|||
if(isset( $_POST['AUX'] )){ |
|||
$AUX = intval($_POST['AUX']); |
|||
} elseif( isset($_GET['AUX']) ) { |
|||
$AUX = intval($_GET['AUX']); |
|||
} else $AUX = 0; |
|||
|
|||
$IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_100.png"); |
|||
imagesavealpha( $IM, true ); |
|||
$bg = imagecolorallocate($IM, 0, 0, 0); |
|||
$black = imagecolorallocate($IM, 255, 255, 0); |
|||
//$green = imagecolorallocate($IM, 0, 255, 0);
|
|||
$green = imagecolorallocatealpha( $IM, 0, 255, 0, 64 ); |
|||
imagefilledrectangle( $IM, 5, 5, 36, 18, $bg ); |
|||
imagestring( $IM, 2, 6, 5, $MR . "m.", $black ); |
|||
$maxR = 98.0; |
|||
$rst = $maxR / 1025.0; |
|||
$x0 = 100; |
|||
$y0 = 100; |
|||
$ppA = array(); |
|||
$ppB = array(); |
|||
for( $i=0; $i< $as; $i++ ){ |
|||
if( $pts[$i] > 0 ){ |
|||
$cr = ($rst * $pts[$i]); |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $cr * cos( $ca ); |
|||
$ppA[] = $y0 + $cr * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
} else { |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $maxR * cos( $ca ); |
|||
$ppA[] = $y0 + $maxR * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
}; |
|||
}; |
|||
$ppB[] = $ppA[count($ppA)-2]; |
|||
$ppB[] = $ppA[count($ppA)-1]; |
|||
$popo = array_merge( $ppA, $ppB ); |
|||
imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green ); |
|||
imagepng( $IM, "data/{$Result[0]['md5']}_100.png" ); |
|||
imagedestroy( $IM ); |
|||
|
|||
$IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_50.png"); |
|||
imagesavealpha( $IM, true ); |
|||
$bg = imagecolorallocate($IM, 0, 0, 0); |
|||
$black = imagecolorallocate($IM, 255, 255, 0); |
|||
//$green = imagecolorallocate($IM, 0, 255, 0);
|
|||
$green = imagecolorallocatealpha( $IM, 0, 255, 0, 64 ); |
|||
imagefilledrectangle( $IM, 5, 5, 36, 18, $bg ); |
|||
imagestring( $IM, 2, 6, 5, ( $MR / 2 ) . "m.", $black ); |
|||
$rst = $maxR / 513.0; |
|||
$ppA = array(); |
|||
$ppB = array(); |
|||
for( $i=0; $i< $as; $i++ ){ |
|||
if( $pts[$i] > 0 && $pts[$i] < 513 ){ |
|||
$cr = ($rst * $pts[$i]); |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $cr * cos( $ca ); |
|||
$ppA[] = $y0 + $cr * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
} else { |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $maxR * cos( $ca ); |
|||
$ppA[] = $y0 + $maxR * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
}; |
|||
}; |
|||
$ppB[] = $ppA[count($ppA)-2]; |
|||
$ppB[] = $ppA[count($ppA)-1]; |
|||
$popo = array_merge( $ppA, $ppB ); |
|||
imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green ); |
|||
imagepng( $IM, "data/{$Result[0]['md5']}_50.png" ); |
|||
imagedestroy( $IM ); |
|||
|
|||
$IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_25.png"); |
|||
imagesavealpha( $IM, true ); |
|||
$bg = imagecolorallocate($IM, 0, 0, 0); |
|||
$black = imagecolorallocate($IM, 255, 255, 0); |
|||
//$green = imagecolorallocate($IM, 0, 255, 0);
|
|||
$green = imagecolorallocatealpha( $IM, 0, 255, 0, 64 ); |
|||
imagefilledrectangle( $IM, 5, 5, 36, 18, $bg ); |
|||
imagestring( $IM, 2, 6, 5, ( $MR / 4 ) . "m.", $black ); |
|||
$rst = $maxR / 257.0; |
|||
$ppA = array(); |
|||
$ppB = array(); |
|||
for( $i=0; $i< $as; $i++ ){ |
|||
if( $pts[$i] > 0 && $pts[$i] < 256 ){ |
|||
$cr = ($rst * $pts[$i]); |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $cr * cos( $ca ); |
|||
$ppA[] = $y0 + $cr * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
} else { |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $maxR * cos( $ca ); |
|||
$ppA[] = $y0 + $maxR * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
}; |
|||
}; |
|||
$ppB[] = $ppA[count($ppA)-2]; |
|||
$ppB[] = $ppA[count($ppA)-1]; |
|||
$popo = array_merge( $ppA, $ppB ); |
|||
imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green ); |
|||
imagepng( $IM, "data/{$Result[0]['md5']}_25.png" ); |
|||
imagedestroy( $IM ); |
|||
|
|||
$IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_12.png"); |
|||
imagesavealpha( $IM, true ); |
|||
$bg = imagecolorallocate($IM, 0, 0, 0); |
|||
$black = imagecolorallocate($IM, 255, 255, 0); |
|||
//$green = imagecolorallocate($IM, 0, 255, 0);
|
|||
$green = imagecolorallocatealpha( $IM, 0, 255, 0, 64 ); |
|||
imagefilledrectangle( $IM, 5, 5, 36, 18, $bg ); |
|||
imagestring( $IM, 2, 6, 5, ( $MR / 8 ) . "m.", $black ); |
|||
$rst = $maxR / 129.0; |
|||
$ppA = array(); |
|||
$ppB = array(); |
|||
for( $i=0; $i< $as; $i++ ){ |
|||
if( $pts[$i] > 0 && $pts[$i] < 128 ){ |
|||
$cr = ($rst * $pts[$i]); |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $cr * cos( $ca ); |
|||
$ppA[] = $y0 + $cr * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
} else { |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $maxR * cos( $ca ); |
|||
$ppA[] = $y0 + $maxR * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
}; |
|||
$QS = "SELECT * FROM lrf_draw WHERE node_id={$NID} ORDER BY ts DESC LIMIT 1"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
if( count( $Result ) ){ |
|||
if( $Result[0]['rendered'] == 'Y' ){ |
|||
if( $AUX ){ |
|||
$FN = "data/device_draws/{$Result[0]['md5']}_{$AUX}.png"; |
|||
} else { |
|||
$FN = "data/device_draws/{$Result[0]['md5']}_100.png"; |
|||
}; |
|||
} else { |
|||
$FF = "data/device_draws/{$Result[0]['md5']}.raw"; |
|||
$FN = "ddd"; |
|||
if( file_exists( $FF ) ) { |
|||
$FD = fopen( $FF, "rb" ); |
|||
if( $FD ){ |
|||
$CL = fread( $FD, 4 ); |
|||
$size = unpack( "V", $CL ); |
|||
$pts = array(); |
|||
$as = $size[1]; |
|||
for($i=0; $i< $as; $i++ ){ |
|||
$CL = fread( $FD, 4 ); |
|||
$T = unpack( "V", $CL ); |
|||
//print_r( $T );
|
|||
$pts[] = $T[1] >> 16; |
|||
}; |
|||
fclose( $FD ); |
|||
$QS = "SELECT ls.base_shift, ls.max_range FROM nodes ns LEFT JOIN lrf_sensors ls ON ( ls.id=ns.aux_id ) WHERE ns.id={$NID}"; |
|||
$PP = $DATABASE->Query( $QS ); |
|||
$stp = 2.0 * ( M_PI / $as ); |
|||
$MR = intval( $PP[0]['max_range'] ); |
|||
$S = ( M_PI / 3000.0 ) * intval( $PP[0]['base_shift'] ); |
|||
|
|||
$IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_100.png"); |
|||
imagesavealpha( $IM, true ); |
|||
$bg = imagecolorallocate($IM, 0, 0, 0); |
|||
$black = imagecolorallocate($IM, 255, 255, 0); |
|||
//$green = imagecolorallocate($IM, 0, 255, 0);
|
|||
$green = imagecolorallocatealpha( $IM, 0, 64, 0, 64 ); |
|||
imagefilledrectangle( $IM, 5, 5, 36, 18, $bg ); |
|||
imagestring( $IM, 2, 6, 5, $MR . "m.", $black ); |
|||
$maxR = 98.0; |
|||
$rst = $maxR / 1025.0; |
|||
$x0 = 100; |
|||
$y0 = 100; |
|||
$ppA = array(); |
|||
$ppB = array(); |
|||
for( $i=0; $i< $as; $i++ ){ |
|||
if( $pts[$i] > 0 ){ |
|||
$cr = ($rst * $pts[$i]); |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $cr * cos( $ca ); |
|||
$ppA[] = $y0 + $cr * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
} else { |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $maxR * cos( $ca ); |
|||
$ppA[] = $y0 + $maxR * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
}; |
|||
}; |
|||
$ppB[] = $ppA[count($ppA)-2]; |
|||
$ppB[] = $ppA[count($ppA)-1]; |
|||
$popo = array_merge( $ppA, $ppB ); |
|||
imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green ); |
|||
imagepng( $IM, "data/device_draws/{$Result[0]['md5']}_100.png" ); |
|||
imagedestroy( $IM ); |
|||
|
|||
$IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_50.png"); |
|||
imagesavealpha( $IM, true ); |
|||
$bg = imagecolorallocate($IM, 0, 0, 0); |
|||
$black = imagecolorallocate($IM, 255, 255, 0); |
|||
//$green = imagecolorallocate($IM, 0, 255, 0);
|
|||
$green = imagecolorallocatealpha( $IM, 0, 64, 0, 64 ); |
|||
imagefilledrectangle( $IM, 5, 5, 36, 18, $bg ); |
|||
imagestring( $IM, 2, 6, 5, ( $MR / 2 ) . "m.", $black ); |
|||
$rst = $maxR / 513.0; |
|||
$ppA = array(); |
|||
$ppB = array(); |
|||
for( $i=0; $i< $as; $i++ ){ |
|||
if( $pts[$i] > 0 && $pts[$i] < 513 ){ |
|||
$cr = ($rst * $pts[$i]); |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $cr * cos( $ca ); |
|||
$ppA[] = $y0 + $cr * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
} else { |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $maxR * cos( $ca ); |
|||
$ppA[] = $y0 + $maxR * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
}; |
|||
}; |
|||
$ppB[] = $ppA[count($ppA)-2]; |
|||
$ppB[] = $ppA[count($ppA)-1]; |
|||
$popo = array_merge( $ppA, $ppB ); |
|||
imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green ); |
|||
imagepng( $IM, "data/device_draws/{$Result[0]['md5']}_50.png" ); |
|||
imagedestroy( $IM ); |
|||
|
|||
$IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_25.png"); |
|||
imagesavealpha( $IM, true ); |
|||
$bg = imagecolorallocate($IM, 0, 0, 0); |
|||
$black = imagecolorallocate($IM, 255, 255, 0); |
|||
//$green = imagecolorallocate($IM, 0, 255, 0);
|
|||
$green = imagecolorallocatealpha( $IM, 0, 64, 0, 64 ); |
|||
imagefilledrectangle( $IM, 5, 5, 36, 18, $bg ); |
|||
imagestring( $IM, 2, 6, 5, ( $MR / 4 ) . "m.", $black ); |
|||
$rst = $maxR / 257.0; |
|||
$ppA = array(); |
|||
$ppB = array(); |
|||
for( $i=0; $i< $as; $i++ ){ |
|||
if( $pts[$i] > 0 && $pts[$i] < 256 ){ |
|||
$cr = ($rst * $pts[$i]); |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $cr * cos( $ca ); |
|||
$ppA[] = $y0 + $cr * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
} else { |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $maxR * cos( $ca ); |
|||
$ppA[] = $y0 + $maxR * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
}; |
|||
}; |
|||
$ppB[] = $ppA[count($ppA)-2]; |
|||
$ppB[] = $ppA[count($ppA)-1]; |
|||
$popo = array_merge( $ppA, $ppB ); |
|||
imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green ); |
|||
imagepng( $IM, "data/device_draws/{$Result[0]['md5']}_25.png" ); |
|||
imagedestroy( $IM ); |
|||
|
|||
$IM = imagecreatefrompng("../../style/assets/lfs_draw_empty_12.png"); |
|||
imagesavealpha( $IM, true ); |
|||
$bg = imagecolorallocate($IM, 0, 0, 0); |
|||
$black = imagecolorallocate($IM, 255, 255, 0); |
|||
//$green = imagecolorallocate($IM, 0, 255, 0);
|
|||
$green = imagecolorallocatealpha( $IM, 0, 64, 0, 64 ); |
|||
imagefilledrectangle( $IM, 5, 5, 36, 18, $bg ); |
|||
imagestring( $IM, 2, 6, 5, ( $MR / 8 ) . "m.", $black ); |
|||
$rst = $maxR / 129.0; |
|||
$ppA = array(); |
|||
$ppB = array(); |
|||
for( $i=0; $i< $as; $i++ ){ |
|||
if( $pts[$i] > 0 && $pts[$i] < 128 ){ |
|||
$cr = ($rst * $pts[$i]); |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $cr * cos( $ca ); |
|||
$ppA[] = $y0 + $cr * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
} else { |
|||
$ca = 0.0 - ( $S + $i * $stp ); |
|||
$ppA[] = $x0 + $maxR * cos( $ca ); |
|||
$ppA[] = $y0 + $maxR * sin( $ca ); |
|||
$ppB[] = $x0 + $maxR * cos( $ca ); |
|||
$ppB[] = $y0 + $maxR * sin( $ca ); |
|||
}; |
|||
}; |
|||
$ppB[] = $ppA[count($ppA)-2]; |
|||
$ppB[] = $ppA[count($ppA)-1]; |
|||
$popo = array_merge( $ppA, $ppB ); |
|||
imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green ); |
|||
imagepng( $IM, "data/device_draws/{$Result[0]['md5']}_12.png" ); |
|||
imagedestroy( $IM ); |
|||
$QS = "UPDATE lrf_draw SET rendered='Y' WHERE id={$Result[0]['id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
if( $AUX ){ |
|||
$FN = "data/device_draws/{$Result[0]['md5']}_{$AUX}.png"; |
|||
} else { |
|||
$FN = "data/device_draws/{$Result[0]['md5']}_100.png"; |
|||
}; |
|||
}; |
|||
} else { |
|||
echo "No Res"; exit(); |
|||
if( $AUX ){ |
|||
$FN = "../../style/assets/lfs_draw_empty_{$AUX}.png"; |
|||
} else { |
|||
$FN = "../../style/assets/lfs_draw_empty_100.png"; |
|||
}; |
|||
}; |
|||
}; |
|||
$ppB[] = $ppA[count($ppA)-2]; |
|||
$ppB[] = $ppA[count($ppA)-1]; |
|||
$popo = array_merge( $ppA, $ppB ); |
|||
imagefilledpolygon( $IM, $popo, count( $popo ) / 2, $green ); |
|||
imagepng( $IM, "data/{$Result[0]['md5']}_12.png" ); |
|||
imagedestroy( $IM ); |
|||
$QS = "UPDATE lrf_draw SET rendered='Y' WHERE id={$Result[0]['id']}"; |
|||
$DATABASE->Query( $QS ); |
|||
if( !file_exists( $FN ) ) $FN = "../../style/assets/lfs_draw_empty_100.png"; |
|||
readfile( $FN ); |
|||
} else { |
|||
if( $AUX ){ |
|||
$FN = "data/{$Result[0]['md5']}_{$AUX}.png"; |
|||
$FN = "../../style/assets/lfs_draw_empty_{$AUX}.png"; |
|||
} else { |
|||
$FN = "data/{$Result[0]['md5']}_100.png"; |
|||
$FN = "../../style/assets/lfs_draw_empty_100.png"; |
|||
}; |
|||
}; |
|||
} else { |
|||
echo "No Res"; exit(); |
|||
if( $AUX ){ |
|||
$FN = "../../style/assets/lfs_draw_empty_{$AUX}.png"; |
|||
} else { |
|||
$FN = "../../style/assets/lfs_draw_empty_100.png"; |
|||
}; |
|||
if( !file_exists( $FN ) ) $FN = "../../style/assets/lfs_draw_empty_100.png"; |
|||
readfile( $FN ); |
|||
}; |
|||
}; |
|||
if( !file_exists( $FN ) ) $FN = "../../style/assets/lfs_draw_empty_100.png"; |
|||
readfile( $FN ); |
|||
} else { |
|||
if( $AUX ){ |
|||
$FN = "../../style/assets/lfs_draw_empty_{$AUX}.png"; |
|||
} else { |
|||
$FN = "../../style/assets/lfs_draw_empty_100.png"; |
|||
}; |
|||
if( !file_exists( $FN ) ) $FN = "../../style/assets/lfs_draw_empty_100.png"; |
|||
readfile( $FN ); |
|||
}; |
|||
} else { |
|||
header('location: /'); |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,62 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
require_once('../php/utm/gPoint.php'); |
|||
|
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$Data = array(); |
|||
$Data['evt'] = array(); |
|||
$Data['other'] = array(); |
|||
$SID = intval($_POST['SITE']); |
|||
//$QS = "SELECT ec.id, ec.lon, ec.lat, ls.lon as src_lon, ls.lat as src_lat, ls.max_range as max_range FROM events_cloud ec LEFT JOIN nodes nd ON ( nd.id = ec.node_id ) LEFT JOIN lrf_sensors ls ON ( ls.id = nd.aux_id ) WHERE ec.lat IS NOT NULL AND ec.lon IS NOT NULL ORDER BY ec.ts DESC, ec.ts_ms DESC LIMIT 20";
|
|||
$QS = "SELECT ec.id, ec.lon, ec.lat FROM events_cloud ec WHERE ec.lat IS NOT NULL AND ec.lon IS NOT NULL ORDER BY ec.ts DESC, ec.ts_ms DESC LIMIT 20"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
date_default_timezone_set('UTC'); |
|||
//foreach( array_reverse ( $Result ) as $CD ){
|
|||
foreach( $Result as $CD ){ |
|||
$Data['evt'][] = $CD; |
|||
}; |
|||
$QS = "SELECT * FROM target_filters WHERE site_id={$SID}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
foreach( $Result as $R ){ |
|||
switch( $R['type'] ){ |
|||
case 1:{ |
|||
//APF
|
|||
$QS = "SELECT * FROM `target_filter_apf` WHERE `id`={$R['aux_id']}"; |
|||
$Juno = $DATABASE->Query( $QS, false ); |
|||
if( count( $Juno ) ){ |
|||
$CC = $Juno[0]; |
|||
$A = new gPoint(); |
|||
$A->setLongLat($CC['lon'],$CC['lat']); |
|||
$A->convertLLtoTM(); |
|||
$XC = $A->E(); |
|||
$YC = $A->N(); |
|||
$Z = $A->Z(); |
|||
$ANG = (pi()/180)*floatval( $CC['yaw'] ); |
|||
$QS = "SELECT * FROM `target_filter_apf_boxes` WHERE `filter_id`={$R['aux_id']}"; |
|||
$Obubu = $DATABASE->Query( $QS, false ); |
|||
foreach( $Obubu as $G ){ |
|||
$P['type']='circle'; |
|||
$P['color']='#00FF00'; |
|||
$TX = floatval($G['x']); |
|||
$TY = floatval($G['y']); |
|||
$CR = sqrt($TX*$TX+$TY*$TY); |
|||
if( $TX != 0 ){ |
|||
$CA = atan( $TY/$TX ); |
|||
} else { |
|||
$CA = 0; |
|||
}; |
|||
$A->setUTM($XC+$CR*cos($CA+$ANG),$YC+$CR*sin($CA+$ANG),$Z); |
|||
$A->convertTMtoLL(); |
|||
$P['loc']=array('lat'=>$A->Lat(),'lon'=>$A->Long()); |
|||
$Data['other'][] = $P; |
|||
}; |
|||
}; |
|||
break; |
|||
}; |
|||
}; |
|||
}; |
|||
echo json_encode( $Data ); |
|||
} else { |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,456 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
require_once('../php/utm/gPoint.php'); |
|||
/* |
|||
function ToLL($north, $east, $utmZone){ |
|||
|
|||
// This is the lambda knot value in the reference
|
|||
$LngOrigin = Deg2Rad($utmZone * 6 - 183); |
|||
|
|||
// The following set of class constants define characteristics of the
|
|||
// ellipsoid, as defined my the WGS84 datum. These values need to be
|
|||
// changed if a different dataum is used.
|
|||
|
|||
$FalseNorth = 0; // South or North?
|
|||
//if (lat < 0.) FalseNorth = 10000000. // South or North?
|
|||
//else FalseNorth = 0.
|
|||
|
|||
$Ecc = 0.081819190842622; // Eccentricity
|
|||
$EccSq = $Ecc * $Ecc; |
|||
$Ecc2Sq = $EccSq / (1. - $EccSq); |
|||
$Ecc2 = sqrt($Ecc2Sq); // Secondary eccentricity
|
|||
$E1 = ( 1 - sqrt(1-$EccSq) ) / ( 1 + sqrt(1-$EccSq) ); |
|||
$E12 = $E1 * $E1; |
|||
$E13 = $E12 * $E1; |
|||
$E14 = $E13 * $E1; |
|||
|
|||
$SemiMajor = 6378137.0; // Ellipsoidal semi-major axis (Meters)
|
|||
$FalseEast = 500000.0; // UTM East bias (Meters)
|
|||
$ScaleFactor = 0.9996; // Scale at natural origin
|
|||
|
|||
// Calculate the Cassini projection parameters
|
|||
|
|||
$M1 = ($north - $FalseNorth) / $ScaleFactor; |
|||
$Mu1 = $M1 / ( $SemiMajor * (1 - $EccSq/4.0 - 3.0*$EccSq*$EccSq/64.0 - 5.0*$EccSq*$EccSq*$EccSq/256.0) ); |
|||
|
|||
$Phi1 = $Mu1 + (3.0*$E1/2.0 - 27.0*$E13/32.0) * sin(2.0*$Mu1); |
|||
+ (21.0*$E12/16.0 - 55.0*$E14/32.0) * sin(4.0*$Mu1); |
|||
+ (151.0*$E13/96.0) * sin(6.0*$Mu1); |
|||
+ (1097.0*$E14/512.0) * sin(8.0*$Mu1); |
|||
|
|||
$sin2phi1 = sin($Phi1) * sin($Phi1); |
|||
$Rho1 = ($SemiMajor * (1.0-$EccSq) ) / pow(1.0-$EccSq*$sin2phi1,1.5); |
|||
$Nu1 = $SemiMajor / sqrt(1.0-$EccSq*$sin2phi1); |
|||
|
|||
// Compute parameters as defined in the POSC specification. T, C and D
|
|||
|
|||
$T1 = tan($Phi1) * tan($Phi1); |
|||
$T12 = $T1 * $T1; |
|||
$C1 = $Ecc2Sq * cos($Phi1) * cos($Phi1); |
|||
$C12 = $C1 * $C1; |
|||
$D = ($east - $FalseEast) / ($ScaleFactor * $Nu1); |
|||
$D2 = $D * $D; |
|||
$D3 = $D2 * $D; |
|||
$D4 = $D3 * $D; |
|||
$D5 = $D4 * $D; |
|||
$D6 = $D5 * $D; |
|||
|
|||
// Compute the Latitude and Longitude and convert to degrees
|
|||
$lat = $Phi1 - $Nu1*tan($Phi1)/$Rho1 * ( $D2/2.0 - (5.0 + 3.0*$T1 + 10.0*$C1 - 4.0*$C12 - 9.0*$Ecc2Sq)*$D4/24.0 + (61.0 + 90.0*$T1 + 298.0*$C1 + 45.0*$T12 - 252.0*$Ecc2Sq - 3.0*$C12)*$D6/720.0 ); |
|||
|
|||
$lat = Rad2Deg($lat); |
|||
|
|||
$lon = $LngOrigin + ($D - (1.0 + 2.0*$T1 + $C1)*$D3/6.0 + (5.0 - 2.0*$C1 + 28.0*$T1 - 3.0*$C12 + 8.0*$Ecc2Sq + 24.0*$T12)*$D5/120.0) / cos($Phi1); |
|||
|
|||
$lon = Rad2Deg($lon); |
|||
|
|||
// Create a object to store the calculated Latitude and Longitude values
|
|||
$PC_LatLon['lat'] = $lat; |
|||
$PC_LatLon['lon'] = $lon; |
|||
|
|||
// Returns a PC_LatLon object
|
|||
return $PC_LatLon; |
|||
}; |
|||
|
|||
|
|||
|
|||
$Z = new gPoint(); |
|||
|
|||
$Z->setUTM( 485962.4143066, 4919314.7793823, '32T' ); |
|||
|
|||
$Z->convertTMtoLL(); |
|||
|
|||
$Z->printUTM(); |
|||
echo "\n\n"; |
|||
|
|||
$Z->printLatLong(); |
|||
echo "\n\n"; |
|||
|
|||
exit(); |
|||
*/ |
|||
|
|||
if( $CUser->Data['id'] > 1 ){ |
|||
$Data = array(); |
|||
$SID = intval( $_POST['SITE'] ); |
|||
if( $SID ){ |
|||
$QS = "SELECT * FROM nodes WHERE site_id={$SID} AND NOT ((type=0)OR(type=20))"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
date_default_timezone_set('UTC'); |
|||
foreach( $Result as $R ){ |
|||
switch( $R['type'] ){ |
|||
case 2:{ |
|||
// Lfs - MND
|
|||
$QS = "SELECT lat, lon, yaw, roll, pitch, max_range FROM lrf_sensors WHERE id={$R['aux_id']}"; |
|||
$D = $DATABASE->Query( $QS, false ); |
|||
if( count( $D ) ){ |
|||
$CC = $D[0]; |
|||
$A = new gPoint(); |
|||
$A->setLongLat($CC['lon'],$CC['lat']); |
|||
$A->convertLLtoTM(); |
|||
$XC = $A->E(); |
|||
$YC = $A->N(); |
|||
$Z = $A->Z(); |
|||
$RAN = floatval( $CC['max_range'] ); |
|||
if( 1 ){ |
|||
$K = pi()/18.0;//10 deg
|
|||
$Points = array(); |
|||
$Points[] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
$SANG = ( pi() / 180 ) * floatval( $CC['yaw'] ); |
|||
for( $i = 0; $i < 11; $i++ ){ |
|||
$CA = $i * $K; |
|||
$B = new gPoint(); |
|||
$B->setUTM( $XC + $RAN * cos( $SANG + $CA ), $YC + $RAN * sin( $SANG + $CA ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$Points[]=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
}; |
|||
|
|||
if(1){ |
|||
$ZMARK = array(); |
|||
$B = new gPoint(); |
|||
|
|||
//$RAN = $RAN - 0.5;
|
|||
$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$ZMARK=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
|
|||
//$SANG = $SANG - ( pi() / 180 );
|
|||
//$RAN = $RAN + 0.5;
|
|||
//$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z );
|
|||
//$B->convertTMtoLL();
|
|||
//$ZMARK[]=array('lat'=>$B->Lat(),'lon'=>$B->Long());
|
|||
|
|||
//$SANG = $SANG + ( pi() / 180 );
|
|||
//$RAN = $RAN + 0.5;
|
|||
//$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z );
|
|||
//$B->convertTMtoLL();
|
|||
//$ZMARK[]=array('lat'=>$B->Lat(),'lon'=>$B->Long());
|
|||
|
|||
//$SANG = $SANG + ( pi() / 180 );
|
|||
//$RAN = $RAN - 0.5;
|
|||
//$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z );
|
|||
//$B->convertTMtoLL();
|
|||
//$ZMARK[]=array('lat'=>$B->Lat(),'lon'=>$B->Long());
|
|||
$Zone['zang'] = $ZMARK; |
|||
} |
|||
|
|||
$Zone['type']='poly'; |
|||
$Zone['points']=$Points; |
|||
$Zone['color'] = '#880000'; |
|||
$Zone['center'] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
$Data[] = $Zone; |
|||
} else { |
|||
/* |
|||
$A->setUTM( $XC-$RAN, $YC+$RAN, $Z ); |
|||
$A->convertTMtoLL(); |
|||
$LTLAT = $A->Lat(); |
|||
$LTLON = $A->Long(); |
|||
$A->setUTM( $XC+$RAN, $YC-$RAN, $Z ); |
|||
$A->convertTMtoLL(); |
|||
$RBLAT = $A->Lat(); |
|||
$RBLON = $A->Long(); |
|||
$Zone['type']='image'; |
|||
$Zone['url']='/lib/controller/getDeviceDraw.php?NID='.$R['id']; |
|||
$Zone['bounds']=array(array($LTLAT,$LTLON),array($RBLAT,$RBLON)); |
|||
//*/
|
|||
//*
|
|||
$RA = sqrt( $RAN * $RAN * 2 ); |
|||
$CA = ( pi() / 180 ) * floatval( $CC['yaw'] ); |
|||
$SANG = pi()/4*3; |
|||
$A->setUTM( $XC + $RA * cos( $SANG + $CA ), $YC + $RA * sin( $SANG + $CA ), $Z ); |
|||
$A->convertTMtoLL(); |
|||
$Zone['type']='image_rot'; |
|||
$Zone['url']='/lib/controller/getDeviceDraw.php?NID='.$R['id']; |
|||
$Zone['topleft']=array($A->Lat(),$A->Long()); |
|||
$SANG = pi() / 4; |
|||
$A->setUTM( $XC + $RA * cos( $SANG + $CA ), $YC + $RA * sin( $SANG + $CA ), $Z ); |
|||
$A->convertTMtoLL(); |
|||
$Zone['topright']=array($A->Lat(),$A->Long()); |
|||
$SANG = pi() / 4*5; |
|||
$A->setUTM( $XC + $RA * cos( $SANG + $CA ), $YC + $RA * sin( $SANG + $CA ), $Z ); |
|||
$A->convertTMtoLL(); |
|||
$Zone['bottomleft']=array($A->Lat(),$A->Long()); |
|||
|
|||
$ZMARK = array(); |
|||
$B = new gPoint(); |
|||
|
|||
//$RAN = $RAN - 0.5;
|
|||
$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$ZMARK=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
$Zone['zang'] = $ZMARK; |
|||
//*/
|
|||
}; |
|||
$Data[] = $Zone; |
|||
}; |
|||
break; |
|||
}; |
|||
case 3:{ |
|||
// PLS 200
|
|||
$QS = "SELECT lat, lon, yaw, roll, pitch, max_range FROM lrf_sensors WHERE id={$R['aux_id']}"; |
|||
$D = $DATABASE->Query( $QS, false ); |
|||
if( count( $D ) ){ |
|||
$CC = $D[0]; |
|||
$A = new gPoint(); |
|||
$A->setLongLat($CC['lon'],$CC['lat']); |
|||
$A->convertLLtoTM(); |
|||
$XC = $A->E(); |
|||
$YC = $A->N(); |
|||
$Z = $A->Z(); |
|||
$RAN = floatval( $CC['max_range'] ); |
|||
if(1){ |
|||
$K = pi()/18.0;//10 deg
|
|||
$Points = array(); |
|||
$Points[] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
$SANG = ( pi() / 180 ) * floatval( $CC['yaw'] ) - $K; |
|||
for( $i = 0; $i < 21; $i++ ){ |
|||
$CA = $i * $K; |
|||
$B = new gPoint(); |
|||
$B->setUTM( $XC + $RAN * cos( $SANG + $CA ), $YC + $RAN * sin( $SANG + $CA ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$Points[]=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
}; |
|||
|
|||
if(1){ |
|||
$ZMARK = array(); |
|||
$B = new gPoint(); |
|||
// PLS
|
|||
$SANG = $SANG + $K; |
|||
|
|||
//$RAN = $RAN - 0.5;
|
|||
$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$ZMARK=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
|
|||
//$SANG = $SANG - ( pi() / 180 );
|
|||
//$RAN = $RAN + 0.5;
|
|||
//$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z );
|
|||
//$B->convertTMtoLL();
|
|||
//$ZMARK[]=array('lat'=>$B->Lat(),'lon'=>$B->Long());
|
|||
|
|||
//$SANG = $SANG + ( pi() / 180 );
|
|||
//$RAN = $RAN + 0.5;
|
|||
//$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z );
|
|||
//$B->convertTMtoLL();
|
|||
//$ZMARK[]=array('lat'=>$B->Lat(),'lon'=>$B->Long());
|
|||
|
|||
//$SANG = $SANG + ( pi() / 180 );
|
|||
//$RAN = $RAN - 0.5;
|
|||
//$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z );
|
|||
//$B->convertTMtoLL();
|
|||
//$ZMARK[]=array('lat'=>$B->Lat(),'lon'=>$B->Long());
|
|||
$Zone['zang'] = $ZMARK; |
|||
} |
|||
$Zone['type']='poly'; |
|||
$Zone['points']=$Points; |
|||
$Zone['color'] = '#880000'; |
|||
$Zone['center'] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
$Data[] = $Zone; |
|||
} else { |
|||
/* |
|||
$A->setUTM( $XC-$RAN, $YC+$RAN, $Z ); |
|||
$A->convertTMtoLL(); |
|||
$LTLAT = $A->Lat(); |
|||
$LTLON = $A->Long(); |
|||
$A->setUTM( $XC+$RAN, $YC-$RAN, $Z ); |
|||
$A->convertTMtoLL(); |
|||
$RBLAT = $A->Lat(); |
|||
$RBLON = $A->Long(); |
|||
$Zone['type']='image'; |
|||
$Zone['url']='/lib/controller/getDeviceDraw.php?NID='.$R['id']; |
|||
$Zone['bounds']=array(array($LTLAT,$LTLON),array($RBLAT,$RBLON)); |
|||
//*/
|
|||
//*
|
|||
$RA = sqrt( $RAN * $RAN * 2 ); |
|||
$CA = ( pi() / 180 ) * floatval( $CC['yaw'] ); |
|||
$SANG = pi()/4*3; |
|||
$A->setUTM( $XC + $RA * cos( $SANG + $CA ), $YC + $RA * sin( $SANG + $CA ), $Z ); |
|||
$A->convertTMtoLL(); |
|||
$Zone['type']='image_rot'; |
|||
$Zone['url']='/lib/controller/getDeviceDraw.php?NID='.$R['id']; |
|||
$Zone['topleft']=array($A->Lat(),$A->Long()); |
|||
$SANG = pi() / 4; |
|||
$A->setUTM( $XC + $RA * cos( $SANG + $CA ), $YC + $RA * sin( $SANG + $CA ), $Z ); |
|||
$A->convertTMtoLL(); |
|||
$Zone['topright']=array($A->Lat(),$A->Long()); |
|||
$SANG = pi() / 4*5; |
|||
$A->setUTM( $XC + $RA * cos( $SANG + $CA ), $YC + $RA * sin( $SANG + $CA ), $Z ); |
|||
$A->convertTMtoLL(); |
|||
$Zone['bottomleft']=array($A->Lat(),$A->Long()); |
|||
//*/
|
|||
$ZMARK = array(); |
|||
$B = new gPoint(); |
|||
|
|||
//$RAN = $RAN - 0.5;
|
|||
$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$ZMARK=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
$Zone['zang'] = $ZMARK; |
|||
}; |
|||
$Data[] = $Zone; |
|||
}; |
|||
break; |
|||
}; |
|||
case 5:{ |
|||
// 3D
|
|||
$QS = "SELECT lat, lon, yaw, roll, pitch, max_range FROM lrf_sensors WHERE id={$R['aux_id']}"; |
|||
$D = $DATABASE->Query( $QS, false ); |
|||
if( count( $D ) ){ |
|||
$CC = $D[0]; |
|||
$A->setLongLat($CC['lon'],$CC['lat']); |
|||
$A->convertLLtoTM(); |
|||
$YC = $A->N(); |
|||
$XC = $A->E(); |
|||
$Z = $A->Z(); |
|||
|
|||
$Zone['type']='circle'; |
|||
$Zone['radius'] = floatval( $CC['max_range'] ); |
|||
$Zone['color'] = '#880000'; |
|||
$Zone['center'] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
|
|||
$SANG = ( pi() / 180 ) * floatval( $CC['yaw'] ); |
|||
$RAN = floatval( $CC['max_range'] ); |
|||
$ZMARK = array(); |
|||
$B = new gPoint(); |
|||
|
|||
//$RAN = $RAN - 0.5;
|
|||
$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$ZMARK=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
$Zone['zang'] = $ZMARK; |
|||
$Data[] = $Zone; |
|||
|
|||
}; |
|||
break; |
|||
}; |
|||
case 13:{ |
|||
// Camera PTZ;
|
|||
$QS = "SELECT lat, lon, yaw, roll, pitch, max_range, pan_angles FROM cameras WHERE id={$R['aux_id']}"; |
|||
$D = $DATABASE->Query( $QS, false ); |
|||
if( count( $D ) ){ |
|||
$CC = $D[0]; |
|||
$A->setLongLat($CC['lon'],$CC['lat']); |
|||
$A->convertLLtoTM(); |
|||
$YC = $A->N(); |
|||
$XC = $A->E(); |
|||
$Z = $A->Z(); |
|||
if( intval( $CC['pan_angles'] ) < 360 ){ |
|||
$Points = array(); |
|||
$A = new gPoint(); |
|||
$Points[] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
$K = ( pi()/180.0 ) * floatval($CC['pan_angles']) / 40; |
|||
$SANG = ( pi() / 180 ) * floatval( $CC['yaw'] ); |
|||
$RAN = floatval( $CC['max_range'] ); |
|||
for( $i = 0; $i < 41; $i++ ){ |
|||
$CA = $i * $K; |
|||
$B = new gPoint(); |
|||
$B->setUTM( $XC + $RAN * cos( $SANG + $CA ), $YC + $RAN * sin( $SANG + $CA ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$Points[]=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
}; |
|||
$Zone['type']='poly'; |
|||
$Zone['points']=$Points; |
|||
$Zone['color'] = '#000088'; |
|||
$Zone['center'] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
$ZMARK = array(); |
|||
$B = new gPoint(); |
|||
|
|||
//$RAN = $RAN - 0.5;
|
|||
$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$ZMARK=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
$Zone['zang'] = $ZMARK; |
|||
} else { |
|||
$Zone['type']='circle'; |
|||
$Zone['radius'] = floatval( $CC['max_range'] ); |
|||
$Zone['color'] = '#000088'; |
|||
$Zone['center'] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
$SANG = ( pi() / 180 ) * floatval( $CC['yaw'] ); |
|||
$RAN = floatval( $CC['max_range'] ); |
|||
$ZMARK = array(); |
|||
$B = new gPoint(); |
|||
|
|||
//$RAN = $RAN - 0.5;
|
|||
$B->setUTM( $XC + $RAN * cos( $SANG ), $YC + $RAN * sin( $SANG ), $Z ); |
|||
$B->convertTMtoLL(); |
|||
$ZMARK=array('lat'=>$B->Lat(),'lon'=>$B->Long()); |
|||
$Zone['zang'] = $ZMARK; |
|||
}; |
|||
$Data[] = $Zone; |
|||
}; |
|||
break; |
|||
}; |
|||
}; |
|||
|
|||
}; |
|||
$QS="SELECT * FROM target_filters WHERE site_id={$SID}"; |
|||
$RF=$DATABASE->Query( $QS, false ); |
|||
foreach( $RF as $F ){ |
|||
switch( intval($F['type']) ){ |
|||
case 1:{ |
|||
$QS="SELECT * FROM target_filter_apf WHERE id={$F['aux_id']}"; |
|||
$SD=$DATABASE->Query( $QS, false ); |
|||
$CC=$SD[0]; |
|||
if( count($SD) ){ |
|||
$Zone['type']='poly'; |
|||
$Zone['color'] = '#FF00FF'; |
|||
$Zone['center'] = array('lat'=>$CC['lat'],'lon'=>$CC['lon']); |
|||
|
|||
$QS="SELECT * FROM target_filter_apf_anchors WHERE filter_id={$F['aux_id']}"; |
|||
$RA=$DATABASE->Query( $QS, false ); |
|||
|
|||
$Points = array(); |
|||
$A = new gPoint(); |
|||
$A->setLongLat($CC['lon'],$CC['lat']); |
|||
$A->convertLLtoTM(); |
|||
$YC = $A->N(); |
|||
$XC = $A->E(); |
|||
$Z = $A->Z(); |
|||
$ANG = (pi()/180)*floatval( $CC['yaw'] ); |
|||
foreach( $RA as $G ){ |
|||
$TX = floatval($G['x']); |
|||
$TY = floatval($G['y']); |
|||
$CR = sqrt($TX*$TX+$TY*$TY); |
|||
if( $TX != 0 ){ |
|||
$CA = atan( $TY/$TX ); |
|||
} else { |
|||
$CA = 0; |
|||
}; |
|||
$A->setUTM($XC+$CR*cos($CA+$ANG),$YC+$CR*sin($CA+$ANG),$Z); |
|||
$A->convertTMtoLL(); |
|||
$Points[]=array('lat'=>$A->Lat(),'lon'=>$A->Long()); |
|||
}; |
|||
$Zone['points']=$Points; |
|||
$Data[] = $Zone; |
|||
}; |
|||
break; |
|||
}; |
|||
}; |
|||
}; |
|||
}; |
|||
$ZZ['zones']=$Data; |
|||
$ZZ['totalCount'] = count( $Data ); |
|||
echo json_encode( $ZZ ); |
|||
} else { |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,37 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); |
|||
header("Cache-Control: post-check=0, pre-check=0", false ); |
|||
header("Pragma: no-cache"); |
|||
if(isset( $_POST['VID'] )){ |
|||
$VID = intval($_POST['VID']); |
|||
} else { |
|||
$VID = intval($_GET['VID']); |
|||
}; |
|||
if( $VID ){ |
|||
$QS = "SELECT md5, part_id FROM video_records WHERE id={$VID}"; |
|||
$Result = $DATABASE->Query( $QS, false ); |
|||
if( count( $Result ) ){ |
|||
$SP = intval($Result[0]['part_id']); |
|||
$MD5 = $Result[0]['md5']; |
|||
$QS = "SELECT part_id FROM video_records WHERE md5='{$MD5}' AND part_id >= {$SP} ORDER BY part_id"; |
|||
$RR = $DATABASE->Query( $QS, false ); |
|||
echo"#EXTM3U\n"; |
|||
echo"#EXT-X-VERSION:3\n"; |
|||
echo "#EXT-X-ALLOW-CACHE:NO\n"; |
|||
echo "#EXT-X-TARGETDURATION:2\n"; |
|||
echo "#EXT-X-MEDIA-SEQUENCE:73598\n"; |
|||
//echo "#EXTINF:1.960,\n2021-07-11/09/53-34_73598.ts\n";
|
|||
$BD = substr( $MD5, 0, 2 ) . '/' . substr( $MD5, 2, 2 ) . '/'; |
|||
foreach( $RR as $R ){ |
|||
$CP = intval( $R['part_id'] ); |
|||
echo "#EXTINF:1.960,\ndata/videos/{$BD}{$CP}.ts\n"; |
|||
}; |
|||
echo "#EXT-X-ENDLIST\n"; |
|||
exit(); |
|||
}; |
|||
}; |
|||
}; |
|||
header('location: /'); |
|||
?>
|
|||
@ -0,0 +1,24 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
require_once('../php/onvif/toto.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
if( $CUser->Data['access'] > 5 ){ |
|||
$QS = "SELECT al.*, ur.login FROM access_log al LEFT JOIN users ur ON (al.user_id = ur.id ) ORDER BY id DESC"; |
|||
$Result = $DATABASE->Query($QS,false); |
|||
foreach( $Result as $CD ){ |
|||
$cnode['id'] = intval( $CD['id'] ); |
|||
$cnode['user'] = $CD['login']; |
|||
$cnode['ts']= $CD['ts']; |
|||
$cnode['cmd'] = intval( $CD['cmd'] ); |
|||
$cnode['data_line'] = $CD['dataset']; |
|||
$Data['records'][] = $cnode; |
|||
}; |
|||
} else { |
|||
$Data['records'] = array(); |
|||
}; |
|||
$Data['totalCount']= count($Data['records']); |
|||
echo json_encode( $Data ); |
|||
} else { |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,39 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
require_once('../php/onvif/toto.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
if( $CUser->Data['access'] > 5 ){ |
|||
$Records = array(); |
|||
if( $FID = fopen("data/server.log", "r")){ |
|||
$LID = 0; |
|||
$AID = 1; |
|||
while( !feof( $FID ) ){ |
|||
$line = trim( fgets($FID) ); |
|||
$cnode['id'] = $AID; |
|||
$TArr = explode( ' ', $line ); |
|||
if( count( $TArr ) > 2 ){ |
|||
$cnode['ts'] = $TArr[0] . ' ' . $TArr[1]; |
|||
$cnode['ptr'] = $TArr[2]; |
|||
$cnode['module'] = str_replace(':','', $TArr[3]); |
|||
$cnode['msg'] = substr( $line, strlen( $cnode['ts'] ) + strlen( $cnode['ptr'] ) + strlen( $cnode['module'] ) + 4 ); |
|||
if( $LID < 40 ) { |
|||
$LID++; |
|||
} else { |
|||
array_shift($Records); |
|||
}; |
|||
$Records[$LID] = $cnode; |
|||
$AID++; |
|||
}; |
|||
}; |
|||
fclose($FID); |
|||
}; |
|||
$Data['records'] = array_reverse($Records); |
|||
} else { |
|||
$Data['records'] = array(); |
|||
}; |
|||
$Data['totalCount']= count($Data['records']); |
|||
echo json_encode( $Data ); |
|||
} else { |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,27 @@ |
|||
<?php |
|||
require_once('../ajax_asm.php'); |
|||
require_once('../php/onvif/toto.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
if( $CUser->Data['access'] > 5 ){ |
|||
$QS = "SELECT * FROM users"; |
|||
$Result = $DATABASE->Query($QS,false); |
|||
foreach( $Result as $CD ){ |
|||
$cnode['id'] = intval( $CD['id'] ); |
|||
$cnode['status'] = $CD['status']; |
|||
$cnode['access'] = intval( $CD['access'] ); |
|||
$cnode['login'] = $CD['login']; |
|||
$cnode['created']= $CD['create_ts']; |
|||
$cnode['last'] = $CD['login_ts']; |
|||
$cnode['lang'] = intval( $CD['language'] ); |
|||
$cnode['site'] = $CD['selected_site']; |
|||
$Data['users'][] = $cnode; |
|||
}; |
|||
} else { |
|||
$Data['users'] = array(); |
|||
}; |
|||
$Data['totalCount']= count($Data['users']); |
|||
echo json_encode( $Data ); |
|||
} else { |
|||
header('location: /'); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,29 @@ |
|||
{ |
|||
xtype: 'panel', |
|||
html: '<center><video id="hls-%%%HLSID%%%" class="video-js vjs-default-skin" width="244" height="200"></video></center>', |
|||
plr: null, |
|||
listeners:{ |
|||
afterrender: function( t ){ |
|||
t.plr = videojs.getPlayer('hls-%%%HLSID%%%'); |
|||
if( t.plr == null ){ |
|||
t.plr = videojs('hls-%%%HLSID%%%',{ |
|||
autoplay: 'muted', |
|||
controls: true, |
|||
controlBar: { |
|||
volumePanel: false, |
|||
playToggle: false, |
|||
pictureInPictureToggle: false |
|||
} |
|||
}); |
|||
|
|||
}; |
|||
%%%HLSOFFSET%%% |
|||
t.plr.src({type: 'application/x-mpegURL', src: '%%%HLSSRC%%%'}); |
|||
return true; |
|||
}, |
|||
destroy: function( t ){ |
|||
if( t.plr != null ) t.plr.dispose(); |
|||
t.plr = null; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,67 @@ |
|||
<?php |
|||
|
|||
$ShowImagesLocal=false; |
|||
$ShowThumbnailsLocal=true; |
|||
$ShowAdw=true; |
|||
$SaveLocal=false; |
|||
$MailAgent='SENDMAIL'; |
|||
$CGP_SubmitPath='../Submitted/'; |
|||
|
|||
$WEBPath='http://' . $_SERVER['SERVER_ADDR'] . '/'; |
|||
$DBCacheDir=$SYSPath . 'cache'; |
|||
|
|||
$MinimalSize=640000; |
|||
|
|||
|
|||
|
|||
// Argus Defines
|
|||
|
|||
define( "ARGUS_SERVER", 0 ); |
|||
define( "ARGUS_ALS_SENSOR", 1 ); |
|||
define( "ARGUS_LFS_SENSOR", 2 ); |
|||
define( "ARGUS_PLS_200_SENSOR", 3 ); |
|||
define( "ARGUS_PLS_360_SENSOR", 4 ); |
|||
define( "ARGUS_3D_SENSOR", 5 ); |
|||
define( "ARGUS_NET_PLS_200", 6 ); |
|||
define( "ARGUS_ANALOG_STATIC_CAMERA", 10 ); |
|||
define( "ARGUS_ANALOG_PTZ_CAMERA", 11 ); |
|||
define( "ARGUS_IP_STATIC_CAMERA", 12 ); |
|||
define( "ARGUS_IP_PTZ_CAMERA", 13 ); |
|||
define( "ARGUS_IP_UART_GATEWAY", 20 ); |
|||
define( "ARGUS_JAMER", 40 ); |
|||
define( "ARGUS_IP_VIDEO_SERVER", 50 ); |
|||
define( "ARGUS_DRONE_CONTROL", 60 ); |
|||
define( "ARGUS_UNKNOWN", 255 ); |
|||
|
|||
define( "ARGUS_NODE_SOCK_TYPE_SERIAL_PORT", 1 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_NETWORK", 2 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_DC", 3 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_GRABBER", 4 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_AUDIO_GRABBER", 5 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_DIGITAL", 6 ); |
|||
|
|||
define( "COM_MODE_IN", 1 ); |
|||
define( "COM_MODE_OUT", 2 ); |
|||
define( "COM_MODE_INOUT", 3 ); |
|||
|
|||
define( "COM_TYPE_UART", 1 ); |
|||
define( "COM_TYPE_TCP", 2 ); |
|||
define( "COM_TYPE_DC_CTRL", 3 ); |
|||
define( "COM_TYPE_ANALOG_VIDEO", 4 ); |
|||
define( "COM_TYPE_ANALOG_AUDIO", 5 ); |
|||
define( "COM_TYPE_DIGITAL_MEDIA", 6 ); |
|||
|
|||
define( "CAM_TYPE_ANALOG", 1 ); |
|||
define( "CAM_TYPE_DIGITAL", 2 ); |
|||
|
|||
define( "MOD_TYPE_MEDIASERVER", 1 ); |
|||
define( "MOD_TYPE_USB_DC", 2 ); |
|||
|
|||
function microtime_float(){ |
|||
list($usec, $sec) = explode(" ", microtime()); |
|||
return ((float)$usec + (float)$sec); |
|||
}; |
|||
|
|||
$Script_Start_Time = microtime_float(); |
|||
|
|||
?>
|
|||
@ -0,0 +1,18 @@ |
|||
<?php |
|||
error_reporting( E_ALL ); |
|||
require_once('settings.php'); |
|||
|
|||
// SET DATA CONNECTION AND GLOBAL USER VARIABLES
|
|||
$TT_123 = explode( '.', PHP_VERSION ); |
|||
if( $TT_123[0] == '4' ){ |
|||
require_once( 'php/db/MySQL_class.php' ); |
|||
} elseif( $TT_123[0] > '4' ){ |
|||
require_once( 'php/db/MySQLi_class.php' ); |
|||
} else { |
|||
exit(); |
|||
}; |
|||
|
|||
session_start(); |
|||
require_once('php/ui/UI_functions.php'); |
|||
|
|||
?>
|
|||
@ -0,0 +1,245 @@ |
|||
//<?php require_once('../../js_asm.php'); ?>
|
|||
|
|||
var um_selected_log_id = 0; |
|||
|
|||
var um_server_log_store = new Ext.data.JsonStore({ |
|||
root: 'records', |
|||
totalProperty: 'totalCount', |
|||
idProperty: 'id', |
|||
remoteSort: true, |
|||
fields: [{ |
|||
name: 'id', |
|||
type: 'int' |
|||
},{ |
|||
name: 'ts', |
|||
type: 'string' |
|||
},{ |
|||
name: 'ptr', |
|||
type: 'string' |
|||
},{ |
|||
name: 'module', |
|||
type: 'string' |
|||
},{ |
|||
name: 'msg', |
|||
type: 'string' |
|||
}], |
|||
proxy : new Ext.data.HttpProxy({ |
|||
method: 'POST', |
|||
prettyUrls: false, |
|||
url: '/lib/controller/listServerLog.php', |
|||
headers: { |
|||
UID: <?=$UserID;?>, |
|||
SID: '<?=$Session;?>' |
|||
} |
|||
}) |
|||
}); |
|||
|
|||
var um_server_log_col_model_opt = { |
|||
columns: [ |
|||
{header: "id", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' }, |
|||
{header: "<?=$Labels->GetLabel("_DATETIME_");?>", width: 150, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'ts' }, |
|||
{header: "<?=$Labels->GetLabel("_POINTER_");?>", width: 100, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'ptr' }, |
|||
{header: "<?=$Labels->GetLabel("_MODULE_");?>", width: 100, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'module' }, |
|||
{header: "<?=$Labels->GetLabel("_INFO_");?>", resizable: true, sortable: false, fixed: false, flex: 1, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'msg' } |
|||
], |
|||
defaults: { |
|||
sortable: false, |
|||
menuDisabled: true, |
|||
width: 100 |
|||
} |
|||
}; |
|||
|
|||
|
|||
var um_log_sel_model_opt = { |
|||
singleSelect: true, |
|||
listeners: { |
|||
rowselect: function(sm, row, rec) { |
|||
um_selected_log_id = rec.data.id; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
|
|||
var um_access_log_store = new Ext.data.JsonStore({ |
|||
root: 'records', |
|||
totalProperty: 'totalCount', |
|||
idProperty: 'id', |
|||
remoteSort: true, |
|||
fields: [{ |
|||
name: 'id', |
|||
type: 'int' |
|||
},{ |
|||
name: 'user', |
|||
type: 'string' |
|||
},{ |
|||
name: 'ts', |
|||
type: 'string' |
|||
},{ |
|||
name: 'cmd', |
|||
type: 'int' |
|||
},{ |
|||
name: 'data_line', |
|||
type: 'string' |
|||
}], |
|||
proxy : new Ext.data.HttpProxy({ |
|||
method: 'POST', |
|||
prettyUrls: false, |
|||
url: '/lib/controller/listAccessLog.php', |
|||
headers: { |
|||
UID: <?=$UserID;?>, |
|||
SID: '<?=$Session;?>' |
|||
} |
|||
}) |
|||
}); |
|||
|
|||
function um_action_renderer( val ){ |
|||
switch( val ){ |
|||
case 1: return 'login'; |
|||
case 145: return 'resize screen'; |
|||
}; |
|||
return 'unknown action'; |
|||
}; |
|||
|
|||
var um_access_log_col_model_opt = { |
|||
columns: [ |
|||
{header: "id", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' }, |
|||
{header: "<?=$Labels->GetLabel("_USER_");?>",width: 80, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'user' }, |
|||
{header: "<?=$Labels->GetLabel("_DATETIME_");?>", width: 150, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'ts' }, |
|||
{header: "<?=$Labels->GetLabel("_ACTION_");?>", width: 150, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', renderer: um_action_renderer, dataIndex: 'cmd' }, |
|||
{header: "<?=$Labels->GetLabel("_INFO_");?>", resizable: true, sortable: false, fixed: false, flex: 1, dataindex: 'data_line' } |
|||
], |
|||
defaults: { |
|||
sortable: false, |
|||
menuDisabled: true, |
|||
width: 100 |
|||
} |
|||
}; |
|||
var um_access_log_sel_model_opt = { |
|||
singleSelect: true, |
|||
listeners: { |
|||
rowselect: function(sm, row, rec) { |
|||
um_selected_log_id = rec.data.id; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
function loadAccessLog(){ |
|||
if( tlInterval!= null ){ |
|||
window.clearInterval( tlInterval ); |
|||
tlInterval = null; |
|||
timelineObj = null; |
|||
}; |
|||
var tPanel = Ext.getCmp('main_portal'); |
|||
tPanel.removeAll( true ); |
|||
Ext.getCmp('main_content').setTitle( '<?=$Labels->GetLabel("_ACCESS_LOG_");?>' ); |
|||
tPanel.add({ |
|||
columnWidth: 1.0, |
|||
frame: false, |
|||
border: false, |
|||
items: [{ |
|||
xtype: 'panel', |
|||
layout: 'fit', |
|||
layoutConfig: { |
|||
align : 'stretch', |
|||
pack : 'start' |
|||
}, |
|||
height: PanelH-5, |
|||
flex: 1, |
|||
frame: false, |
|||
border: false, |
|||
items:{ |
|||
frame: false, |
|||
height: PanelH-5, |
|||
xtype: 'grid', |
|||
forceFit: true, |
|||
viewConfig: { |
|||
forceFit: true |
|||
}, |
|||
ds: um_access_log_store, |
|||
cm: new Ext.grid.ColumnModel( um_access_log_col_model_opt ), |
|||
sm: new Ext.grid.RowSelectionModel( um_log_sel_model_opt ) |
|||
},tbar: [{ |
|||
xtype: 'button', |
|||
id: 'um_access_reload_btn', |
|||
text: '<?=$Labels->GetLabel("_RELOAD_");?>', |
|||
handler: function(){ |
|||
um_access_log_store.reload(); |
|||
} |
|||
}] |
|||
}] |
|||
}); |
|||
tPanel.doLayout(); |
|||
um_selected_log_id = 0; |
|||
um_access_log_store.reload(); |
|||
}; |
|||
|
|||
function loadServerLog(){ |
|||
if( tlInterval!= null ){ |
|||
window.clearInterval( tlInterval ); |
|||
tlInterval = null; |
|||
timelineObj = null; |
|||
}; |
|||
var tPanel = Ext.getCmp('main_portal'); |
|||
tPanel.removeAll( true ); |
|||
Ext.getCmp('main_content').setTitle( '<?=$Labels->GetLabel("_SERVER_LOG_");?>' ); |
|||
tPanel.add({ |
|||
columnWidth: 1.0, |
|||
frame: false, |
|||
border: false, |
|||
items: [{ |
|||
xtype: 'panel', |
|||
layout: 'fit', |
|||
layoutConfig: { |
|||
align : 'stretch', |
|||
pack : 'start' |
|||
}, |
|||
height: PanelH-5, |
|||
flex: 1, |
|||
frame: false, |
|||
border: false, |
|||
items:{ |
|||
frame: false, |
|||
height: PanelH-5, |
|||
xtype: 'grid', |
|||
forceFit: true, |
|||
viewConfig: { |
|||
forceFit: true |
|||
}, |
|||
ds: um_server_log_store, |
|||
cm: new Ext.grid.ColumnModel( um_server_log_col_model_opt ), |
|||
sm: new Ext.grid.RowSelectionModel( um_log_sel_model_opt ) |
|||
},tbar: [{ |
|||
xtype: 'button', |
|||
id: 'um_server_reload_btn', |
|||
text: '<?=$Labels->GetLabel("_RELOAD_");?>', |
|||
handler: function(){ |
|||
um_server_log_store.reload(); |
|||
} |
|||
},{ |
|||
xtype: 'button', |
|||
id: 'um_server_clean_btn', |
|||
text: '<?=$Labels->GetLabel("_CLEAR_");?>', |
|||
handler: function(){ |
|||
Ext.Ajax.request({ |
|||
url: '/lib/controller/clearServerLog.php', |
|||
params: { |
|||
NID: NID, |
|||
UID: <?=$UserID;?>, |
|||
SID: '<?=$Session;?>' |
|||
}, |
|||
success: function( response, opts ){ |
|||
um_server_log_store.reload(); |
|||
} |
|||
}); |
|||
} |
|||
}] |
|||
}] |
|||
}); |
|||
tPanel.doLayout(); |
|||
um_selected_log_id = 0; |
|||
um_server_log_store.reload(); |
|||
tlInterval = window.setInterval( um_server_log_store.reload, 333, 0 ); |
|||
}; |
|||
|
|||
|
|||
|
|||
@ -0,0 +1,171 @@ |
|||
//<?php require_once('../../js_asm.php'); ?>
|
|||
|
|||
var um_user_list_store = new Ext.data.JsonStore({ |
|||
root: 'users', |
|||
totalProperty: 'totalCount', |
|||
idProperty: 'id', |
|||
remoteSort: true, |
|||
fields: [{ |
|||
name: 'id', |
|||
type: 'int' |
|||
},{ |
|||
name: 'status', |
|||
type: 'string' |
|||
},{ |
|||
name: 'login', |
|||
type: 'string' |
|||
},{ |
|||
name: 'created', |
|||
type: 'string' |
|||
},{ |
|||
name: 'last', |
|||
type: 'string' |
|||
},{ |
|||
name: 'access', |
|||
type: 'int' |
|||
},{ |
|||
name: 'lang', |
|||
type: 'int' |
|||
},{ |
|||
name: 'site', |
|||
type: 'int' |
|||
}], |
|||
proxy : new Ext.data.HttpProxy({ |
|||
method: 'POST', |
|||
prettyUrls: false, |
|||
url: '/lib/controller/listUsers.php', |
|||
headers: { |
|||
UID: <?=$UserID;?>, |
|||
SID: '<?=$Session;?>' |
|||
} |
|||
}) |
|||
}); |
|||
|
|||
var um_selected_user_id = 0; |
|||
|
|||
var um_add_user_window = null; |
|||
var um_edit_user_window = null; |
|||
|
|||
function um_user_access_renderer( val ){ |
|||
if( val == 0 ){ |
|||
return '<?=$Labels->GetLabel("_GUEST_");?>'; |
|||
} else { |
|||
if( val < 6 ){ |
|||
return '<?=$Labels->GetLabel("_REGULAR_");?>'; |
|||
} else { |
|||
if( val == 10 ){ |
|||
return '<?=$Labels->GetLabel("_FOUNDER_");?>'; |
|||
} else { |
|||
return '<?=$Labels->GetLabel("_ADMIN_");?>'; |
|||
}; |
|||
}; |
|||
}; |
|||
}; |
|||
|
|||
var um_user_list_col_model_opt = { |
|||
columns: [ |
|||
{header: "id", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' }, |
|||
{header: "<?=$Labels->GetLabel("_STATUS_");?>", width: 80, sortable: false, fixed: true, menuDisabled: true, align: 'center', css: 'vertical-align: middle;', dataIndex: 'status' }, |
|||
{header: "<?=$Labels->GetLabel("_LOGIN_");?>", width: 80, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'login' }, |
|||
{header: "<?=$Labels->GetLabel("_CREATED_");?>", width: 150, sortable: false, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'created' }, |
|||
{header: "<?=$Labels->GetLabel("_LAST_ACCESS_");?>", width: 150, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'last' }, |
|||
{header: "<?=$Labels->GetLabel("_TYPE_");?>", width: 100, sortable: false, renderer: um_user_access_renderer, dataIndex: 'access' }, |
|||
{header: "<?=$Labels->GetLabel("_INFO_");?>", width: 200, sortable: false, dataindex: 'data' } |
|||
], |
|||
defaults: { |
|||
sortable: true, |
|||
menuDisabled: true, |
|||
width: 100 |
|||
}, |
|||
listeners: { |
|||
hiddenchange: function(cm, colIndex, hidden) { |
|||
//saveConfig(colIndex, hidden);
|
|||
} |
|||
} |
|||
}; |
|||
|
|||
var um_user_list_sel_model_opt = { |
|||
singleSelect: true, |
|||
listeners: { |
|||
rowselect: function(sm, row, rec) { |
|||
um_selected_user_id = rec.data.id; |
|||
if( um_selected_user_id == 0 || rec.data.access == 10 ){ |
|||
Ext.getCmp('um_del_user_btn').disable(); |
|||
Ext.getCmp('um_lock_user_btn').disable(); |
|||
}; |
|||
Ext.getCmp('um_edit_user_btn').enable(); |
|||
} |
|||
} |
|||
}; |
|||
|
|||
|
|||
function loadUserEditor(){ |
|||
if( tlInterval!= null ){ |
|||
window.clearInterval( tlInterval ); |
|||
tlInterval = null; |
|||
timelineObj = null; |
|||
}; |
|||
var tPanel = Ext.getCmp('main_portal'); |
|||
tPanel.removeAll( true ); |
|||
Ext.getCmp('main_content').setTitle( '<?=$Labels->GetLabel("_USERS_MNGMT_");?>' ); |
|||
tPanel.add({ |
|||
columnWidth: 1.0, |
|||
frame: false, |
|||
border: false, |
|||
items: [{ |
|||
xtype: 'panel', |
|||
layout: 'fit', |
|||
layoutConfig: { |
|||
align : 'stretch', |
|||
pack : 'start' |
|||
}, |
|||
height: PanelH-5, |
|||
flex: 1, |
|||
frame: false, |
|||
border: false, |
|||
items:{ |
|||
frame: false, |
|||
height: PanelH-5, |
|||
xtype: 'grid', |
|||
ds: um_user_list_store, |
|||
cm: new Ext.grid.ColumnModel( um_user_list_col_model_opt ), |
|||
sm: new Ext.grid.RowSelectionModel( um_user_list_sel_model_opt ) |
|||
}, |
|||
tbar: [{ |
|||
xtype: 'button', |
|||
id: 'um_add_user_btn', |
|||
text: '<?=$Labels->GetLabel("_ADD_USER_");?>', |
|||
handler: function(){ |
|||
|
|||
} |
|||
},{ |
|||
xtype: 'button', |
|||
id: 'um_edit_user_btn', |
|||
text: '<?=$Labels->GetLabel("_EDIT_USER_");?>', |
|||
disabled: true, |
|||
handler: function(){ |
|||
|
|||
} |
|||
},{ |
|||
xtype: 'button', |
|||
id: 'um_lock_user_btn', |
|||
text: '<?=$Labels->GetLabel("_LOCK_USER_");?>', |
|||
disabled: true, |
|||
handler: function(){ |
|||
|
|||
} |
|||
},{ |
|||
xtype: 'button', |
|||
id: 'um_del_user_btn', |
|||
text: '<?=$Labels->GetLabel("_DEL_USER_");?>', |
|||
disabled: true, |
|||
handler: function(){ |
|||
|
|||
} |
|||
}] |
|||
}] |
|||
}); |
|||
tPanel.doLayout(); |
|||
um_selected_user_id = 0; |
|||
um_user_list_store.reload(); |
|||
}; |
|||
Binary file not shown.
|
After Width: 3791 | Height: 2763 | Size: 2.0 MiB |
@ -0,0 +1,189 @@ |
|||
|
|||
/* |
|||
* 🍂class ImageOverlay.Rotated |
|||
* 🍂inherits ImageOverlay |
|||
* https://github.com/IvanSanchez/Leaflet.ImageOverlay.Rotated
|
|||
* Like `ImageOverlay`, but rotates and skews the image. This is done by using |
|||
* *three* control points instead of *two*. |
|||
* |
|||
* @example |
|||
* |
|||
* ```
|
|||
* var topleft = L.latLng(40.52256691873593, -3.7743186950683594), |
|||
* topright = L.latLng(40.5210255066156, -3.7734764814376835), |
|||
* bottomleft = L.latLng(40.52180437272552, -3.7768453359603886); |
|||
* |
|||
* var overlay = L.imageOverlay.rotated("./palacio.jpg", topleft, topright, bottomleft, { |
|||
* opacity: 0.4, |
|||
* interactive: true, |
|||
* attribution: "© <a href='http://www.ign.es'>Instituto Geográfico Nacional de España</a>" |
|||
* }); |
|||
* ```
|
|||
* |
|||
*/ |
|||
|
|||
L.ImageOverlay.Rotated = L.ImageOverlay.extend({ |
|||
|
|||
initialize: function (image, topleft, topright, bottomleft, options) { |
|||
|
|||
if (typeof(image) === 'string') { |
|||
this._url = image; |
|||
} else { |
|||
// Assume that the first parameter is an instance of HTMLImage or HTMLCanvas
|
|||
this._rawImage = image; |
|||
} |
|||
|
|||
this._topLeft = L.latLng(topleft); |
|||
this._topRight = L.latLng(topright); |
|||
this._bottomLeft = L.latLng(bottomleft); |
|||
|
|||
L.setOptions(this, options); |
|||
}, |
|||
|
|||
|
|||
onAdd: function (map) { |
|||
if (!this._image) { |
|||
this._initImage(); |
|||
|
|||
if (this.options.opacity < 1) { |
|||
this._updateOpacity(); |
|||
} |
|||
} |
|||
|
|||
if (this.options.interactive) { |
|||
L.DomUtil.addClass(this._rawImage, 'leaflet-interactive'); |
|||
this.addInteractiveTarget(this._rawImage); |
|||
} |
|||
|
|||
map.on('zoomend resetview', this._reset, this); |
|||
|
|||
this.getPane().appendChild(this._image); |
|||
this._reset(); |
|||
}, |
|||
|
|||
|
|||
onRemove: function(map) { |
|||
map.off('zoomend resetview', this._reset, this); |
|||
L.ImageOverlay.prototype.onRemove.call(this, map); |
|||
}, |
|||
|
|||
|
|||
_initImage: function () { |
|||
var img = this._rawImage; |
|||
if (this._url) { |
|||
img = L.DomUtil.create('img'); |
|||
img.style.display = 'none'; // Hide while the first transform (zero or one frames) is being done
|
|||
|
|||
if (this.options.crossOrigin) { |
|||
img.crossOrigin = ''; |
|||
} |
|||
|
|||
img.src = this._url; |
|||
this._rawImage = img; |
|||
} |
|||
L.DomUtil.addClass(img, 'leaflet-image-layer'); |
|||
|
|||
// this._image is reused by some of the methods of the parent class and
|
|||
// must keep the name, even if it is counter-intuitive.
|
|||
var div = this._image = L.DomUtil.create('div', |
|||
'leaflet-image-layer ' + (this._zoomAnimated ? 'leaflet-zoom-animated' : '')); |
|||
|
|||
this._updateZIndex(); // apply z-index style setting to the div (if defined)
|
|||
|
|||
div.appendChild(img); |
|||
|
|||
div.onselectstart = L.Util.falseFn; |
|||
div.onmousemove = L.Util.falseFn; |
|||
|
|||
img.onload = function(){ |
|||
this._reset(); |
|||
img.style.display = 'block'; |
|||
this.fire('load'); |
|||
}.bind(this); |
|||
|
|||
img.alt = this.options.alt; |
|||
}, |
|||
|
|||
|
|||
_reset: function () { |
|||
var div = this._image; |
|||
|
|||
if (!this._map) { |
|||
return; |
|||
} |
|||
|
|||
// Project control points to container-pixel coordinates
|
|||
var pxTopLeft = this._map.latLngToLayerPoint(this._topLeft); |
|||
var pxTopRight = this._map.latLngToLayerPoint(this._topRight); |
|||
var pxBottomLeft = this._map.latLngToLayerPoint(this._bottomLeft); |
|||
|
|||
// Infer coordinate of bottom right
|
|||
var pxBottomRight = pxTopRight.subtract(pxTopLeft).add(pxBottomLeft); |
|||
|
|||
// pxBounds is mostly for positioning the <div> container
|
|||
var pxBounds = L.bounds([pxTopLeft, pxTopRight, pxBottomLeft, pxBottomRight]); |
|||
var size = pxBounds.getSize(); |
|||
var pxTopLeftInDiv = pxTopLeft.subtract(pxBounds.min); |
|||
|
|||
// LatLngBounds are needed for (zoom) animations
|
|||
this._bounds = L.latLngBounds( this._map.layerPointToLatLng(pxBounds.min), |
|||
this._map.layerPointToLatLng(pxBounds.max) ); |
|||
|
|||
L.DomUtil.setPosition(div, pxBounds.min); |
|||
|
|||
div.style.width = size.x + 'px'; |
|||
div.style.height = size.y + 'px'; |
|||
|
|||
var imgW = this._rawImage.width; |
|||
var imgH = this._rawImage.height; |
|||
if (!imgW || !imgH) { |
|||
return; // Probably because the image hasn't loaded yet.
|
|||
} |
|||
|
|||
// Sides of the control-point box, in pixels
|
|||
// These are the main ingredient for the transformation matrix.
|
|||
var vectorX = pxTopRight.subtract(pxTopLeft); |
|||
var vectorY = pxBottomLeft.subtract(pxTopLeft); |
|||
|
|||
this._rawImage.style.transformOrigin = '0 0'; |
|||
|
|||
// The transformation is an affine matrix that switches
|
|||
// coordinates around in just the right way. This is the result
|
|||
// of calculating the skew/rotation/scale matrices and simplyfing
|
|||
// everything.
|
|||
this._rawImage.style.transform = "matrix(" + |
|||
(vectorX.x/imgW) + ', ' + (vectorX.y/imgW) + ', ' + |
|||
(vectorY.x/imgH) + ', ' + (vectorY.y/imgH) + ', ' + |
|||
pxTopLeftInDiv.x + ', ' + pxTopLeftInDiv.y + ')'; |
|||
|
|||
}, |
|||
|
|||
|
|||
reposition: function(topleft, topright, bottomleft) { |
|||
this._topLeft = L.latLng(topleft); |
|||
this._topRight = L.latLng(topright); |
|||
this._bottomLeft = L.latLng(bottomleft); |
|||
this._reset(); |
|||
}, |
|||
|
|||
|
|||
setUrl: function (url) { |
|||
this._url = url; |
|||
|
|||
if (this._rawImage) { |
|||
this._rawImage.src = url; |
|||
} |
|||
return this; |
|||
} |
|||
}); |
|||
|
|||
/* 🍂factory imageOverlay.rotated(imageUrl: String|HTMLImageElement|HTMLCanvasElement, topleft: LatLng, topright: LatLng, bottomleft: LatLng, options?: ImageOverlay options) |
|||
* Instantiates a rotated/skewed image overlay, given the image URL and |
|||
* the `LatLng`s of three of its corners. |
|||
* |
|||
* Alternatively to specifying the URL of the image, an existing instance of `HTMLImageElement` |
|||
* or `HTMLCanvasElement` can be used. |
|||
*/ |
|||
L.imageOverlay.rotated = function(imgSrc, topleft, topright, bottomleft, options) { |
|||
return new L.ImageOverlay.Rotated(imgSrc, topleft, topright, bottomleft, options); |
|||
}; |
|||
@ -0,0 +1,636 @@ |
|||
/* required styles */ |
|||
|
|||
.leaflet-pane, |
|||
.leaflet-tile, |
|||
.leaflet-marker-icon, |
|||
.leaflet-marker-shadow, |
|||
.leaflet-tile-container, |
|||
.leaflet-pane > svg, |
|||
.leaflet-pane > canvas, |
|||
.leaflet-zoom-box, |
|||
.leaflet-image-layer, |
|||
.leaflet-layer { |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
} |
|||
.leaflet-container { |
|||
overflow: hidden; |
|||
} |
|||
.leaflet-tile, |
|||
.leaflet-marker-icon, |
|||
.leaflet-marker-shadow { |
|||
-webkit-user-select: none; |
|||
-moz-user-select: none; |
|||
user-select: none; |
|||
-webkit-user-drag: none; |
|||
} |
|||
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ |
|||
.leaflet-safari .leaflet-tile { |
|||
image-rendering: -webkit-optimize-contrast; |
|||
} |
|||
/* hack that prevents hw layers "stretching" when loading new tiles */ |
|||
.leaflet-safari .leaflet-tile-container { |
|||
width: 1600px; |
|||
height: 1600px; |
|||
-webkit-transform-origin: 0 0; |
|||
} |
|||
.leaflet-marker-icon, |
|||
.leaflet-marker-shadow { |
|||
display: block; |
|||
} |
|||
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ |
|||
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ |
|||
.leaflet-container .leaflet-overlay-pane svg, |
|||
.leaflet-container .leaflet-marker-pane img, |
|||
.leaflet-container .leaflet-shadow-pane img, |
|||
.leaflet-container .leaflet-tile-pane img, |
|||
.leaflet-container img.leaflet-image-layer { |
|||
max-width: none !important; |
|||
max-height: none !important; |
|||
} |
|||
|
|||
.leaflet-container.leaflet-touch-zoom { |
|||
-ms-touch-action: pan-x pan-y; |
|||
touch-action: pan-x pan-y; |
|||
} |
|||
.leaflet-container.leaflet-touch-drag { |
|||
-ms-touch-action: pinch-zoom; |
|||
/* Fallback for FF which doesn't support pinch-zoom */ |
|||
touch-action: none; |
|||
touch-action: pinch-zoom; |
|||
} |
|||
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { |
|||
-ms-touch-action: none; |
|||
touch-action: none; |
|||
} |
|||
.leaflet-container { |
|||
-webkit-tap-highlight-color: transparent; |
|||
} |
|||
.leaflet-container a { |
|||
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); |
|||
} |
|||
.leaflet-tile { |
|||
filter: inherit; |
|||
visibility: hidden; |
|||
} |
|||
.leaflet-tile-loaded { |
|||
visibility: inherit; |
|||
} |
|||
.leaflet-zoom-box { |
|||
width: 0; |
|||
height: 0; |
|||
-moz-box-sizing: border-box; |
|||
box-sizing: border-box; |
|||
z-index: 800; |
|||
} |
|||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ |
|||
.leaflet-overlay-pane svg { |
|||
-moz-user-select: none; |
|||
} |
|||
|
|||
.leaflet-pane { z-index: 400; } |
|||
|
|||
.leaflet-tile-pane { z-index: 200; } |
|||
.leaflet-overlay-pane { z-index: 400; } |
|||
.leaflet-shadow-pane { z-index: 500; } |
|||
.leaflet-marker-pane { z-index: 600; } |
|||
.leaflet-tooltip-pane { z-index: 650; } |
|||
.leaflet-popup-pane { z-index: 700; } |
|||
|
|||
.leaflet-map-pane canvas { z-index: 100; } |
|||
.leaflet-map-pane svg { z-index: 200; } |
|||
|
|||
.leaflet-vml-shape { |
|||
width: 1px; |
|||
height: 1px; |
|||
} |
|||
.lvml { |
|||
behavior: url(#default#VML); |
|||
display: inline-block; |
|||
position: absolute; |
|||
} |
|||
|
|||
|
|||
/* control positioning */ |
|||
|
|||
.leaflet-control { |
|||
position: relative; |
|||
z-index: 800; |
|||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ |
|||
pointer-events: auto; |
|||
} |
|||
.leaflet-top, |
|||
.leaflet-bottom { |
|||
position: absolute; |
|||
z-index: 1000; |
|||
pointer-events: none; |
|||
} |
|||
.leaflet-top { |
|||
top: 0; |
|||
} |
|||
.leaflet-right { |
|||
right: 0; |
|||
} |
|||
.leaflet-bottom { |
|||
bottom: 0; |
|||
} |
|||
.leaflet-left { |
|||
left: 0; |
|||
} |
|||
.leaflet-control { |
|||
float: left; |
|||
clear: both; |
|||
} |
|||
.leaflet-right .leaflet-control { |
|||
float: right; |
|||
} |
|||
.leaflet-top .leaflet-control { |
|||
margin-top: 10px; |
|||
} |
|||
.leaflet-bottom .leaflet-control { |
|||
margin-bottom: 10px; |
|||
} |
|||
.leaflet-left .leaflet-control { |
|||
margin-left: 10px; |
|||
} |
|||
.leaflet-right .leaflet-control { |
|||
margin-right: 10px; |
|||
} |
|||
|
|||
|
|||
/* zoom and fade animations */ |
|||
|
|||
.leaflet-fade-anim .leaflet-tile { |
|||
will-change: opacity; |
|||
} |
|||
.leaflet-fade-anim .leaflet-popup { |
|||
opacity: 0; |
|||
-webkit-transition: opacity 0.2s linear; |
|||
-moz-transition: opacity 0.2s linear; |
|||
-o-transition: opacity 0.2s linear; |
|||
transition: opacity 0.2s linear; |
|||
} |
|||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { |
|||
opacity: 1; |
|||
} |
|||
.leaflet-zoom-animated { |
|||
-webkit-transform-origin: 0 0; |
|||
-ms-transform-origin: 0 0; |
|||
transform-origin: 0 0; |
|||
} |
|||
.leaflet-zoom-anim .leaflet-zoom-animated { |
|||
will-change: transform; |
|||
} |
|||
.leaflet-zoom-anim .leaflet-zoom-animated { |
|||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); |
|||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); |
|||
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); |
|||
transition: transform 0.25s cubic-bezier(0,0,0.25,1); |
|||
} |
|||
.leaflet-zoom-anim .leaflet-tile, |
|||
.leaflet-pan-anim .leaflet-tile { |
|||
-webkit-transition: none; |
|||
-moz-transition: none; |
|||
-o-transition: none; |
|||
transition: none; |
|||
} |
|||
|
|||
.leaflet-zoom-anim .leaflet-zoom-hide { |
|||
visibility: hidden; |
|||
} |
|||
|
|||
|
|||
/* cursors */ |
|||
|
|||
.leaflet-interactive { |
|||
cursor: pointer; |
|||
} |
|||
.leaflet-grab { |
|||
cursor: -webkit-grab; |
|||
cursor: -moz-grab; |
|||
} |
|||
.leaflet-crosshair, |
|||
.leaflet-crosshair .leaflet-interactive { |
|||
cursor: crosshair; |
|||
} |
|||
.leaflet-popup-pane, |
|||
.leaflet-control { |
|||
cursor: auto; |
|||
} |
|||
.leaflet-dragging .leaflet-grab, |
|||
.leaflet-dragging .leaflet-grab .leaflet-interactive, |
|||
.leaflet-dragging .leaflet-marker-draggable { |
|||
cursor: move; |
|||
cursor: -webkit-grabbing; |
|||
cursor: -moz-grabbing; |
|||
} |
|||
|
|||
/* marker & overlays interactivity */ |
|||
.leaflet-marker-icon, |
|||
.leaflet-marker-shadow, |
|||
.leaflet-image-layer, |
|||
.leaflet-pane > svg path, |
|||
.leaflet-tile-container { |
|||
pointer-events: none; |
|||
} |
|||
|
|||
.leaflet-marker-icon.leaflet-interactive, |
|||
.leaflet-image-layer.leaflet-interactive, |
|||
.leaflet-pane > svg path.leaflet-interactive { |
|||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ |
|||
pointer-events: auto; |
|||
} |
|||
|
|||
/* visual tweaks */ |
|||
|
|||
.leaflet-container { |
|||
background: #ddd; |
|||
outline: 0; |
|||
} |
|||
.leaflet-container a { |
|||
color: #0078A8; |
|||
} |
|||
.leaflet-container a.leaflet-active { |
|||
outline: 2px solid orange; |
|||
} |
|||
.leaflet-zoom-box { |
|||
border: 2px dotted #38f; |
|||
background: rgba(255,255,255,0.5); |
|||
} |
|||
|
|||
|
|||
/* general typography */ |
|||
.leaflet-container { |
|||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; |
|||
} |
|||
|
|||
|
|||
/* general toolbar styles */ |
|||
|
|||
.leaflet-bar { |
|||
box-shadow: 0 1px 5px rgba(0,0,0,0.65); |
|||
border-radius: 4px; |
|||
} |
|||
.leaflet-bar a, |
|||
.leaflet-bar a:hover { |
|||
background-color: #fff; |
|||
border-bottom: 1px solid #ccc; |
|||
width: 26px; |
|||
height: 26px; |
|||
line-height: 26px; |
|||
display: block; |
|||
text-align: center; |
|||
text-decoration: none; |
|||
color: black; |
|||
} |
|||
.leaflet-bar a, |
|||
.leaflet-control-layers-toggle { |
|||
background-position: 50% 50%; |
|||
background-repeat: no-repeat; |
|||
display: block; |
|||
} |
|||
.leaflet-bar a:hover { |
|||
background-color: #f4f4f4; |
|||
} |
|||
.leaflet-bar a:first-child { |
|||
border-top-left-radius: 4px; |
|||
border-top-right-radius: 4px; |
|||
} |
|||
.leaflet-bar a:last-child { |
|||
border-bottom-left-radius: 4px; |
|||
border-bottom-right-radius: 4px; |
|||
border-bottom: none; |
|||
} |
|||
.leaflet-bar a.leaflet-disabled { |
|||
cursor: default; |
|||
background-color: #f4f4f4; |
|||
color: #bbb; |
|||
} |
|||
|
|||
.leaflet-touch .leaflet-bar a { |
|||
width: 30px; |
|||
height: 30px; |
|||
line-height: 30px; |
|||
} |
|||
.leaflet-touch .leaflet-bar a:first-child { |
|||
border-top-left-radius: 2px; |
|||
border-top-right-radius: 2px; |
|||
} |
|||
.leaflet-touch .leaflet-bar a:last-child { |
|||
border-bottom-left-radius: 2px; |
|||
border-bottom-right-radius: 2px; |
|||
} |
|||
|
|||
/* zoom control */ |
|||
|
|||
.leaflet-control-zoom-in, |
|||
.leaflet-control-zoom-out { |
|||
font: bold 18px 'Lucida Console', Monaco, monospace; |
|||
text-indent: 1px; |
|||
} |
|||
|
|||
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { |
|||
font-size: 22px; |
|||
} |
|||
|
|||
|
|||
/* layers control */ |
|||
|
|||
.leaflet-control-layers { |
|||
box-shadow: 0 1px 5px rgba(0,0,0,0.4); |
|||
background: #fff; |
|||
border-radius: 5px; |
|||
} |
|||
.leaflet-control-layers-toggle { |
|||
background-image: url(images/layers.png); |
|||
width: 36px; |
|||
height: 36px; |
|||
} |
|||
.leaflet-retina .leaflet-control-layers-toggle { |
|||
background-image: url(images/layers-2x.png); |
|||
background-size: 26px 26px; |
|||
} |
|||
.leaflet-touch .leaflet-control-layers-toggle { |
|||
width: 44px; |
|||
height: 44px; |
|||
} |
|||
.leaflet-control-layers .leaflet-control-layers-list, |
|||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle { |
|||
display: none; |
|||
} |
|||
.leaflet-control-layers-expanded .leaflet-control-layers-list { |
|||
display: block; |
|||
position: relative; |
|||
} |
|||
.leaflet-control-layers-expanded { |
|||
padding: 6px 10px 6px 6px; |
|||
color: #333; |
|||
background: #fff; |
|||
} |
|||
.leaflet-control-layers-scrollbar { |
|||
overflow-y: scroll; |
|||
overflow-x: hidden; |
|||
padding-right: 5px; |
|||
} |
|||
.leaflet-control-layers-selector { |
|||
margin-top: 2px; |
|||
position: relative; |
|||
top: 1px; |
|||
} |
|||
.leaflet-control-layers label { |
|||
display: block; |
|||
} |
|||
.leaflet-control-layers-separator { |
|||
height: 0; |
|||
border-top: 1px solid #ddd; |
|||
margin: 5px -10px 5px -6px; |
|||
} |
|||
|
|||
/* Default icon URLs */ |
|||
.leaflet-default-icon-path { |
|||
background-image: url(images/marker-icon.png); |
|||
} |
|||
|
|||
|
|||
/* attribution and scale controls */ |
|||
|
|||
.leaflet-container .leaflet-control-attribution { |
|||
background: #fff; |
|||
background: rgba(255, 255, 255, 0.7); |
|||
margin: 0; |
|||
} |
|||
.leaflet-control-attribution, |
|||
.leaflet-control-scale-line { |
|||
padding: 0 5px; |
|||
color: #333; |
|||
} |
|||
.leaflet-control-attribution a { |
|||
text-decoration: none; |
|||
} |
|||
.leaflet-control-attribution a:hover { |
|||
text-decoration: underline; |
|||
} |
|||
.leaflet-container .leaflet-control-attribution, |
|||
.leaflet-container .leaflet-control-scale { |
|||
font-size: 11px; |
|||
} |
|||
.leaflet-left .leaflet-control-scale { |
|||
margin-left: 5px; |
|||
} |
|||
.leaflet-bottom .leaflet-control-scale { |
|||
margin-bottom: 5px; |
|||
} |
|||
.leaflet-control-scale-line { |
|||
border: 2px solid #777; |
|||
border-top: none; |
|||
line-height: 1.1; |
|||
padding: 2px 5px 1px; |
|||
font-size: 11px; |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
-moz-box-sizing: border-box; |
|||
box-sizing: border-box; |
|||
|
|||
background: #fff; |
|||
background: rgba(255, 255, 255, 0.5); |
|||
} |
|||
.leaflet-control-scale-line:not(:first-child) { |
|||
border-top: 2px solid #777; |
|||
border-bottom: none; |
|||
margin-top: -2px; |
|||
} |
|||
.leaflet-control-scale-line:not(:first-child):not(:last-child) { |
|||
border-bottom: 2px solid #777; |
|||
} |
|||
|
|||
.leaflet-touch .leaflet-control-attribution, |
|||
.leaflet-touch .leaflet-control-layers, |
|||
.leaflet-touch .leaflet-bar { |
|||
box-shadow: none; |
|||
} |
|||
.leaflet-touch .leaflet-control-layers, |
|||
.leaflet-touch .leaflet-bar { |
|||
border: 2px solid rgba(0,0,0,0.2); |
|||
background-clip: padding-box; |
|||
} |
|||
|
|||
|
|||
/* popup */ |
|||
|
|||
.leaflet-popup { |
|||
position: absolute; |
|||
text-align: center; |
|||
margin-bottom: 20px; |
|||
} |
|||
.leaflet-popup-content-wrapper { |
|||
padding: 1px; |
|||
text-align: left; |
|||
border-radius: 12px; |
|||
} |
|||
.leaflet-popup-content { |
|||
margin: 13px 19px; |
|||
line-height: 1.4; |
|||
} |
|||
.leaflet-popup-content p { |
|||
margin: 18px 0; |
|||
} |
|||
.leaflet-popup-tip-container { |
|||
width: 40px; |
|||
height: 20px; |
|||
position: absolute; |
|||
left: 50%; |
|||
margin-left: -20px; |
|||
overflow: hidden; |
|||
pointer-events: none; |
|||
} |
|||
.leaflet-popup-tip { |
|||
width: 17px; |
|||
height: 17px; |
|||
padding: 1px; |
|||
|
|||
margin: -10px auto 0; |
|||
|
|||
-webkit-transform: rotate(45deg); |
|||
-moz-transform: rotate(45deg); |
|||
-ms-transform: rotate(45deg); |
|||
-o-transform: rotate(45deg); |
|||
transform: rotate(45deg); |
|||
} |
|||
.leaflet-popup-content-wrapper, |
|||
.leaflet-popup-tip { |
|||
background: white; |
|||
color: #333; |
|||
box-shadow: 0 3px 14px rgba(0,0,0,0.4); |
|||
} |
|||
.leaflet-container a.leaflet-popup-close-button { |
|||
position: absolute; |
|||
top: 0; |
|||
right: 0; |
|||
padding: 4px 4px 0 0; |
|||
border: none; |
|||
text-align: center; |
|||
width: 18px; |
|||
height: 14px; |
|||
font: 16px/14px Tahoma, Verdana, sans-serif; |
|||
color: #c3c3c3; |
|||
text-decoration: none; |
|||
font-weight: bold; |
|||
background: transparent; |
|||
} |
|||
.leaflet-container a.leaflet-popup-close-button:hover { |
|||
color: #999; |
|||
} |
|||
.leaflet-popup-scrolled { |
|||
overflow: auto; |
|||
border-bottom: 1px solid #ddd; |
|||
border-top: 1px solid #ddd; |
|||
} |
|||
|
|||
.leaflet-oldie .leaflet-popup-content-wrapper { |
|||
zoom: 1; |
|||
} |
|||
.leaflet-oldie .leaflet-popup-tip { |
|||
width: 24px; |
|||
margin: 0 auto; |
|||
|
|||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; |
|||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); |
|||
} |
|||
.leaflet-oldie .leaflet-popup-tip-container { |
|||
margin-top: -1px; |
|||
} |
|||
|
|||
.leaflet-oldie .leaflet-control-zoom, |
|||
.leaflet-oldie .leaflet-control-layers, |
|||
.leaflet-oldie .leaflet-popup-content-wrapper, |
|||
.leaflet-oldie .leaflet-popup-tip { |
|||
border: 1px solid #999; |
|||
} |
|||
|
|||
|
|||
/* div icon */ |
|||
|
|||
.leaflet-div-icon { |
|||
background: #fff; |
|||
border: 1px solid #666; |
|||
} |
|||
|
|||
|
|||
/* Tooltip */ |
|||
/* Base styles for the element that has a tooltip */ |
|||
.leaflet-tooltip { |
|||
position: absolute; |
|||
padding: 6px; |
|||
background-color: #fff; |
|||
border: 1px solid #fff; |
|||
border-radius: 3px; |
|||
color: #222; |
|||
white-space: nowrap; |
|||
-webkit-user-select: none; |
|||
-moz-user-select: none; |
|||
-ms-user-select: none; |
|||
user-select: none; |
|||
pointer-events: none; |
|||
box-shadow: 0 1px 3px rgba(0,0,0,0.4); |
|||
} |
|||
.leaflet-tooltip.leaflet-clickable { |
|||
cursor: pointer; |
|||
pointer-events: auto; |
|||
} |
|||
.leaflet-tooltip-top:before, |
|||
.leaflet-tooltip-bottom:before, |
|||
.leaflet-tooltip-left:before, |
|||
.leaflet-tooltip-right:before { |
|||
position: absolute; |
|||
pointer-events: none; |
|||
border: 6px solid transparent; |
|||
background: transparent; |
|||
content: ""; |
|||
} |
|||
|
|||
/* Directions */ |
|||
|
|||
.leaflet-tooltip-bottom { |
|||
margin-top: 6px; |
|||
} |
|||
.leaflet-tooltip-top { |
|||
margin-top: -6px; |
|||
} |
|||
.leaflet-tooltip-bottom:before, |
|||
.leaflet-tooltip-top:before { |
|||
left: 50%; |
|||
margin-left: -6px; |
|||
} |
|||
.leaflet-tooltip-top:before { |
|||
bottom: 0; |
|||
margin-bottom: -12px; |
|||
border-top-color: #fff; |
|||
} |
|||
.leaflet-tooltip-bottom:before { |
|||
top: 0; |
|||
margin-top: -12px; |
|||
margin-left: -6px; |
|||
border-bottom-color: #fff; |
|||
} |
|||
.leaflet-tooltip-left { |
|||
margin-left: -6px; |
|||
} |
|||
.leaflet-tooltip-right { |
|||
margin-left: 6px; |
|||
} |
|||
.leaflet-tooltip-left:before, |
|||
.leaflet-tooltip-right:before { |
|||
top: 50%; |
|||
margin-top: -6px; |
|||
} |
|||
.leaflet-tooltip-left:before { |
|||
right: 0; |
|||
margin-right: -12px; |
|||
border-left-color: #fff; |
|||
} |
|||
.leaflet-tooltip-right:before { |
|||
left: 0; |
|||
margin-left: -12px; |
|||
border-right-color: #fff; |
|||
} |
|||
6
lib/javascript/leaflet/leaflet.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
5
lib/javascript/leaflet/leaflet__.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,2 @@ |
|||
/*! @name videojs-offset @version 2.1.0 @license MIT */ |
|||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],e):(t=t||self).videojsOffset=e(t.videojs)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={},i=t.registerPlugin||t.plugin,r=function t(){var e=this.currentTime();e<0&&(this.currentTime(0),this.play()),this._offsetEnd>0&&e>this._offsetEnd-this._offsetStart&&(this.off("timeupdate",t),this.pause(),this.trigger("ended"),this._restartBeginning?(this.trigger("loadstart"),this.currentTime(0)):this.currentTime(this._offsetEnd-this._offsetStart))},n=function(i){var n=this;i=i||{};var s=this.constructor;this._offsetStart=parseFloat(i.start||"0"),this._offsetEnd=parseFloat(i.end||"0"),this._restartBeginning=i.restart_beginning||!1,s.__super__&&s.__super__.__offsetInit||(s.__super__={__offsetInit:!0,duration:s.prototype.duration,currentTime:s.prototype.currentTime,bufferedPercent:s.prototype.bufferedPercent,remainingTime:s.prototype.remainingTime},s.prototype.duration=function(){return this._offsetEnd>0?this._offsetEnd-this._offsetStart:s.__super__.duration.apply(this,arguments)-this._offsetStart},s.prototype.currentTime=function(t){return void 0!==t?s.__super__.currentTime.call(this,t+this._offsetStart):s.__super__.currentTime.apply(this)-this._offsetStart},s.prototype.remainingTime=function(){return this.duration()-this.currentTime()},s.prototype.startOffset=function(){return this._offsetStart},s.prototype.endOffset=function(){return this._offsetEnd>0?this._offsetEnd:this.duration()}),this.ready(function(){var s;s=n,t.mergeOptions(e,i),s.one("play",function(){s.on("timeupdate",r)})})};return i("offset",n),n.VERSION="2.1.0",n}); |
|||
@ -1,54 +0,0 @@ |
|||
<?php |
|||
$SessionIsAutorised=false; |
|||
if(isset($_COOKIE['UID'])){ // User ID transmitted just by cookies
|
|||
$UserID=$_COOKIE['UID']; |
|||
} else $UserID=""; |
|||
|
|||
if(isset($_COOKIE['FROM'])){ // User ID transmitted just by cookies
|
|||
$LastVisited=$_COOKIE['FROM']; |
|||
} else $LastVisited=""; |
|||
|
|||
setcookie('FROM',getenv('SCRIPT_NAME')); |
|||
|
|||
if(isset($_COOKIE['SID'])){ // Session ID transmitted just by cookies
|
|||
$Session=$_COOKIE['SID']; |
|||
} else $Session=""; |
|||
|
|||
if(isset($_COOKIE['Lang'])){ // Language settings transmitted by cookie
|
|||
$UserLang=$_COOKIE['Lang']; |
|||
} else $UserLang=0; |
|||
|
|||
// New Way Cookie deletion
|
|||
if ($UserID==='deleted') $UserID=''; |
|||
|
|||
|
|||
if (isset($_POST['login'])) { |
|||
$Login=$_POST['login']; |
|||
//$UserID=""; to do logout of previouse user
|
|||
} elseif (isset($_GET['login'])) { |
|||
$Login=$_GET['login']; |
|||
} elseif ($UserID === "" ) { |
|||
$Login="guest"; |
|||
//$UserID=1;
|
|||
} else $Login=""; |
|||
|
|||
|
|||
if (isset($_POST['password'])) { |
|||
$Password=$_POST['password']; |
|||
} else $Password=""; |
|||
|
|||
$CUser=new User(); |
|||
|
|||
$SessionIsAutorised=$CUser->Login($Login,$Password,$UserID,$Session); |
|||
if ( $SessionIsAutorised && $CUser->Data['id']>1){ |
|||
$CUser->FillInfo($CUser->Data['id']); |
|||
setcookie('UID',$CUser->Data['id']); |
|||
setcookie('SID',$CUser->Data['SID']); |
|||
//if ($CUser->ID > 1 ) setcookie('Lang',$CUser->Language);
|
|||
}; |
|||
if ( $CUser->Data['id']==1 ){ |
|||
$CUser->Data['status']=''; |
|||
setcookie('UID',$CUser->Data['id']); |
|||
//$CUser->Language=$UserLang;
|
|||
}; |
|||
?>
|
|||
@ -0,0 +1,70 @@ |
|||
<?php |
|||
|
|||
define( "ACTION_LOGOUT", 0 ); |
|||
define( "ACTION_LOGIN", 1 ); |
|||
define( "ACTION_FAILED_LOGIN", 2 ); |
|||
define( "ACTION_SCREEN_RESIZE", 145 ); |
|||
//define( "ARGUS_LFS_SENSOR", 2 );
|
|||
//define( "ARGUS_PLS_200_SENSOR", 3 );
|
|||
//define( "ARGUS_PLS_360_SENSOR", 4 );
|
|||
//define( "ARGUS_3D_SENSOR", 5 );
|
|||
//define( "ARGUS_NET_PLS_200", 6 );
|
|||
//define( "ARGUS_ANALOG_STATIC_CAMERA", 10 );
|
|||
//define( "ARGUS_ANALOG_PTZ_CAMERA", 11 );
|
|||
//define( "ARGUS_IP_STATIC_CAMERA", 12 );
|
|||
//define( "ARGUS_IP_PTZ_CAMERA", 13 );
|
|||
//define( "ARGUS_IP_UART_GATEWAY", 20 );
|
|||
//define( "ARGUS_JAMER", 40 );
|
|||
//define( "ARGUS_IP_VIDEO_SERVER", 50 );
|
|||
//define( "ARGUS_DRONE_CONTROL", 60 );
|
|||
|
|||
define( "LOG_LVL_NONE", 0 ); |
|||
define( "LOG_LVL_INFO", 1 ); |
|||
define( "LOG_LVL_CONFIG", 2 ); |
|||
define( "LOG_LVL_MNGMT", 4 ); |
|||
define( "LOG_LVL_SECURITY", 8 ); |
|||
define( "LOG_LVL_ERROR", 128 ); |
|||
define( "LOG_LVL_ALL", 255 ); |
|||
|
|||
|
|||
class Logio{ |
|||
var $USERID; |
|||
var $FLT; |
|||
function Logio( $LL = LOG_LVL_ALL ){ |
|||
$this->FLT = $LL; |
|||
$this->USERID = 1; |
|||
} |
|||
function SysLog( $CMD, $LVL, $Dataset = '' ){ |
|||
global $DATABASE; |
|||
if( $this->USERID < 2 ) return; |
|||
if( ( $LVL & $this->FLT ) == $LVL ){ |
|||
if( $Dataset == '' ){ |
|||
$QS = "INSERT INTO `access_log` SET `user_id`={$this->USERID}, `ts`=NOW(), `cmd`={$CMD}"; |
|||
} else { |
|||
$DS = $DATABASE->escape( json_encode( $Dataset ) ); |
|||
$QS = "INSERT INTO `access_log` SET `user_id`={$this->USERID}, `ts`=NOW(), `cmd`={$CMD}, `dataset`='{$DS}'"; |
|||
}; |
|||
$DATABASE->Query( $QS ); |
|||
}; |
|||
} |
|||
function SetUID( $UID ){ |
|||
$this->USERID = $UID; |
|||
} |
|||
function ScreenChanges( $OW, $OH, $NW, $NH ){ |
|||
$Dataset['old']=array( 'width'=>$OW, 'height'=>$OH ); |
|||
$Dataset['new']=array( 'width'=>$NW, 'height'=>$NH ); |
|||
$this->SysLog( ACTION_SCREEN_RESIZE, LOG_LVL_INFO, $Dataset ); |
|||
} |
|||
function login(){ |
|||
$this->SysLog( ACTION_LOGIN, LOG_LVL_INFO ); |
|||
} |
|||
function logout(){ |
|||
$this->SysLog( ACTION_LOGOUT, LOG_LVL_INFO ); |
|||
} |
|||
function login_failure($Login,$Password,$UserID,$Session){ |
|||
$Dataset=array(); |
|||
$this->SysLog( ACTION_FAILED_LOGIN, LOG_LVL_SECURITY ); |
|||
} |
|||
}; |
|||
|
|||
?>
|
|||
@ -0,0 +1,534 @@ |
|||
<?php |
|||
/*------------------------------------------------------------------------------ |
|||
** File: gPoint.php |
|||
** Description: PHP class to convert Latitude & Longitude coordinates into |
|||
** UTM & Lambert Conic Conformal Northing/Easting coordinates. |
|||
** Version: 1.3 |
|||
** Author: Brenor Brophy |
|||
** Email: brenor dot brophy at gmail dot com |
|||
** Homepage: brenorbrophy.com |
|||
**------------------------------------------------------------------------------ |
|||
** COPYRIGHT (c) 2005, 2006, 2007, 2008 BRENOR BROPHY |
|||
** |
|||
** The source code included in this package is free software; you can |
|||
** redistribute it and/or modify it under the terms of the GNU General Public |
|||
** License as published by the Free Software Foundation. This license can be |
|||
** read at: |
|||
** |
|||
** http://www.opensource.org/licenses/gpl-license.php |
|||
** |
|||
** This program is distributed in the hope that it will be useful, but WITHOUT |
|||
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|||
** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|||
**------------------------------------------------------------------------------ |
|||
** |
|||
** Code for datum and UTM conversion was converted from C++ code written by |
|||
** Chuck Gantz (chuck dot gantz at globalstar dot com) from |
|||
** http://www.gpsy.com/gpsinfo/geotoutm/ This URL has many other references to |
|||
** useful information concerning conversion of coordinates. |
|||
** |
|||
** Rev History |
|||
** ----------------------------------------------------------------------------- |
|||
** 1.0 08/25/2005 Initial Release |
|||
** 1.1 05/15/2006 Added software license language to header comments |
|||
** Fixed an error in the convertTMtoLL() method. The latitude |
|||
** calculation had a bunch of variables without $ symbols. |
|||
** Fixed an error in convertLLtoTM() method, The $this-> was |
|||
** missing in front of a couple of variables. Thanks to Bob |
|||
** Robins of Maryland for catching the bugs. |
|||
** 1.2 05/18/2007 Added default of NULL to $LongOrigin arguement in convertTMtoLL() |
|||
** and convertLLtoTM() to eliminate warning messages when the |
|||
** methods are called without a value for $LongOrigin. |
|||
** 1.3 02/21/2008 Fixed a bug in the distanceFrom method, where the input parameters |
|||
** were not being converted to radians prior to calculating the |
|||
** distance. Thanks to Enrico Benco for finding pointing it out. |
|||
*/ |
|||
define ("meter2nm", (1/1852)); |
|||
define ("nm2meter", 1852); |
|||
|
|||
/*------------------------------------------------------------------------------ |
|||
** class gPoint ... for Geographic Point |
|||
** |
|||
** This class encapsulates the methods for representing a geographic point on the |
|||
** earth in three different coordinate systema. Lat/Long, UTM and Lambert Conic |
|||
** Conformal. |
|||
*/ |
|||
class gPoint |
|||
{ |
|||
/* Reference ellipsoids derived from Peter H. Dana's website- |
|||
** http://www.colorado.edu/geography/gcraft/notes/datum/datum_f.html |
|||
** email: pdana@pdana.com, web page: www.pdana.com |
|||
** |
|||
** Source: |
|||
** Defense Mapping Agency. 1987b. DMA Technical Report: Supplement to Department |
|||
** of Defense World Geodetic System 1984 Technical Report. Part I and II. |
|||
** Washington, DC: Defense Mapping Agency |
|||
*/ |
|||
var $ellipsoid = array(//Ellipsoid name, Equatorial Radius, square of eccentricity
|
|||
"Airy" =>array (6377563, 0.00667054), |
|||
"Australian National" =>array (6378160, 0.006694542), |
|||
"Bessel 1841" =>array (6377397, 0.006674372), |
|||
"Bessel 1841 Nambia" =>array (6377484, 0.006674372), |
|||
"Clarke 1866" =>array (6378206, 0.006768658), |
|||
"Clarke 1880" =>array (6378249, 0.006803511), |
|||
"Everest" =>array (6377276, 0.006637847), |
|||
"Fischer 1960 Mercury" =>array (6378166, 0.006693422), |
|||
"Fischer 1968" =>array (6378150, 0.006693422), |
|||
"GRS 1967" =>array (6378160, 0.006694605), |
|||
"GRS 1980" =>array (6378137, 0.00669438), |
|||
"Helmert 1906" =>array (6378200, 0.006693422), |
|||
"Hough" =>array (6378270, 0.00672267), |
|||
"International" =>array (6378388, 0.00672267), |
|||
"Krassovsky" =>array (6378245, 0.006693422), |
|||
"Modified Airy" =>array (6377340, 0.00667054), |
|||
"Modified Everest" =>array (6377304, 0.006637847), |
|||
"Modified Fischer 1960" =>array (6378155, 0.006693422), |
|||
"South American 1969" =>array (6378160, 0.006694542), |
|||
"WGS 60" =>array (6378165, 0.006693422), |
|||
"WGS 66" =>array (6378145, 0.006694542), |
|||
"WGS 72" =>array (6378135, 0.006694318), |
|||
"WGS 84" =>array (6378137, 0.00669438)); |
|||
|
|||
// Properties
|
|||
var $a; // Equatorial Radius
|
|||
var $e2; // Square of eccentricity
|
|||
var $datum; // Selected datum
|
|||
var $Xp, $Yp; // X,Y pixel location
|
|||
var $lat, $long; // Latitude & Longitude of the point
|
|||
var $utmNorthing, $utmEasting, $utmZone; // UTM Coordinates of the point
|
|||
var $lccNorthing, $lccEasting; // Lambert coordinates of the point
|
|||
var $falseNorthing, $falseEasting; // Origin coordinates for Lambert Projection
|
|||
var $latOfOrigin; // For Lambert Projection
|
|||
var $longOfOrigin; // For Lambert Projection
|
|||
var $firstStdParallel; // For lambert Projection
|
|||
var $secondStdParallel; // For lambert Projection
|
|||
|
|||
// constructor
|
|||
function gPoint($datum='WGS 84') // Default datum is WGS 84
|
|||
{ |
|||
$this->a = $this->ellipsoid[$datum][0]; // Set datum Equatorial Radius
|
|||
$this->e2 = $this->ellipsoid[$datum][1]; // Set datum Square of eccentricity
|
|||
$this->datum = $datum; // Save the datum
|
|||
} |
|||
//
|
|||
// Set/Get X & Y pixel of the point (used if it is being drawn on an image)
|
|||
//
|
|||
function setXY($x, $y) |
|||
{ |
|||
$this->Xp = $x; $this->Yp = $y; |
|||
} |
|||
function Xp() { return $this->Xp; } |
|||
function Yp() { return $this->Yp; } |
|||
//
|
|||
// Set/Get/Output Longitude & Latitude of the point
|
|||
//
|
|||
function setLongLat($long, $lat) |
|||
{ |
|||
$this->long = $long; $this->lat = $lat; |
|||
} |
|||
function Lat() { return $this->lat; } |
|||
function Long() { return $this->long; } |
|||
function printLatLong() { printf("Latitude: %1.5f Longitude: %1.5f",$this->lat, $this->long); } |
|||
//
|
|||
// Set/Get/Output Universal Transverse Mercator Coordinates
|
|||
//
|
|||
function setUTM($easting, $northing, $zone='') // Zone is optional
|
|||
{ |
|||
$this->utmNorthing = $northing; |
|||
$this->utmEasting = $easting; |
|||
$this->utmZone = $zone; |
|||
} |
|||
function N() { return $this->utmNorthing; } |
|||
function E() { return $this->utmEasting; } |
|||
function Z() { return $this->utmZone; } |
|||
function printUTM() { print( "Northing: ".(int)$this->utmNorthing.", Easting: ".(int)$this->utmEasting.", Zone: ".$this->utmZone); } |
|||
//
|
|||
// Set/Get/Output Lambert Conic Conformal Coordinates
|
|||
//
|
|||
function setLambert($easting, $northing) |
|||
{ |
|||
$this->lccNorthing = $northing; |
|||
$this->lccEasting = $easting; |
|||
} |
|||
function lccN() { return $this->lccNorthing; } |
|||
function lccE() { return $this->lccEasting; } |
|||
function printLambert() { print( "Northing: ".(int)$this->lccNorthing.", Easting: ".(int)$this->lccEasting); } |
|||
|
|||
//------------------------------------------------------------------------------
|
|||
//
|
|||
// Convert Longitude/Latitude to UTM
|
|||
//
|
|||
// Equations from USGS Bulletin 1532
|
|||
// East Longitudes are positive, West longitudes are negative.
|
|||
// North latitudes are positive, South latitudes are negative
|
|||
// Lat and Long are in decimal degrees
|
|||
// Written by Chuck Gantz- chuck dot gantz at globalstar dot com, converted to PHP by
|
|||
// Brenor Brophy, brenor dot brophy at gmail dot com
|
|||
//
|
|||
// UTM coordinates are useful when dealing with paper maps. Basically the
|
|||
// map will can cover a single UTM zone which is 6 degrees on longitude.
|
|||
// So you really don't care about an object crossing two zones. You just get a
|
|||
// second map of the other zone. However, if you happen to live in a place that
|
|||
// straddles two zones (For example the Santa Babara area in CA straddles zone 10
|
|||
// and zone 11) Then it can become a real pain having to have two maps all the time.
|
|||
// So relatively small parts of the world (like say California) create their own
|
|||
// version of UTM coordinates that are adjusted to conver the whole area of interest
|
|||
// on a single map. These are called state grids. The projection system is the
|
|||
// usually same as UTM (i.e. Transverse Mercator), but the central meridian
|
|||
// aka Longitude of Origin is selected to suit the logitude of the area being
|
|||
// mapped (like being moved to the central meridian of the area) and the grid
|
|||
// may cover more than the 6 degrees of lingitude found on a UTM map. Areas
|
|||
// that are wide rather than long - think Montana as an example. May still
|
|||
// have to have a couple of maps to cover the whole state because TM projection
|
|||
// looses accuracy as you move further away from the Longitude of Origin, 15 degrees
|
|||
// is usually the limit.
|
|||
//
|
|||
// Now, in the case where we want to generate electronic maps that may be
|
|||
// placed pretty much anywhere on the globe we really don't to deal with the
|
|||
// issue of UTM zones in our coordinate system. We would really just like a
|
|||
// grid that is fully contigious over the area of the map we are drawing. Similiar
|
|||
// to the state grid, but local to the area we are interested in. I call this
|
|||
// Local Transverse Mercator and I have modified the function below to also
|
|||
// make this conversion. If you pass a Longitude value to the function as $LongOrigin
|
|||
// then that is the Longitude of Origin that will be used for the projection.
|
|||
// Easting coordinates will be returned (in meters) relative to that line of
|
|||
// longitude - So an Easting coordinate for a point located East of the longitude
|
|||
// of origin will be a positive value in meters, an Easting coordinate for a point
|
|||
// West of the longitude of Origin will have a negative value in meters. Northings
|
|||
// will always be returned in meters from the equator same as the UTM system. The
|
|||
// UTMZone value will be valid for Long/Lat given - thought it is not meaningful
|
|||
// in the context of Local TM. If a NULL value is passed for $LongOrigin
|
|||
// then the standard UTM coordinates are calculated.
|
|||
//
|
|||
function convertLLtoTM($LongOrigin = NULL) |
|||
{ |
|||
$k0 = 0.9996; |
|||
$falseEasting = 0.0; |
|||
|
|||
//Make sure the longitude is between -180.00 .. 179.9
|
|||
$LongTemp = ($this->long+180)-(integer)(($this->long+180)/360)*360-180; // -180.00 .. 179.9;
|
|||
$LatRad = deg2rad($this->lat); |
|||
$LongRad = deg2rad($LongTemp); |
|||
|
|||
if (!$LongOrigin) |
|||
{ // Do a standard UTM conversion - so findout what zone the point is in
|
|||
$ZoneNumber = (integer)(($LongTemp + 180)/6) + 1; |
|||
// Special zone for South Norway
|
|||
if( $this->lat >= 56.0 && $this->lat < 64.0 && $LongTemp >= 3.0 && $LongTemp < 12.0 ) // Fixed 1.1
|
|||
$ZoneNumber = 32; |
|||
// Special zones for Svalbard
|
|||
if( $this->lat >= 72.0 && $this->lat < 84.0 ) |
|||
{ |
|||
if( $LongTemp >= 0.0 && $LongTemp < 9.0 ) $ZoneNumber = 31; |
|||
else if( $LongTemp >= 9.0 && $LongTemp < 21.0 ) $ZoneNumber = 33; |
|||
else if( $LongTemp >= 21.0 && $LongTemp < 33.0 ) $ZoneNumber = 35; |
|||
else if( $LongTemp >= 33.0 && $LongTemp < 42.0 ) $ZoneNumber = 37; |
|||
} |
|||
$LongOrigin = ($ZoneNumber - 1)*6 - 180 + 3; //+3 puts origin in middle of zone
|
|||
//compute the UTM Zone from the latitude and longitude
|
|||
$this->utmZone = sprintf("%d%s", $ZoneNumber, $this->UTMLetterDesignator()); |
|||
// We also need to set the false Easting value adjust the UTM easting coordinate
|
|||
$falseEasting = 500000.0; |
|||
} |
|||
$LongOriginRad = deg2rad($LongOrigin); |
|||
|
|||
$eccPrimeSquared = ($this->e2)/(1-$this->e2); |
|||
|
|||
$N = $this->a/sqrt(1-$this->e2*sin($LatRad)*sin($LatRad)); |
|||
$T = tan($LatRad)*tan($LatRad); |
|||
$C = $eccPrimeSquared*cos($LatRad)*cos($LatRad); |
|||
$A = cos($LatRad)*($LongRad-$LongOriginRad); |
|||
|
|||
$M = $this->a*((1 - $this->e2/4 - 3*$this->e2*$this->e2/64 - 5*$this->e2*$this->e2*$this->e2/256)*$LatRad |
|||
- (3*$this->e2/8 + 3*$this->e2*$this->e2/32 + 45*$this->e2*$this->e2*$this->e2/1024)*sin(2*$LatRad) |
|||
+ (15*$this->e2*$this->e2/256 + 45*$this->e2*$this->e2*$this->e2/1024)*sin(4*$LatRad) |
|||
- (35*$this->e2*$this->e2*$this->e2/3072)*sin(6*$LatRad)); |
|||
|
|||
$this->utmEasting = ($k0*$N*($A+(1-$T+$C)*$A*$A*$A/6 |
|||
+ (5-18*$T+$T*$T+72*$C-58*$eccPrimeSquared)*$A*$A*$A*$A*$A/120) |
|||
+ $falseEasting); |
|||
|
|||
$this->utmNorthing = ($k0*($M+$N*tan($LatRad)*($A*$A/2+(5-$T+9*$C+4*$C*$C)*$A*$A*$A*$A/24 |
|||
+ (61-58*$T+$T*$T+600*$C-330*$eccPrimeSquared)*$A*$A*$A*$A*$A*$A/720))); |
|||
if($this->lat < 0) |
|||
$this->utmNorthing += 10000000.0; //10000000 meter offset for southern hemisphere
|
|||
} |
|||
//
|
|||
// This routine determines the correct UTM letter designator for the given latitude
|
|||
// returns 'Z' if latitude is outside the UTM limits of 84N to 80S
|
|||
// Written by Chuck Gantz- chuck dot gantz at globalstar dot com, converted to PHP by
|
|||
// Brenor Brophy, brenor dot brophy at gmail dot com
|
|||
//
|
|||
function UTMLetterDesignator() |
|||
{ |
|||
if((84 >= $this->lat) && ($this->lat >= 72)) $LetterDesignator = 'X'; |
|||
else if((72 > $this->lat) && ($this->lat >= 64)) $LetterDesignator = 'W'; |
|||
else if((64 > $this->lat) && ($this->lat >= 56)) $LetterDesignator = 'V'; |
|||
else if((56 > $this->lat) && ($this->lat >= 48)) $LetterDesignator = 'U'; |
|||
else if((48 > $this->lat) && ($this->lat >= 40)) $LetterDesignator = 'T'; |
|||
else if((40 > $this->lat) && ($this->lat >= 32)) $LetterDesignator = 'S'; |
|||
else if((32 > $this->lat) && ($this->lat >= 24)) $LetterDesignator = 'R'; |
|||
else if((24 > $this->lat) && ($this->lat >= 16)) $LetterDesignator = 'Q'; |
|||
else if((16 > $this->lat) && ($this->lat >= 8)) $LetterDesignator = 'P'; |
|||
else if(( 8 > $this->lat) && ($this->lat >= 0)) $LetterDesignator = 'N'; |
|||
else if(( 0 > $this->lat) && ($this->lat >= -8)) $LetterDesignator = 'M'; |
|||
else if((-8 > $this->lat) && ($this->lat >= -16)) $LetterDesignator = 'L'; |
|||
else if((-16 > $this->lat) && ($this->lat >= -24)) $LetterDesignator = 'K'; |
|||
else if((-24 > $this->lat) && ($this->lat >= -32)) $LetterDesignator = 'J'; |
|||
else if((-32 > $this->lat) && ($this->lat >= -40)) $LetterDesignator = 'H'; |
|||
else if((-40 > $this->lat) && ($this->lat >= -48)) $LetterDesignator = 'G'; |
|||
else if((-48 > $this->lat) && ($this->lat >= -56)) $LetterDesignator = 'F'; |
|||
else if((-56 > $this->lat) && ($this->lat >= -64)) $LetterDesignator = 'E'; |
|||
else if((-64 > $this->lat) && ($this->lat >= -72)) $LetterDesignator = 'D'; |
|||
else if((-72 > $this->lat) && ($this->lat >= -80)) $LetterDesignator = 'C'; |
|||
else $LetterDesignator = 'Z'; //This is here as an error flag to show that the Latitude is outside the UTM limits
|
|||
|
|||
return($LetterDesignator); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------
|
|||
//
|
|||
// Convert UTM to Longitude/Latitude
|
|||
//
|
|||
// Equations from USGS Bulletin 1532
|
|||
// East Longitudes are positive, West longitudes are negative.
|
|||
// North latitudes are positive, South latitudes are negative
|
|||
// Lat and Long are in decimal degrees.
|
|||
// Written by Chuck Gantz- chuck dot gantz at globalstar dot com, converted to PHP by
|
|||
// Brenor Brophy, brenor dot brophy at gmail dot com
|
|||
//
|
|||
// If a value is passed for $LongOrigin then the function assumes that
|
|||
// a Local (to the Longitude of Origin passed in) Transverse Mercator
|
|||
// coordinates is to be converted - not a UTM coordinate. This is the
|
|||
// complementary function to the previous one. The function cannot
|
|||
// tell if a set of Northing/Easting coordinates are in the North
|
|||
// or South hemesphere - they just give distance from the equator not
|
|||
// direction - so only northern hemesphere lat/long coordinates are returned.
|
|||
// If you live south of the equator there is a note later in the code
|
|||
// explaining how to have it just return southern hemesphere lat/longs.
|
|||
//
|
|||
function convertTMtoLL($LongOrigin = NULL) |
|||
{ |
|||
$k0 = 0.9996; |
|||
$e1 = (1-sqrt(1-$this->e2))/(1+sqrt(1-$this->e2)); |
|||
$falseEasting = 0.0; |
|||
$y = $this->utmNorthing; |
|||
|
|||
if (!$LongOrigin) |
|||
{ // It is a UTM coordinate we want to convert
|
|||
sscanf($this->utmZone,"%d%s",$ZoneNumber,$ZoneLetter); |
|||
if($ZoneLetter >= 'N') |
|||
$NorthernHemisphere = 1;//point is in northern hemisphere
|
|||
else |
|||
{ |
|||
$NorthernHemisphere = 0;//point is in southern hemisphere
|
|||
$y -= 10000000.0;//remove 10,000,000 meter offset used for southern hemisphere
|
|||
} |
|||
$LongOrigin = ($ZoneNumber - 1)*6 - 180 + 3; //+3 puts origin in middle of zone
|
|||
$falseEasting = 500000.0; |
|||
} |
|||
|
|||
// $y -= 10000000.0; // Uncomment line to make LOCAL coordinates return southern hemesphere Lat/Long
|
|||
$x = $this->utmEasting - $falseEasting; //remove 500,000 meter offset for longitude
|
|||
|
|||
$eccPrimeSquared = ($this->e2)/(1-$this->e2); |
|||
|
|||
$M = $y / $k0; |
|||
$mu = $M/($this->a*(1-$this->e2/4-3*$this->e2*$this->e2/64-5*$this->e2*$this->e2*$this->e2/256)); |
|||
|
|||
$phi1Rad = $mu + (3*$e1/2-27*$e1*$e1*$e1/32)*sin(2*$mu) |
|||
+ (21*$e1*$e1/16-55*$e1*$e1*$e1*$e1/32)*sin(4*$mu) |
|||
+(151*$e1*$e1*$e1/96)*sin(6*$mu); |
|||
$phi1 = rad2deg($phi1Rad); |
|||
|
|||
$N1 = $this->a/sqrt(1-$this->e2*sin($phi1Rad)*sin($phi1Rad)); |
|||
$T1 = tan($phi1Rad)*tan($phi1Rad); |
|||
$C1 = $eccPrimeSquared*cos($phi1Rad)*cos($phi1Rad); |
|||
$R1 = $this->a*(1-$this->e2)/pow(1-$this->e2*sin($phi1Rad)*sin($phi1Rad), 1.5); |
|||
$D = $x/($N1*$k0); |
|||
|
|||
$tlat = $phi1Rad - ($N1*tan($phi1Rad)/$R1)*($D*$D/2-(5+3*$T1+10*$C1-4*$C1*$C1-9*$eccPrimeSquared)*$D*$D*$D*$D/24 |
|||
+(61+90*$T1+298*$C1+45*$T1*$T1-252*$eccPrimeSquared-3*$C1*$C1)*$D*$D*$D*$D*$D*$D/720); // fixed in 1.1
|
|||
$this->lat = rad2deg($tlat); |
|||
|
|||
$tlong = ($D-(1+2*$T1+$C1)*$D*$D*$D/6+(5-2*$C1+28*$T1-3*$C1*$C1+8*$eccPrimeSquared+24*$T1*$T1) |
|||
*$D*$D*$D*$D*$D/120)/cos($phi1Rad); |
|||
$this->long = $LongOrigin + rad2deg($tlong); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------
|
|||
// Configure a Lambert Conic Conformal Projection
|
|||
//
|
|||
// falseEasting & falseNorthing are just an offset in meters added to the final
|
|||
// coordinate calculated.
|
|||
//
|
|||
// longOfOrigin & LatOfOrigin are the "center" latitiude and longitude of the
|
|||
// area being projected. All coordinates will be calculated in meters relative
|
|||
// to this point on the earth.
|
|||
//
|
|||
// firstStdParallel & secondStdParallel are the two lines of longitude (that
|
|||
// is they run east-west) that define where the "cone" intersects the earth.
|
|||
// Simply put they should bracket the area being projected.
|
|||
//
|
|||
// google is your friend to find out more
|
|||
//
|
|||
function configLambertProjection ($falseEasting, $falseNorthing, |
|||
$longOfOrigin, $latOfOrigin, |
|||
$firstStdParallel, $secondStdParallel) |
|||
{ |
|||
$this->falseEasting = $falseEasting; |
|||
$this->falseNorthing = $falseNorthing; |
|||
$this->longOfOrigin = $longOfOrigin; |
|||
$this->latOfOrigin = $latOfOrigin; |
|||
$this->firstStdParallel = $firstStdParallel; |
|||
$this->secondStdParallel = $secondStdParallel; |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------
|
|||
//
|
|||
// Convert Longitude/Latitude to Lambert Conic Easting/Northing
|
|||
//
|
|||
// This routine will convert a Latitude/Longitude coordinate to an Northing/
|
|||
// Easting coordinate on a Lambert Conic Projection. The configLambertProjection()
|
|||
// function should have been called prior to this one to setup the specific
|
|||
// parameters for the projection. The Northing/Easting parameters calculated are
|
|||
// in meters (because the datum used is in meters) and are relative to the
|
|||
// falseNorthing/falseEasting coordinate. Which in turn is relative to the
|
|||
// Lat/Long of origin The formula were obtained from URL:
|
|||
// http://www.ihsenergy.com/epsg/guid7_2.html.
|
|||
// Code was written by Brenor Brophy, brenor dot brophy at gmail dot com
|
|||
//
|
|||
function convertLLtoLCC() |
|||
{ |
|||
$e = sqrt($this->e2); |
|||
|
|||
$phi = deg2rad($this->lat); // Latitude to convert
|
|||
$phi1 = deg2rad($this->firstStdParallel); // Latitude of 1st std parallel
|
|||
$phi2 = deg2rad($this->secondStdParallel); // Latitude of 2nd std parallel
|
|||
$lamda = deg2rad($this->long); // Lonitude to convert
|
|||
$phio = deg2rad($this->latOfOrigin); // Latitude of Origin
|
|||
$lamdao = deg2rad($this->longOfOrigin); // Longitude of Origin
|
|||
|
|||
$m1 = cos($phi1) / sqrt(( 1 - $this->e2*sin($phi1)*sin($phi1))); |
|||
$m2 = cos($phi2) / sqrt(( 1 - $this->e2*sin($phi2)*sin($phi2))); |
|||
$t1 = tan((pi()/4)-($phi1/2)) / pow(( ( 1 - $e*sin($phi1) ) / ( 1 + $e*sin($phi1) )),$e/2); |
|||
$t2 = tan((pi()/4)-($phi2/2)) / pow(( ( 1 - $e*sin($phi2) ) / ( 1 + $e*sin($phi2) )),$e/2); |
|||
$to = tan((pi()/4)-($phio/2)) / pow(( ( 1 - $e*sin($phio) ) / ( 1 + $e*sin($phio) )),$e/2); |
|||
$t = tan((pi()/4)-($phi /2)) / pow(( ( 1 - $e*sin($phi ) ) / ( 1 + $e*sin($phi ) )),$e/2); |
|||
$n = (log($m1)-log($m2)) / (log($t1)-log($t2)); |
|||
$F = $m1/($n*pow($t1,$n)); |
|||
$rf = $this->a*$F*pow($to,$n); |
|||
$r = $this->a*$F*pow($t,$n); |
|||
$theta = $n*($lamda - $lamdao); |
|||
|
|||
$this->lccEasting = $this->falseEasting + $r*sin($theta); |
|||
$this->lccNorthing = $this->falseNorthing + $rf - $r*cos($theta); |
|||
} |
|||
//------------------------------------------------------------------------------
|
|||
//
|
|||
// Convert Easting/Northing on a Lambert Conic projection to Longitude/Latitude
|
|||
//
|
|||
// This routine will convert a Lambert Northing/Easting coordinate to an
|
|||
// Latitude/Longitude coordinate. The configLambertProjection() function should
|
|||
// have been called prior to this one to setup the specific parameters for the
|
|||
// projection. The Northing/Easting parameters are in meters (because the datum
|
|||
// used is in meters) and are relative to the falseNorthing/falseEasting
|
|||
// coordinate. Which in turn is relative to the Lat/Long of origin The formula
|
|||
// were obtained from URL http://www.ihsenergy.com/epsg/guid7_2.html. Code
|
|||
// was written by Brenor Brophy, brenor dot brophy at gmail dot com
|
|||
//
|
|||
function convertLCCtoLL() |
|||
{ |
|||
$e = sqrt($this->e2); |
|||
|
|||
$phi1 = deg2rad($this->firstStdParallel); // Latitude of 1st std parallel
|
|||
$phi2 = deg2rad($this->secondStdParallel); // Latitude of 2nd std parallel
|
|||
$phio = deg2rad($this->latOfOrigin); // Latitude of Origin
|
|||
$lamdao = deg2rad($this->longOfOrigin); // Longitude of Origin
|
|||
$E = $this->lccEasting; |
|||
$N = $this->lccNorthing; |
|||
$Ef = $this->falseEasting; |
|||
$Nf = $this->falseNorthing; |
|||
|
|||
$m1 = cos($phi1) / sqrt(( 1 - $this->e2*sin($phi1)*sin($phi1))); |
|||
$m2 = cos($phi2) / sqrt(( 1 - $this->e2*sin($phi2)*sin($phi2))); |
|||
$t1 = tan((pi()/4)-($phi1/2)) / pow(( ( 1 - $e*sin($phi1) ) / ( 1 + $e*sin($phi1) )),$e/2); |
|||
$t2 = tan((pi()/4)-($phi2/2)) / pow(( ( 1 - $e*sin($phi2) ) / ( 1 + $e*sin($phi2) )),$e/2); |
|||
$to = tan((pi()/4)-($phio/2)) / pow(( ( 1 - $e*sin($phio) ) / ( 1 + $e*sin($phio) )),$e/2); |
|||
$n = (log($m1)-log($m2)) / (log($t1)-log($t2)); |
|||
$F = $m1/($n*pow($t1,$n)); |
|||
$rf = $this->a*$F*pow($to,$n); |
|||
$r_ = sqrt( pow(($E-$Ef),2) + pow(($rf-($N-$Nf)),2) ); |
|||
$t_ = pow($r_/($this->a*$F),(1/$n)); |
|||
$theta_ = atan(($E-$Ef)/($rf-($N-$Nf))); |
|||
|
|||
$lamda = $theta_/$n + $lamdao; |
|||
$phi0 = (pi()/2) - 2*atan($t_); |
|||
$phi1 = (pi()/2) - 2*atan($t_*pow(((1-$e*sin($phi0))/(1+$e*sin($phi0))),$e/2)); |
|||
$phi2 = (pi()/2) - 2*atan($t_*pow(((1-$e*sin($phi1))/(1+$e*sin($phi1))),$e/2)); |
|||
$phi = (pi()/2) - 2*atan($t_*pow(((1-$e*sin($phi2))/(1+$e*sin($phi2))),$e/2)); |
|||
|
|||
$this->lat = rad2deg($phi); |
|||
$this->long = rad2deg($lamda); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------
|
|||
// This is a useful function that returns the Great Circle distance from the
|
|||
// gPoint to another Long/Lat coordinate
|
|||
//
|
|||
// Result is returned as meters
|
|||
//
|
|||
function distanceFrom($lon1, $lat1) |
|||
{ |
|||
$lon1 = deg2rad($lon1); $lat1 = deg2rad($lat1); // Added in 1.3
|
|||
$lon2 = deg2rad($this->Long()); $lat2 = deg2rad($this->Lat()); |
|||
|
|||
$theta = $lon2 - $lon1; |
|||
$dist = acos(sin($lat1) * sin($lat2) + cos($lat1) * cos($lat2) * cos($theta)); |
|||
|
|||
// Alternative formula supposed to be more accurate for short distances
|
|||
// $dist = 2*asin(sqrt( pow(sin(($lat1-$lat2)/2),2) + cos($lat1)*cos($lat2)*pow(sin(($lon1-$lon2)/2),2)));
|
|||
return ( $dist * 6366710 ); // from http://williams.best.vwh.net/avform.htm#GCF
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------
|
|||
// This function also calculates the distance between two points. In this case
|
|||
// it just uses Pythagoras's theorm using TM coordinates.
|
|||
//
|
|||
function distanceFromTM(&$pt) |
|||
{ |
|||
$E1 = $pt->E(); $N1 = $pt->N(); |
|||
$E2 = $this->E(); $N2 = $this->N(); |
|||
|
|||
$dist = sqrt(pow(($E1-$E2),2)+pow(($N1-$N2),2)); |
|||
return $dist; |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------
|
|||
// This function geo-references a geoPoint to a given map. This means that it
|
|||
// calculates the x,y pixel coordinate that coresponds to the Lat/Long value of
|
|||
// the geoPoint. The calculation is done using the Transverse Mercator(TM)
|
|||
// coordinates of the gPoint with respect to the TM coordinates of the center
|
|||
// point of the map. So this only makes sense if you are using Local TM
|
|||
// projection.
|
|||
//
|
|||
// $rX & $rY are the pixel coordinates that corespond to the Northing/Easting
|
|||
// ($rE/$rN) coordinate it is to this coordinate that the point will be
|
|||
// geo-referenced. The $LongOrigin is needed to make sure the Easting/Northing
|
|||
// coordinates of the point are correctly converted.
|
|||
//
|
|||
function gRef($rX, $rY, $rE, $rN, $Scale, $LongOrigin) |
|||
{ |
|||
$this->convertLLtoTM($LongOrigin); |
|||
$x = (($this->E() - $rE) / $Scale) // The easting in meters times the scale to get pixels
|
|||
// is relative to the center of the image so adjust to
|
|||
+ ($rX); // the left coordinate.
|
|||
$y = $rY - // Adjust to bottom coordinate.
|
|||
(($rN - $this->N()) / $Scale); // The northing in meters
|
|||
// relative to the equator. Subtract center point northing
|
|||
// to get relative to image center and convert meters to pixels
|
|||
$this->setXY((int)$x,(int)$y); // Save the geo-referenced result.
|
|||
} |
|||
} // end of class gPoint
|
|||
|
|||
?>
|
|||
@ -1,74 +1,10 @@ |
|||
<?php |
|||
$WEBUser='www-data'; |
|||
$WEBGroup='www-data'; |
|||
$DBHost='localhost'; |
|||
$DBUser='dbroot'; |
|||
$DBPassword='NoGud4U'; |
|||
$DBName='dfsl_gunter'; |
|||
|
|||
$ShowImagesLocal=false; |
|||
$ShowThumbnailsLocal=true; |
|||
|
|||
$ShowAdw=true; |
|||
$SaveLocal=false; |
|||
$MailAgent='SENDMAIL'; |
|||
$CGP_SubmitPath='../Submitted/'; |
|||
|
|||
$WEBPath='http://' . $_SERVER['SERVER_ADDR'] . '/'; |
|||
$SYSPath='/srv/web/html/'; |
|||
$DBCacheDir=$SYSPath . 'cache'; |
|||
|
|||
$MinimalSize=640000; |
|||
|
|||
// Argus Defines
|
|||
|
|||
define( "ARGUS_SERVER", 0 ); |
|||
define( "ARGUS_ALS_SENSOR", 1 ); |
|||
define( "ARGUS_LFS_SENSOR", 2 ); |
|||
define( "ARGUS_PLS_200_SENSOR", 3 ); |
|||
define( "ARGUS_PLS_360_SENSOR", 4 ); |
|||
define( "ARGUS_3D_SENSOR", 5 ); |
|||
define( "ARGUS_NET_PLS_200", 6 ); |
|||
define( "ARGUS_ANALOG_STATIC_CAMERA", 10 ); |
|||
define( "ARGUS_ANALOG_PTZ_CAMERA", 11 ); |
|||
define( "ARGUS_IP_STATIC_CAMERA", 12 ); |
|||
define( "ARGUS_IP_PTZ_CAMERA", 13 ); |
|||
define( "ARGUS_IP_UART_GATEWAY", 20 ); |
|||
define( "ARGUS_JAMER", 40 ); |
|||
define( "ARGUS_IP_VIDEO_SERVER", 50 ); |
|||
define( "ARGUS_DRONE_CONTROL", 60 ); |
|||
define( "ARGUS_UNKNOWN", 255 ); |
|||
|
|||
define( "ARGUS_NODE_SOCK_TYPE_SERIAL_PORT", 1 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_NETWORK", 2 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_DC", 3 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_GRABBER", 4 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_AUDIO_GRABBER", 5 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_DIGITAL", 6 ); |
|||
|
|||
define( "COM_MODE_IN", 1 ); |
|||
define( "COM_MODE_OUT", 2 ); |
|||
define( "COM_MODE_INOUT", 3 ); |
|||
|
|||
define( "COM_TYPE_UART", 1 ); |
|||
define( "COM_TYPE_TCP", 2 ); |
|||
define( "COM_TYPE_DC_CTRL", 3 ); |
|||
define( "COM_TYPE_ANALOG_VIDEO", 4 ); |
|||
define( "COM_TYPE_ANALOG_AUDIO", 5 ); |
|||
define( "COM_TYPE_DIGITAL_MEDIA", 6 ); |
|||
|
|||
define( "CAM_TYPE_ANALOG", 1 ); |
|||
define( "CAM_TYPE_DIGITAL", 2 ); |
|||
|
|||
define( "MOD_TYPE_MEDIASERVER", 1 ); |
|||
define( "MOD_TYPE_USB_DC", 2 ); |
|||
|
|||
function microtime_float(){ |
|||
list($usec, $sec) = explode(" ", microtime()); |
|||
return ((float)$usec + (float)$sec); |
|||
}; |
|||
|
|||
$Script_Start_Time = microtime_float(); |
|||
|
|||
|
|||
$DBHost="localhost"; |
|||
$DBName="dfsl_gunter"; |
|||
$DBUser="dbroot"; |
|||
$DBPassword="NoGud4U"; |
|||
$SYSPath="/srv/samba/web"; |
|||
$WEBUser="www-data"; |
|||
$WEBGroup="www-data"; |
|||
|
|||
?>
|
|||
@ -0,0 +1,74 @@ |
|||
<?php |
|||
$WEBUser='www-data'; |
|||
$WEBGroup='www-data'; |
|||
$DBHost='localhost'; |
|||
$DBUser='dbroot'; |
|||
$DBPassword='NoGud4U'; |
|||
$DBName='dfsl_gunter'; |
|||
|
|||
$ShowImagesLocal=false; |
|||
$ShowThumbnailsLocal=true; |
|||
|
|||
$ShowAdw=true; |
|||
$SaveLocal=false; |
|||
$MailAgent='SENDMAIL'; |
|||
$CGP_SubmitPath='../Submitted/'; |
|||
|
|||
$WEBPath='http://' . $_SERVER['SERVER_ADDR'] . '/'; |
|||
$SYSPath='/srv/web/html/'; |
|||
$DBCacheDir=$SYSPath . 'cache'; |
|||
|
|||
$MinimalSize=640000; |
|||
|
|||
// Argus Defines |
|||
|
|||
define( "ARGUS_SERVER", 0 ); |
|||
define( "ARGUS_ALS_SENSOR", 1 ); |
|||
define( "ARGUS_LFS_SENSOR", 2 ); |
|||
define( "ARGUS_PLS_200_SENSOR", 3 ); |
|||
define( "ARGUS_PLS_360_SENSOR", 4 ); |
|||
define( "ARGUS_3D_SENSOR", 5 ); |
|||
define( "ARGUS_NET_PLS_200", 6 ); |
|||
define( "ARGUS_ANALOG_STATIC_CAMERA", 10 ); |
|||
define( "ARGUS_ANALOG_PTZ_CAMERA", 11 ); |
|||
define( "ARGUS_IP_STATIC_CAMERA", 12 ); |
|||
define( "ARGUS_IP_PTZ_CAMERA", 13 ); |
|||
define( "ARGUS_IP_UART_GATEWAY", 20 ); |
|||
define( "ARGUS_JAMER", 40 ); |
|||
define( "ARGUS_IP_VIDEO_SERVER", 50 ); |
|||
define( "ARGUS_DRONE_CONTROL", 60 ); |
|||
define( "ARGUS_UNKNOWN", 255 ); |
|||
|
|||
define( "ARGUS_NODE_SOCK_TYPE_SERIAL_PORT", 1 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_NETWORK", 2 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_DC", 3 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_GRABBER", 4 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_AUDIO_GRABBER", 5 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_DIGITAL", 6 ); |
|||
|
|||
define( "COM_MODE_IN", 1 ); |
|||
define( "COM_MODE_OUT", 2 ); |
|||
define( "COM_MODE_INOUT", 3 ); |
|||
|
|||
define( "COM_TYPE_UART", 1 ); |
|||
define( "COM_TYPE_TCP", 2 ); |
|||
define( "COM_TYPE_DC_CTRL", 3 ); |
|||
define( "COM_TYPE_ANALOG_VIDEO", 4 ); |
|||
define( "COM_TYPE_ANALOG_AUDIO", 5 ); |
|||
define( "COM_TYPE_DIGITAL_MEDIA", 6 ); |
|||
|
|||
define( "CAM_TYPE_ANALOG", 1 ); |
|||
define( "CAM_TYPE_DIGITAL", 2 ); |
|||
|
|||
define( "MOD_TYPE_MEDIASERVER", 1 ); |
|||
define( "MOD_TYPE_USB_DC", 2 ); |
|||
|
|||
function microtime_float(){ |
|||
list($usec, $sec) = explode(" ", microtime()); |
|||
return ((float)$usec + (float)$sec); |
|||
}; |
|||
|
|||
$Script_Start_Time = microtime_float(); |
|||
|
|||
|
|||
?> |
|||
@ -1,6 +1,7 @@ |
|||
<?php |
|||
|
|||
require_once('settings.php'); |
|||
require_once('defines.php'); |
|||
|
|||
|
|||
?>
|
|||
54
logerror
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,129 +0,0 @@ |
|||
<?php |
|||
require_once('lib/assembler.php'); |
|||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html>
|
|||
<header> |
|||
<title>L.V.A.P. Defending Sensor Control</title> |
|||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> |
|||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> |
|||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"> |
|||
<link rel="manifest" href="/site.webmanifest"> |
|||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"> |
|||
<meta name="msapplication-TileColor" content="#da532c"> |
|||
<meta name="theme-color" content="#ffffff"> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1"> |
|||
<meta name="mobile-web-app-capable" content="yes"> |
|||
<meta name="apple-mobile-web-app-capable" content="yes"> |
|||
<!--link rel="stylesheet" type="text/css" href="lib/javascript/extjs/resources/css/ext-all.css"/--> |
|||
<link rel="stylesheet" type="text/css" href="lib/javascript/extjs/resources/css/ext-all-notheme.css"/> |
|||
<!--link rel="stylesheet" type="text/css" href="lib/javascript/extjs/resources/css/xtheme-access.css"/--> |
|||
<!--link rel="stylesheet" type="text/css" href="lib/javascript/extjs/resources/css/xtheme-blue.css"/--> |
|||
<link rel="stylesheet" type="text/css" href="lib/javascript/extjs/resources/css/xtheme-gray.css"/> |
|||
<link rel="stylesheet" type="text/css" href="/style/icons/silk.css"/> |
|||
<!-- GC --> |
|||
<!-- LIBS --> |
|||
<script type="text/javascript" src="lib/javascript/jquery/jquery-1.12.4.min.js"></script> |
|||
<script type="text/javascript" src="lib/javascript/extjs/adapter/jquery/ext-jquery-adapter.js"></script> |
|||
<!--script type="text/javascript" src="lib/javascript/extjs/adapter/ext/ext-base.js"></script--> |
|||
<script type="text/javascript" src="lib/javascript/extjs/ext-all.js"></script> |
|||
<script type="text/javascript" src="lib/javascript/flash/swfobject.js"></script> |
|||
<script type="text/javascript" src="lib/javascript/flash/html5video_flash.js"></script> |
|||
<!-- ENDLIBS --> |
|||
<style type="text/css"> |
|||
.flowplayer { |
|||
width: 640px; |
|||
} |
|||
.fullscreen:-webkit-full-screen { |
|||
width: auto !important; |
|||
height: auto !important; |
|||
margin:auto !important; |
|||
} |
|||
.fullscreen:-moz-full-screen { |
|||
width: auto !important; |
|||
height: auto !important; |
|||
margin:auto !important; |
|||
} |
|||
.fullscreen:-ms-fullscreen { |
|||
width: auto !important; |
|||
height: auto !important; |
|||
margin:auto !important; |
|||
} |
|||
.header_ttl{ |
|||
font: bold 24px; |
|||
} |
|||
html, body { |
|||
font: normal 12px verdana; |
|||
margin: 0; |
|||
padding: 0; |
|||
border: 0 none; |
|||
/*overflow: hidden; |
|||
height: 100%;*/ |
|||
background: #202020;
|
|||
} |
|||
#output {
|
|||
margin-left: 350px; |
|||
} |
|||
#log {
|
|||
width: 80%; |
|||
height: 100px; |
|||
} |
|||
#player {
|
|||
float: left; |
|||
} |
|||
#controls {
|
|||
clear: left; |
|||
} |
|||
p { |
|||
margin: 0; |
|||
} |
|||
.timeInput, .volumeInput { |
|||
width: 3em; |
|||
} |
|||
</style> |
|||
<script type="text/javascript" src="lib/javascript/jsapi/mastbaum.js"></script> |
|||
</header> |
|||
<body> |
|||
<table width="100%" border=0> |
|||
<tr> |
|||
<td width="50%"> </td> |
|||
<td width="64px"><img width="64px" src="/style/img/logo-s.png"></td> |
|||
<td align="center"><img src="/style/img/LVAP.png"></td> |
|||
<td width="50%"> </td> |
|||
</tr> |
|||
<tr><td></td><td> |
|||
<!-- https://wiki.videolan.org/Documentation:WebPlugin/ --> |
|||
<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" |
|||
|
|||
width="640" |
|||
|
|||
height="480" |
|||
|
|||
branding = false |
|||
|
|||
mrl = "rtsp://gagua:4GetMyID@192.168.200.116:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1" |
|||
|
|||
id="vlc" /> |
|||
|
|||
<script type="text/javascript"> |
|||
<!-- |
|||
function aka(){ |
|||
alert( vlc.video.width + ' ' + vlc.video.height ); |
|||
}; |
|||
var vlc = document.getElementById("vlc"); |
|||
|
|||
vlc.audio.toggleMute(); |
|||
alert( vlc.versionInfo() ); |
|||
|
|||
//-->
|
|||
|
|||
</script> |
|||
<input type="button" val="pukpuk" onclick="aka();"> |
|||
</td><td></td></tr> |
|||
<tr> |
|||
<td></td> |
|||
<td colspan=2 id="content"></td> |
|||
<td></td></tr> |
|||
<tr><td></td><td colspan=2></td><td></td></tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
Binary file not shown.
|
Before Width: 2304 | Height: 288 | Size: 195 KiB |
Binary file not shown.
|
Before Width: 2304 | Height: 288 | Size: 54 KiB |
@ -1 +0,0 @@ |
|||
{"old_target":{"el":100.348,"az":342.656,"range":299.4},"last_ts":1572640491.6159} |
|||
@ -1,11 +0,0 @@ |
|||
<?php |
|||
|
|||
//set random name for the image, used time() for uniqueness
|
|||
|
|||
$filename = time() . '.jpg'; |
|||
$filepath = 'saved_images/'; |
|||
|
|||
move_uploaded_file($_FILES['webcam']['tmp_name'], $filepath.$filename); |
|||
|
|||
echo $filepath.$filename; |
|||
?>
|
|||
@ -0,0 +1,39 @@ |
|||
/* |
|||
Navicat Premium Data Transfer |
|||
|
|||
Source Server : Applica_tunel |
|||
Source Server Type : MySQL |
|||
Source Server Version : 100323 |
|||
Source Host : localhost:3306 |
|||
Source Schema : dfsl_gunter |
|||
|
|||
Target Server Type : MySQL |
|||
Target Server Version : 100323 |
|||
File Encoding : 65001 |
|||
|
|||
Date: 11/09/2021 05:23:50 |
|||
*/ |
|||
|
|||
SET NAMES utf8mb4; |
|||
SET FOREIGN_KEY_CHECKS = 0; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for camera_ptz_protocols |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `camera_ptz_protocols`; |
|||
CREATE TABLE `camera_ptz_protocols` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of camera_ptz_protocols |
|||
-- ---------------------------- |
|||
INSERT INTO `camera_ptz_protocols` VALUES (1, 'SONY VISCA'); |
|||
INSERT INTO `camera_ptz_protocols` VALUES (2, 'Pelco-D'); |
|||
INSERT INTO `camera_ptz_protocols` VALUES (3, 'OnVif'); |
|||
INSERT INTO `camera_ptz_protocols` VALUES (4, 'PSIA'); |
|||
INSERT INTO `camera_ptz_protocols` VALUES (5, 'GB/T28181'); |
|||
|
|||
SET FOREIGN_KEY_CHECKS = 1; |
|||
7751
setup/dfsl_gunter.sql
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,625 @@ |
|||
/* |
|||
Navicat Premium Data Transfer |
|||
|
|||
Source Server : APPLICATION |
|||
Source Server Type : MariaDB |
|||
Source Server Version : 100323 |
|||
Source Host : localhost:3316 |
|||
Source Schema : dfsl_gunter |
|||
|
|||
Target Server Type : MariaDB |
|||
Target Server Version : 100323 |
|||
File Encoding : 65001 |
|||
|
|||
Date: 30/08/2021 16:24:18 |
|||
*/ |
|||
|
|||
SET NAMES utf8mb4; |
|||
SET FOREIGN_KEY_CHECKS = 0; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for camera_ptz_protocols |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `camera_ptz_protocols`; |
|||
CREATE TABLE `camera_ptz_protocols` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for cameras |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `cameras`; |
|||
CREATE TABLE `cameras` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`node_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`online` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1, |
|||
`name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`hardware` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`status` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`session` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`protocol` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`protocol_aux` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`uart_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`lat` double NULL DEFAULT NULL, |
|||
`lon` double NULL DEFAULT NULL, |
|||
`alt` double NULL DEFAULT NULL, |
|||
`pitch` double NULL DEFAULT NULL, |
|||
`roll` double NULL DEFAULT NULL, |
|||
`yaw` double NULL DEFAULT NULL, |
|||
`imager_type` tinyint(3) UNSIGNED NULL DEFAULT 2, |
|||
`min_f` double NULL DEFAULT NULL, |
|||
`max_f` double NULL DEFAULT NULL, |
|||
`pan_model` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`pan_angles` int(4) UNSIGNED NULL DEFAULT 0, |
|||
`tilt_model` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`tilt_angles` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`access_login` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`access_pass` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`uuid` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`mac` char(17) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`ip` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '80', |
|||
`onvif_access` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`onvif_ctrl` char(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`ptz_token` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `uni2`(`uuid`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for cmd_queue |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `cmd_queue`; |
|||
CREATE TABLE `cmd_queue` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`status` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`cmd` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`param` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`aux_param` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING HASH |
|||
) ENGINE = MEMORY AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for connection_types |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `connection_types`; |
|||
CREATE TABLE `connection_types` ( |
|||
`id` tinyint(3) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`label_id` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for connections |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `connections`; |
|||
CREATE TABLE `connections` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`from` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`from_aux` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`to` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`to_aux` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`type` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for events_archive |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `events_archive`; |
|||
CREATE TABLE `events_archive` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`node_id` int(10) UNSIGNED NOT NULL, |
|||
`uuid` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`ts` int(10) UNSIGNED NOT NULL, |
|||
`ts_ms` int(3) UNSIGNED NOT NULL, |
|||
`evt_type` tinyint(3) UNSIGNED NULL DEFAULT 1, |
|||
`range_digital` int(5) UNSIGNED NULL DEFAULT NULL, |
|||
`azimuth` double NULL DEFAULT NULL, |
|||
`elevation` double NULL DEFAULT 0, |
|||
`range` double NULL DEFAULT NULL, |
|||
`area` double NULL DEFAULT NULL, |
|||
`lat` double NULL DEFAULT NULL, |
|||
`lon` double NULL DEFAULT NULL, |
|||
`alt` double NULL DEFAULT NULL, |
|||
`custom` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `uniq`(`uuid`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 6765 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for events_cloud |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `events_cloud`; |
|||
CREATE TABLE `events_cloud` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`node_id` int(10) UNSIGNED NOT NULL, |
|||
`uuid` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`ts` int(10) UNSIGNED NOT NULL, |
|||
`ts_ms` int(3) UNSIGNED NOT NULL, |
|||
`evt_type` tinyint(3) UNSIGNED NULL DEFAULT 1, |
|||
`range_digital` int(5) UNSIGNED NULL DEFAULT NULL, |
|||
`azimuth` double NULL DEFAULT NULL, |
|||
`elevation` double NULL DEFAULT 0, |
|||
`range` double NULL DEFAULT NULL, |
|||
`area` double NULL DEFAULT NULL, |
|||
`lat` double NULL DEFAULT NULL, |
|||
`lon` double NULL DEFAULT NULL, |
|||
`alt` double NULL DEFAULT NULL, |
|||
`custom` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING HASH, |
|||
UNIQUE INDEX `uniq`(`uuid`) USING HASH |
|||
) ENGINE = MEMORY AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for labels_js |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `labels_js`; |
|||
CREATE TABLE `labels_js` ( |
|||
`language_id` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`key` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
UNIQUE INDEX `uniq`(`language_id`, `key`) USING BTREE, |
|||
INDEX `lang`(`language_id`) USING BTREE |
|||
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for labels_php |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `labels_php`; |
|||
CREATE TABLE `labels_php` ( |
|||
`language_id` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`key` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
UNIQUE INDEX `uniq`(`language_id`, `key`) USING BTREE, |
|||
INDEX `lang`(`language_id`) USING BTREE |
|||
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for languages |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `languages`; |
|||
CREATE TABLE `languages` ( |
|||
`id` tinyint(3) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`abbr` char(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`name` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for lrf_draw |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `lrf_draw`; |
|||
CREATE TABLE `lrf_draw` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`node_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`size` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`ts` datetime(0) NULL DEFAULT NULL, |
|||
`md5` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`rendered` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `Uni`(`node_id`, `ts`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 31 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for lrf_sensors |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `lrf_sensors`; |
|||
CREATE TABLE `lrf_sensors` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`type_id` tinyint(3) UNSIGNED NULL DEFAULT 1, |
|||
`altered` bit(1) NULL DEFAULT b'0', |
|||
`position` bit(1) NOT NULL DEFAULT b'0', |
|||
`sender` bit(1) NOT NULL DEFAULT b'0', |
|||
`receiver` bit(1) NOT NULL DEFAULT b'0', |
|||
`serial` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`version` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`lat` double NULL DEFAULT NULL, |
|||
`lon` double NULL DEFAULT NULL, |
|||
`alt` double NULL DEFAULT NULL, |
|||
`pitch` double NULL DEFAULT NULL, |
|||
`yaw` double NULL DEFAULT NULL, |
|||
`roll` double NULL DEFAULT NULL, |
|||
`uart_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`device_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`ip_address` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`aux_ip_address` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`aux_port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`auto_draw` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`enabled_lrf` bit(16) NULL DEFAULT b'1111111111111111', |
|||
`max_range` float UNSIGNED NULL DEFAULT 300, |
|||
`base_shift` int(11) NULL DEFAULT 0, |
|||
`mirror_shift` int(11) NULL DEFAULT 0, |
|||
`m_order` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`m_offset` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`m_delta` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`m_flip` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`m_width` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`m_sst` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`m_sun` tinyint(3) UNSIGNED NULL DEFAULT 100, |
|||
`m_gp` int(10) UNSIGNED NULL DEFAULT 16, |
|||
`m_spikes` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`s_order` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`s_offset` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`s_delta` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`s_flip` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`s_width` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`s_sst` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`s_sun` tinyint(3) UNSIGNED NULL DEFAULT 100, |
|||
`s_gp` int(10) UNSIGNED NULL DEFAULT 16, |
|||
`s_spikes` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`width_table_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`zoom_table_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for map_tiles |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `map_tiles`; |
|||
CREATE TABLE `map_tiles` ( |
|||
`z` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`x` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`y` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`cached` tinyint(1) UNSIGNED NULL DEFAULT 1, |
|||
`isSea` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
UNIQUE INDEX `Uni`(`z`, `x`, `y`) USING BTREE, |
|||
INDEX `norm_x`(`x`) USING BTREE, |
|||
INDEX `norm_y`(`y`) USING BTREE, |
|||
INDEX `norm_z`(`z`) USING BTREE |
|||
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for maps |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `maps`; |
|||
CREATE TABLE `maps` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`tale_src` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for media_server_streams |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `media_server_streams`; |
|||
CREATE TABLE `media_server_streams` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`media_server_id` int(10) UNSIGNED NOT NULL, |
|||
`media_stream_id` int(10) UNSIGNED NOT NULL, |
|||
`valid` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
`online` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
`key` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, |
|||
`mrl` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for media_servers |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `media_servers`; |
|||
CREATE TABLE `media_servers` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`secret_key` char(46) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
`ip` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '127.0.0.1', |
|||
`REST_port` int(5) UNSIGNED NULL DEFAULT 8081, |
|||
`virtual_host` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '__defaultVhost__', |
|||
`recording` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
`local` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
`docRoot` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '', |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for media_streams |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `media_streams`; |
|||
CREATE TABLE `media_streams` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`source_id` int(10) UNSIGNED NOT NULL, |
|||
`source_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'D', |
|||
`name` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`valid` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
`has_audio` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
`token` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`img_width` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`img_height` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`fps` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`compression_type` char(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`bitrate` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`mrl_proto` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'rtsp', |
|||
`mrl_port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '554', |
|||
`mrl` char(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`picture_proto` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'http', |
|||
`picture_port` char(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '80', |
|||
`picture` char(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `unistr`(`site_id`, `source_id`, `token`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for module_dcr_chanels |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `module_dcr_chanels`; |
|||
CREATE TABLE `module_dcr_chanels` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`dcr_id` int(10) UNSIGNED NOT NULL, |
|||
`channel_id` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`mode` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'O', |
|||
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'O', |
|||
`request` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `uni`(`dcr_id`, `channel_id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for module_dcr_settings |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `module_dcr_settings`; |
|||
CREATE TABLE `module_dcr_settings` ( |
|||
`setting_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`channel_id` int(10) UNSIGNED NOT NULL, |
|||
`type` char(1) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT 'P', |
|||
`class_id` int(10) UNSIGNED NOT NULL, |
|||
`event_id` int(10) UNSIGNED NOT NULL, |
|||
`auto_dissmiss` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
PRIMARY KEY (`setting_id`) USING BTREE, |
|||
UNIQUE INDEX `uni`(`channel_id`, `class_id`, `event_id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for module_kafka_settings |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `module_kafka_settings`; |
|||
CREATE TABLE `module_kafka_settings` ( |
|||
`setting_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`module_id` int(10) UNSIGNED NOT NULL, |
|||
`type` char(1) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT 'P', |
|||
`class_id` int(10) UNSIGNED NOT NULL, |
|||
`event_id` int(10) UNSIGNED NOT NULL, |
|||
`topic` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, |
|||
`template` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`setting_id`) USING BTREE, |
|||
UNIQUE INDEX `uni`(`module_id`, `class_id`, `event_id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for modules_dcr |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `modules_dcr`; |
|||
CREATE TABLE `modules_dcr` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'O', |
|||
`serial_id` char(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', |
|||
`channels` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `uni`(`site_id`, `serial_id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for modules_fly_hunter |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `modules_fly_hunter`; |
|||
CREATE TABLE `modules_fly_hunter` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`name` char(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, |
|||
`lat` double NULL DEFAULT NULL, |
|||
`lon` double NULL DEFAULT NULL, |
|||
`alt` double NULL DEFAULT NULL, |
|||
`dc_module_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`uart_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for modules_kafka |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `modules_kafka`; |
|||
CREATE TABLE `modules_kafka` ( |
|||
`module_id` int(10) UNSIGNED NOT NULL, |
|||
`brocker_address` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, |
|||
`brocker_port` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
PRIMARY KEY (`module_id`) USING BTREE |
|||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for nodes |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `nodes`; |
|||
CREATE TABLE `nodes` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NOT NULL DEFAULT 0, |
|||
`type` tinyint(3) UNSIGNED NOT NULL, |
|||
`aux_id` int(10) UNSIGNED NULL DEFAULT 0, |
|||
`online` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`enable` char(1) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT 'E', |
|||
`ts_s` int(11) NULL DEFAULT 0, |
|||
`ts_ms` int(11) NULL DEFAULT 0, |
|||
`data_peers_in` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`data_peers_out` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`ctrl_peers_in` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`ctrl_peers_out` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`name` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'No Name', |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `uni`(`site_id`, `type`, `aux_id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for online_cloud |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `online_cloud`; |
|||
CREATE TABLE `online_cloud` ( |
|||
`device_id` int(10) UNSIGNED NOT NULL DEFAULT 0, |
|||
`fts` datetime(0) NULL DEFAULT NULL, |
|||
`lts` datetime(0) NULL DEFAULT NULL, |
|||
`mode` tinyint(4) NULL DEFAULT NULL, |
|||
`draw_sequence` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`data` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`parameter` int(11) NULL DEFAULT NULL, |
|||
PRIMARY KEY (`device_id`) USING HASH |
|||
) ENGINE = MEMORY CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for pictures |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `pictures`; |
|||
CREATE TABLE `pictures` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`md5` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`ext` char(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`TS` datetime(0) NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for server_module_types |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `server_module_types`; |
|||
CREATE TABLE `server_module_types` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`builtin` bit(1) NULL DEFAULT b'0', |
|||
`allow_multiply` bit(1) NULL DEFAULT b'1', |
|||
`name` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for server_modules |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `server_modules`; |
|||
CREATE TABLE `server_modules` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`server_id` int(10) UNSIGNED NOT NULL, |
|||
`type` tinyint(3) UNSIGNED NOT NULL, |
|||
`aux_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`enabled` tinyint(1) UNSIGNED NULL DEFAULT 1, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for servers |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `servers`; |
|||
CREATE TABLE `servers` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`site_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`online` bit(1) NULL DEFAULT b'0', |
|||
`identity` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `uni`(`identity`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for servers_queue |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `servers_queue`; |
|||
CREATE TABLE `servers_queue` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`server_id` int(10) UNSIGNED NOT NULL, |
|||
`ts` datetime(0) NOT NULL, |
|||
`started` bit(1) NULL DEFAULT b'0', |
|||
`done` bit(1) NULL DEFAULT b'0', |
|||
`success` bit(1) NULL DEFAULT b'0', |
|||
`progress` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`command` tinyint(3) UNSIGNED NOT NULL, |
|||
`param` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING HASH |
|||
) ENGINE = MEMORY AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for sites |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `sites`; |
|||
CREATE TABLE `sites` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`account_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`name` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`server_ident` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`anchor_lat` double NULL DEFAULT 0, |
|||
`anchor_lon` double NULL DEFAULT 0, |
|||
`anchor_alt` double NULL DEFAULT 0, |
|||
`hemisphere` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N', |
|||
`map_id` tinyint(5) UNSIGNED NULL DEFAULT 0, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for sockets |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `sockets`; |
|||
CREATE TABLE `sockets` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`node_id` int(10) UNSIGNED NOT NULL, |
|||
`aux_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`type` tinyint(3) UNSIGNED NOT NULL, |
|||
`md5` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, |
|||
`multidrop` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
`mode` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`binded` tinyint(1) UNSIGNED NULL DEFAULT 0, |
|||
`path` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`name` char(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE, |
|||
UNIQUE INDEX `uni`(`node_id`, `type`, `md5`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for uart_settings |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `uart_settings`; |
|||
CREATE TABLE `uart_settings` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`type` tinyint(3) UNSIGNED NULL DEFAULT 1, |
|||
`socket_id` int(10) UNSIGNED NOT NULL, |
|||
`speed` int(10) UNSIGNED NULL DEFAULT 19200, |
|||
`bit` tinyint(3) UNSIGNED NULL DEFAULT 8, |
|||
`parity` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N', |
|||
`stop_bit` float(2, 1) UNSIGNED NULL DEFAULT 1, |
|||
`mode` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, |
|||
`port` int(11) NULL DEFAULT NULL, |
|||
`path` char(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for users |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `users`; |
|||
CREATE TABLE `users` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`login` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`pwdMD5` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`SID` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`create_ts` datetime(0) NULL DEFAULT NULL, |
|||
`login_ts` datetime(0) NULL DEFAULT NULL, |
|||
`access` tinyint(3) UNSIGNED NULL DEFAULT 0, |
|||
`language` tinyint(3) UNSIGNED NULL DEFAULT 1, |
|||
`width` int(10) UNSIGNED NULL DEFAULT 1024, |
|||
`height` int(10) UNSIGNED NULL DEFAULT 768, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for users_dash_layout |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `users_dash_layout`; |
|||
CREATE TABLE `users_dash_layout` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`user_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`node_id` int(10) UNSIGNED NULL DEFAULT NULL, |
|||
`x` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`y` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
SET FOREIGN_KEY_CHECKS = 1; |
|||
@ -0,0 +1,14 @@ |
|||
<?php |
|||
require_once('lib/assembler.php'); |
|||
if( $CUser->Data['id'] > 1 ){ |
|||
UI_PageHeaderExt( |
|||
'rgoose_general.js', |
|||
array('rgoose_timeline.js','rgoose_camera_editor.js','rgoose_mediaserver_module.js','rgoose_sysmap_editor.js','rgoose_location_editor.js','rgoose_dashboard.js','rgoose_main.js', 'rgoose_devices_module.js') |
|||
); |
|||
UI_PageBottomExt(); |
|||
} else { |
|||
UI_PageHeader(); |
|||
UI_LoginForm(); |
|||
UI_PageBottom(); |
|||
}; |
|||
?>
|
|||
@ -0,0 +1,104 @@ |
|||
<?php |
|||
require_once('lib/install.php'); |
|||
UI_INSTALL_PageHeader(); |
|||
if( isset( $_GET['stp'] ) ){ |
|||
$STP = intval( $_GET['stp'] ); |
|||
} else { |
|||
$STP = 0; |
|||
}; |
|||
switch( $STP ){ |
|||
case 0:{ |
|||
UI_INSTALL_DBCRED_Form(); |
|||
break; |
|||
}; |
|||
case 1:{ |
|||
$DBH = $_POST['dbh']; |
|||
$DBN = $_POST['dbn']; |
|||
$DBU = $_POST['dbu']; |
|||
$DBP = $_POST['dbp']; |
|||
$DATABASE = new MySQLi_DB( $DBH, $DBN, $DBU, $DBP ); |
|||
if( $DATABASE->isConnected ){ |
|||
$CMD='mysql --host='.$DBH.' --user='.$DBU.' --password='.$DBP.' --compress --database='.$DBN.'< ./setup/dfsl_gunter_structs.sql'; |
|||
$AA=`$CMD`; |
|||
$CMD='mysql --host='.$DBH.' --user='.$DBU.' --password='.$DBP.' --compress --database='.$DBN.'< ./setup/camera_ptz_protocols.sql'; |
|||
$AA=`$CMD`; |
|||
$CMD='mysql --host='.$DBH.' --user='.$DBU.' --password='.$DBP.' --compress --database='.$DBN.'< ./setup/labels_js.sql'; |
|||
$AA=`$CMD`; |
|||
$CMD='mysql --host='.$DBH.' --user='.$DBU.' --password='.$DBP.' --compress --database='.$DBN.'< ./setup/labels_php.sql'; |
|||
$AA=`$CMD`; |
|||
$CMD='mysql --host='.$DBH.' --user='.$DBU.' --password='.$DBP.' --compress --database='.$DBN.'< ./setup/server_module_types.sql'; |
|||
$AA=`$CMD`; |
|||
if( is_writable( './lib/settings.php' ) ){ |
|||
$FID = fopen('./lib/settings.php', 'w+' ); |
|||
if( $FID ){ |
|||
fprintf( $FID, '<?php' . "\n\t" ); |
|||
fprintf( $FID, '$DBHost="%s";' . "\n\t", $DBH ); |
|||
fprintf( $FID, '$DBName="%s";' . "\n\t", $DBN ); |
|||
fprintf( $FID, '$DBUser="%s";' . "\n\t", $DBU ); |
|||
fprintf( $FID, '$DBPassword="%s";' . "\n\t", $DBP ); |
|||
fprintf( $FID, '$SYSPath="%s";' . "\n\t", getcwd() ); |
|||
$processUser = posix_getpwuid(posix_geteuid()); |
|||
fprintf( $FID, '$WEBUser="%s";' . "\n\t", $processUser['name'] ); |
|||
$processGroup = posix_getgrgid(posix_getegid()); |
|||
fprintf( $FID, '$WEBGroup="%s";' . "\n\t", $processGroup['name'] ); |
|||
fprintf( $FID, "\n?>" ); |
|||
fclose( $FID ); |
|||
}; |
|||
UI_INSTALL_ADMIN_SITE_Form( $DBH, $DBN, $DBU, $DBP ); |
|||
} else { |
|||
UI_INSTALL_DBCRED_Form( $DBH, $DBN, $DBU, $DBP, "Cannot Write Settings File<br/>Please Fix Access to LIB Folder."); |
|||
}; |
|||
} else { |
|||
UI_INSTALL_DBCRED_Form( $DBH, $DBN, $DBU, $DBP, "Error Connecting to Database"); |
|||
}; |
|||
break; |
|||
}; |
|||
case 2:{ |
|||
$ADU = $_POST['adu']; |
|||
$ADP = $_POST['adp']; |
|||
$ADP2 = $_POST['adp2']; |
|||
$SINA = $_POST['sina']; |
|||
$DBH = $_POST['dbh']; |
|||
$DBN = $_POST['dbn']; |
|||
$DBU = $_POST['dbu']; |
|||
$DBP = $_POST['dbp']; |
|||
if( $ADP == $ADP2 ){ |
|||
if( $SINA != '' ){ |
|||
$DATABASE = new MySQLi_DB( $DBH, $DBN, $DBU, $DBP ); |
|||
if( is_writable( './index.php' ) ){ |
|||
$FID = fopen( './index.php', 'w+'); |
|||
if( $FID ){ |
|||
$Data = file_get_contents( './setup/index.php' ); |
|||
fprintf( $FID, $Data ); |
|||
fclose( $FID ); |
|||
}; |
|||
$EU = $DATABASE->escape( $ADU ); |
|||
$EP = md5( $ADP ); |
|||
$ESN = $DATABASE->escape( $SINA ); |
|||
$QS = "INSERT INTO `users` SET `login`='{$EU}', `pwdMD5`='{$EP}', `create_ts`=NOW(), `language`=1, `access`=10"; |
|||
$DATABASE->Query( $QS ); |
|||
//$SID = md5( $ESN );
|
|||
$QS = "INSERT INTO `sites` SET `name`='{$ESN}',`anchor_lat`=44.42601349357776,`anchor_lon`=8.823269813144353,`anchor_alt`=18.5";//, `server_ident`='{$SID}'";
|
|||
$DATABASE->Query( $QS ); |
|||
//$ID = $DATABASE->getLastInsertID();
|
|||
//$QS = "INSERT INTO `servers` SET `site_id`={$ID}, `identity`='{$SID}'";
|
|||
//$DATABASE->Query( $QS );
|
|||
UI_INSTALL_WELCOME_Form(); |
|||
} else { |
|||
UI_INSTALL_ADMIN_SITE_Form( $DBH, $DBN, $DBU, $DBP, $ADU, $ADP, $ADP2, $SINA, 'Cannot Write Index File<br/>Please Fix access to File/Folder!' ); |
|||
}; |
|||
} else { |
|||
UI_INSTALL_ADMIN_SITE_Form( $DBH, $DBN, $DBU, $DBP, $ADU, $ADP, $ADP2, $SINA, 'Please Provide Default Site Name!' ); |
|||
}; |
|||
} else { |
|||
UI_INSTALL_ADMIN_SITE_Form( $DBH, $DBN, $DBU, $DBP, $ADU, $ADP, $ADP2, $SINA, 'Admin User Passwords are not identical!' ); |
|||
}; |
|||
break; |
|||
}; |
|||
default:{ |
|||
echo "STEP: {$STP}\n"; |
|||
break; |
|||
}; |
|||
}; |
|||
UI_PageBottomExt(); |
|||
?>
|
|||
@ -0,0 +1,68 @@ |
|||
/* |
|||
Navicat Premium Data Transfer |
|||
|
|||
Source Server : Applica_tunel |
|||
Source Server Type : MySQL |
|||
Source Server Version : 100323 |
|||
Source Host : localhost:3306 |
|||
Source Schema : dfsl_gunter |
|||
|
|||
Target Server Type : MySQL |
|||
Target Server Version : 100323 |
|||
File Encoding : 65001 |
|||
|
|||
Date: 11/09/2021 05:23:10 |
|||
*/ |
|||
|
|||
SET NAMES utf8mb4; |
|||
SET FOREIGN_KEY_CHECKS = 0; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for labels_js |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `labels_js`; |
|||
CREATE TABLE `labels_js` ( |
|||
`language_id` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`key` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
UNIQUE INDEX `uniq`(`language_id`, `key`) USING BTREE, |
|||
INDEX `lang`(`language_id`) USING BTREE |
|||
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of labels_js |
|||
-- ---------------------------- |
|||
INSERT INTO `labels_js` VALUES (1, '_CANCEL_', 'Cancel'); |
|||
INSERT INTO `labels_js` VALUES (1, '_OK_', 'Ok'); |
|||
INSERT INTO `labels_js` VALUES (1, '_ADD_', 'Add'); |
|||
INSERT INTO `labels_js` VALUES (1, '_ADD_MEDIA_SERVER_', 'Add Media Server'); |
|||
INSERT INTO `labels_js` VALUES (1, '_ADD_CONNECTION_', 'Add Connection'); |
|||
INSERT INTO `labels_js` VALUES (1, '_EDIT_LRF3D_SETTINGS_', 'Edit Lidar 3D Settings'); |
|||
INSERT INTO `labels_js` VALUES (1, '_SAVE_', 'Save'); |
|||
INSERT INTO `labels_js` VALUES (1, '_FHM_PROPS_', 'FlyHunter Module Properties'); |
|||
INSERT INTO `labels_js` VALUES (1, '_MAP_REG_LBL_', 'Regular WGS84 Map (reqires Internet)'); |
|||
INSERT INTO `labels_js` VALUES (1, '_MAP_CUST_LBL_', 'Custom Map'); |
|||
INSERT INTO `labels_js` VALUES (1, '_MAP_TYP_LBL_', 'Map Type'); |
|||
INSERT INTO `labels_js` VALUES (1, '_SITE_PROP_LBL_', 'Site Properties'); |
|||
INSERT INTO `labels_js` VALUES (1, '_SYS_ANCHORT_LBL_', 'System Anchor'); |
|||
INSERT INTO `labels_js` VALUES (1, '_LAT_SHORT_LBL_', 'Lat'); |
|||
INSERT INTO `labels_js` VALUES (1, '_LON_SHORT_LBL_', 'Lon'); |
|||
INSERT INTO `labels_js` VALUES (1, '_ALT_SHORT_LBL_', 'Alt'); |
|||
INSERT INTO `labels_js` VALUES (1, '_CREATE_NEW_LBL_', 'Create New'); |
|||
INSERT INTO `labels_js` VALUES (1, '_UPDATE_LBL_', 'Update'); |
|||
INSERT INTO `labels_js` VALUES (1, '_LOC_MAP_LBL_', 'Location Map'); |
|||
INSERT INTO `labels_js` VALUES (1, 'Error_Message', 'Error Message'); |
|||
INSERT INTO `labels_js` VALUES (1, '_ADD_IP_CAMERA_', 'Add IP Camera'); |
|||
INSERT INTO `labels_js` VALUES (1, '_CONNECT_2_SEL_', 'Connect To Selected'); |
|||
INSERT INTO `labels_js` VALUES (1, '_CON_2_IP_CAM_', 'Connect to IP Camera'); |
|||
INSERT INTO `labels_js` VALUES (1, '_PROV_CAC_', 'Please Provide Camera Access Credentials.'); |
|||
INSERT INTO `labels_js` VALUES (1, '_LOGIN_0_', 'Login:'); |
|||
INSERT INTO `labels_js` VALUES (1, '_PASSWORD_0_', 'Password:'); |
|||
INSERT INTO `labels_js` VALUES (1, '_STREAMS_', 'Streams'); |
|||
INSERT INTO `labels_js` VALUES (1, '_CAC_TAB_', 'Credentials'); |
|||
INSERT INTO `labels_js` VALUES (1, '_PTZ_TAB_', 'PTZ Settings'); |
|||
INSERT INTO `labels_js` VALUES (1, '_LOC_TAB_', 'Location/Orientation'); |
|||
INSERT INTO `labels_js` VALUES (1, '_DET_IP_CAMERA_LST_', 'Detected IP Cameras List'); |
|||
INSERT INTO `labels_js` VALUES (1, '_ADV_TAB_', 'Advanced Settings'); |
|||
|
|||
SET FOREIGN_KEY_CHECKS = 1; |
|||
@ -0,0 +1,49 @@ |
|||
/* |
|||
Navicat Premium Data Transfer |
|||
|
|||
Source Server : Applica_tunel |
|||
Source Server Type : MySQL |
|||
Source Server Version : 100323 |
|||
Source Host : localhost:3306 |
|||
Source Schema : dfsl_gunter |
|||
|
|||
Target Server Type : MySQL |
|||
Target Server Version : 100323 |
|||
File Encoding : 65001 |
|||
|
|||
Date: 11/09/2021 05:23:24 |
|||
*/ |
|||
|
|||
SET NAMES utf8mb4; |
|||
SET FOREIGN_KEY_CHECKS = 0; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for labels_php |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `labels_php`; |
|||
CREATE TABLE `labels_php` ( |
|||
`language_id` tinyint(3) UNSIGNED NULL DEFAULT NULL, |
|||
`key` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
`label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
UNIQUE INDEX `uniq`(`language_id`, `key`) USING BTREE, |
|||
INDEX `lang`(`language_id`) USING BTREE |
|||
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of labels_php |
|||
-- ---------------------------- |
|||
INSERT INTO `labels_php` VALUES (1, '__PAGEWASGENIN__', 'The page was generated in'); |
|||
INSERT INTO `labels_php` VALUES (1, '__SECOND__', 'second'); |
|||
INSERT INTO `labels_php` VALUES (1, '__SECONDS__', 'seconds'); |
|||
INSERT INTO `labels_php` VALUES (1, '__LOGIN_ID__', 'Login ID'); |
|||
INSERT INTO `labels_php` VALUES (1, '__PASSWORD__', 'Password'); |
|||
INSERT INTO `labels_php` VALUES (1, '__LOGIN__', 'Login'); |
|||
INSERT INTO `labels_php` VALUES (1, '__LOGOUT__', 'Logout'); |
|||
INSERT INTO `labels_php` VALUES (2, '__PAGEWASGENIN__', 'Страница сгенерированна за'); |
|||
INSERT INTO `labels_php` VALUES (2, '__SECOND__', 'секунды'); |
|||
INSERT INTO `labels_php` VALUES (2, '__SECONDS__', 'секунды'); |
|||
INSERT INTO `labels_php` VALUES (1, '__ONLINE__', 'Online'); |
|||
INSERT INTO `labels_php` VALUES (1, '__OFFLINE__', 'Offline'); |
|||
INSERT INTO `labels_php` VALUES (1, '__ADD__', 'Add'); |
|||
|
|||
SET FOREIGN_KEY_CHECKS = 1; |
|||
@ -0,0 +1,42 @@ |
|||
/* |
|||
Navicat Premium Data Transfer |
|||
|
|||
Source Server : Applica_tunel |
|||
Source Server Type : MySQL |
|||
Source Server Version : 100323 |
|||
Source Host : localhost:3306 |
|||
Source Schema : dfsl_gunter |
|||
|
|||
Target Server Type : MySQL |
|||
Target Server Version : 100323 |
|||
File Encoding : 65001 |
|||
|
|||
Date: 11/09/2021 05:24:06 |
|||
*/ |
|||
|
|||
SET NAMES utf8mb4; |
|||
SET FOREIGN_KEY_CHECKS = 0; |
|||
|
|||
-- ---------------------------- |
|||
-- Table structure for server_module_types |
|||
-- ---------------------------- |
|||
DROP TABLE IF EXISTS `server_module_types`; |
|||
CREATE TABLE `server_module_types` ( |
|||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
|||
`builtin` bit(1) NULL DEFAULT b'0', |
|||
`allow_multiply` bit(1) NULL DEFAULT b'1', |
|||
`name` char(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, |
|||
PRIMARY KEY (`id`) USING BTREE |
|||
) ENGINE = MyISAM AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed; |
|||
|
|||
-- ---------------------------- |
|||
-- Records of server_module_types |
|||
-- ---------------------------- |
|||
INSERT INTO `server_module_types` VALUES (1, b'1', b'0', 'MODULE_ZLMEDIA'); |
|||
INSERT INTO `server_module_types` VALUES (2, b'1', b'1', 'MODULE_DCBUSB'); |
|||
INSERT INTO `server_module_types` VALUES (3, b'1', b'0', 'MODULE_KAFKA'); |
|||
INSERT INTO `server_module_types` VALUES (4, b'1', b'0', 'MODULE_GPS'); |
|||
INSERT INTO `server_module_types` VALUES (5, b'1', b'0', 'MODULE_NETWORK'); |
|||
INSERT INTO `server_module_types` VALUES (6, b'1', b'0', 'MODULE_FLYHUNT'); |
|||
|
|||
SET FOREIGN_KEY_CHECKS = 1; |
|||
@ -0,0 +1,74 @@ |
|||
<?php |
|||
$WEBUser='www-data'; |
|||
$WEBGroup='www-data'; |
|||
$DBHost='localhost'; |
|||
$DBUser='dbroot'; |
|||
$DBPassword='NoGud4U'; |
|||
$DBName='dfsl_gunter'; |
|||
|
|||
$ShowImagesLocal=false; |
|||
$ShowThumbnailsLocal=true; |
|||
|
|||
$ShowAdw=true; |
|||
$SaveLocal=false; |
|||
$MailAgent='SENDMAIL'; |
|||
$CGP_SubmitPath='../Submitted/'; |
|||
|
|||
$WEBPath='http://' . $_SERVER['SERVER_ADDR'] . '/'; |
|||
$SYSPath='/srv/web/html/'; |
|||
$DBCacheDir=$SYSPath . 'cache'; |
|||
|
|||
$MinimalSize=640000; |
|||
|
|||
// Argus Defines
|
|||
|
|||
define( "ARGUS_SERVER", 0 ); |
|||
define( "ARGUS_ALS_SENSOR", 1 ); |
|||
define( "ARGUS_LFS_SENSOR", 2 ); |
|||
define( "ARGUS_PLS_200_SENSOR", 3 ); |
|||
define( "ARGUS_PLS_360_SENSOR", 4 ); |
|||
define( "ARGUS_3D_SENSOR", 5 ); |
|||
define( "ARGUS_NET_PLS_200", 6 ); |
|||
define( "ARGUS_ANALOG_STATIC_CAMERA", 10 ); |
|||
define( "ARGUS_ANALOG_PTZ_CAMERA", 11 ); |
|||
define( "ARGUS_IP_STATIC_CAMERA", 12 ); |
|||
define( "ARGUS_IP_PTZ_CAMERA", 13 ); |
|||
define( "ARGUS_IP_UART_GATEWAY", 20 ); |
|||
define( "ARGUS_JAMER", 40 ); |
|||
define( "ARGUS_IP_VIDEO_SERVER", 50 ); |
|||
define( "ARGUS_DRONE_CONTROL", 60 ); |
|||
define( "ARGUS_UNKNOWN", 255 ); |
|||
|
|||
define( "ARGUS_NODE_SOCK_TYPE_SERIAL_PORT", 1 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_NETWORK", 2 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_DC", 3 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_GRABBER", 4 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_AUDIO_GRABBER", 5 ); |
|||
define( "ARGUS_NODE_SOCK_TYPE_VIDEO_DIGITAL", 6 ); |
|||
|
|||
define( "COM_MODE_IN", 1 ); |
|||
define( "COM_MODE_OUT", 2 ); |
|||
define( "COM_MODE_INOUT", 3 ); |
|||
|
|||
define( "COM_TYPE_UART", 1 ); |
|||
define( "COM_TYPE_TCP", 2 ); |
|||
define( "COM_TYPE_DC_CTRL", 3 ); |
|||
define( "COM_TYPE_ANALOG_VIDEO", 4 ); |
|||
define( "COM_TYPE_ANALOG_AUDIO", 5 ); |
|||
define( "COM_TYPE_DIGITAL_MEDIA", 6 ); |
|||
|
|||
define( "CAM_TYPE_ANALOG", 1 ); |
|||
define( "CAM_TYPE_DIGITAL", 2 ); |
|||
|
|||
define( "MOD_TYPE_MEDIASERVER", 1 ); |
|||
define( "MOD_TYPE_USB_DC", 2 ); |
|||
|
|||
function microtime_float(){ |
|||
list($usec, $sec) = explode(" ", microtime()); |
|||
return ((float)$usec + (float)$sec); |
|||
}; |
|||
|
|||
$Script_Start_Time = microtime_float(); |
|||
|
|||
|
|||
?>
|
|||
@ -1,173 +0,0 @@ |
|||
<?php |
|||
$Debug = false; |
|||
$Max_RANGE = 300.0; // 300 meters
|
|||
$CAM_IP = '192.168.0.109'; |
|||
$CAM_USER = 'gagua'; |
|||
$CAM_PASS = '4GetMyID'; |
|||
$CAM_PTZ_PROFILE = 'Profile_1'; |
|||
$CAM_TARGET_MICRO_DELAY = 3.0; //3 seconds
|
|||
$CAM_FOV_MIN = 5.0; |
|||
$CAM_FOV_MAX = 45.0; |
|||
$CAM_ZOOM_FIXED = false; |
|||
$CAM_SET_ZOOM = 0;// 0 - 1.0
|
|||
$FH_RELAY = ''; |
|||
$JAMMER_RELAY = ''; |
|||
|
|||
require_once('lib/soap_asm.php'); |
|||
$RegData = file_get_contents('registry.sjno'); |
|||
if($RegData!==false){ |
|||
$Registry = json_decode( $RegData, true ); |
|||
} else { |
|||
$Registry = array(); |
|||
}; |
|||
$lts = date ( "Y/m/d H:i:s" ); |
|||
$rts = ''; |
|||
$Headers = getallheaders(); |
|||
if($Debug){ |
|||
$fd = fopen( "posts.txt", "a+" ); |
|||
fprintf( $fd, " ----------------- \r\n" ); |
|||
fprintf( $fd, "Header:\r\n" ); |
|||
foreach( $Headers as $key=>$value){ |
|||
fprintf( $fd, $key.': '.$value."\r\n" ); |
|||
}; |
|||
fprintf( $fd, "Post:\r\n" ); |
|||
foreach( $_POST as $key=>$value){ |
|||
fprintf( $fd, $key.': '.$value."\r\n" ); |
|||
}; |
|||
fprintf( $fd, "Get:\r\n" ); |
|||
foreach( $_GET as $key=>$value){ |
|||
fprintf( $fd, $key.': '.$value."\r\n" ); |
|||
}; |
|||
fprintf( $fd, "REST:\r\n" ); |
|||
}; |
|||
try { |
|||
if (!($Data = file_get_contents('php://input'))) { |
|||
fprintf( $fd, "Can not Read STDIO Data\r\n" ); |
|||
} else { |
|||
$JS = json_decode( $Data, true ); |
|||
if( !is_array($JS) ){ |
|||
$xml_parser = xml_parser_create(); |
|||
if (!xml_parse_into_struct ( $xml_parser, $Data, $XS )){ |
|||
$XS = false; |
|||
} else { |
|||
// Handle XML commands
|
|||
switch($XS[0]['tag']){ |
|||
case 'LCU:SYSTEMSTATUS':{ |
|||
if($Debug)fprintf( $fd, "STATUS update!\r\n" ); |
|||
break; |
|||
}; |
|||
case 'LCU:EVENTLIDAR3D':{ |
|||
$T['el'] = $XS[7]['value'] / 1000.0; |
|||
$Z = ( 90.0 - $T['el'] ); |
|||
if( $Z < 0.0 ){ |
|||
$Z *= -1.0; |
|||
$T['az'] = $XS[6]['value'] / 1000.0 + 180.0; |
|||
if( $T['az'] > 360.0 ) $T['az'] -= 360.0; |
|||
} else { |
|||
$T['az'] = $XS[6]['value'] / 1000.0; |
|||
}; |
|||
$T['range'] = $XS[8]['value'] / 10.0; |
|||
$TTS = microtime(true); |
|||
if($Debug)fprintf( $fd, "3D Target! Azimuth %.2f Elevation %.2f Range %.2f\r\n", $T['az'], $T['el'], $T['range'] ); |
|||
$O = $Registry['old_target']; |
|||
$OTS = $Registry['last_ts']; |
|||
if( ( $TTS-$OTS ) < $CAM_TARGET_MICRO_DELAY ){ |
|||
// Target Filters
|
|||
if($Debug)fprintf( $fd, "Move Filtered by Cam Delay %f $f\r\n", $TTS, $OTS ); |
|||
} else { |
|||
$T_FOV = ( $CAM_FOV_MIN + ($CAM_FOW_MAX - $CAM_FOV_MIN) * ( 1.0 - ( $O['range'] / $Max_RANGE ) )) / 2.0; |
|||
if( abs($O['az']-$T['az']) > $T_FOV || abs($O['az']-$T['az']) > $T_FOV ){ |
|||
if($Debug)fprintf( $fd, "Move PTZ \r\n" ); |
|||
$CAM=new ponvif(); |
|||
$CAM->setUsername( $CAM_USER ); |
|||
$CAM->setPassword( $CAM_PASS ); |
|||
$CAM->setIPAddress( $CAM_IP ); |
|||
try { |
|||
$CAM->initialize(); |
|||
$C_AZ = $T['az'] * ( 2.0 / 360.0 ) - 1.0; |
|||
$C_EL = $Z * ( 2.0 / 90.0 ) - 1.0; |
|||
$C_Z = $T['range'] / $Max_RANGE; |
|||
if($CAM_ZOOM_FIXED){ |
|||
$CAM->ptz_AbsoluteMove( $CAM_PTZ_PROFILE, $C_AZ, $C_EL, $CAM_SET_ZOOM ); |
|||
} else { |
|||
$CAM->ptz_AbsoluteMove( $CAM_PTZ_PROFILE, $C_AZ, $C_EL, $C_Z ); |
|||
}; |
|||
} catch (Exception $e) { |
|||
if($Debug)fprintf( $fd, 'Caught exception: ', $e->getMessage(), "\r\n" ); |
|||
}; |
|||
// Update Registry
|
|||
$Registry['old_target'] = $T; |
|||
$Registry['last_ts'] = $TTS; |
|||
} else { |
|||
if($Debug)fprintf( $fd, "Move is Filtered\r\n" ); |
|||
}; |
|||
}; |
|||
break; |
|||
}; |
|||
case 'LCU:EVENTLIDAR2D':{ |
|||
if($Debug)fprintf( $fd, "2D Target!\r\n" ); |
|||
break; |
|||
}; |
|||
}; |
|||
}; |
|||
xml_parser_free( $xml_parser ); |
|||
} else { |
|||
$XS = false; |
|||
// Handle Jeson commands
|
|||
if( isset( $JS['mitigation'] ) ){ |
|||
if( isset( $JS['mitigation']['parameters'] ) ){ |
|||
if( isset( $JS['mitigation']['parameters']['cmd'] ) ){ |
|||
if( $JS['mitigation']['parameters']['cmd'] == 'ARM' ){ |
|||
if( $_GET['z'] == 'jammer' ){ |
|||
$CMD = 'usbrelay ' . $JAMMER_RELAY . '=1'; |
|||
$D = `$CMD`; |
|||
}; |
|||
if( $_GET['z'] == 'hunter' ){ |
|||
$CMD = 'usbrelay ' . $FH_RELAY . '=1'; |
|||
$D = `$CMD`; |
|||
}; |
|||
}; |
|||
if( $JS['mitigation']['parameters']['cmd'] == 'DISARM' ){ |
|||
if( $_GET['z'] == 'jammer' ){ |
|||
$CMD = 'usbrelay ' . $JAMMER_RELAY . '=0'; |
|||
$D = `$CMD`; |
|||
}; |
|||
if( $_GET['z'] == 'hunter' ){ |
|||
$CMD = 'usbrelay ' . $FH_RELAY . '=0'; |
|||
$D = `$CMD`; |
|||
}; |
|||
}; |
|||
}; |
|||
}; |
|||
}; |
|||
}; |
|||
if($Debug && 0 ){ |
|||
fprintf( $fd, $Data . "\r\n" ); |
|||
ob_start(); |
|||
if( is_array( $JS )){ |
|||
print_r( $JS ); |
|||
}; |
|||
if( $XS !== false ){ |
|||
print_r( $XS ); |
|||
}; |
|||
$produced = ob_get_contents(); |
|||
ob_end_clean(); |
|||
fprintf( $fd, $produced . "\r\n" ); |
|||
}; |
|||
}; |
|||
} catch ( Exception $e ) { |
|||
if($Debug)fprintf( $fd, 'Did not successfully process HTTP request: '.$e->getMessage() ); |
|||
}; |
|||
if($Debug){ |
|||
fprintf( $fd, " ----------------- \r\n" ); |
|||
fclose( $fd ); |
|||
}; |
|||
$rd = fopen( "registry.sjno", "r+" ); |
|||
if(flock ( $rd, LOCK_EX )){ |
|||
ftruncate($rd, 0); |
|||
fwrite($rd, json_encode( $Registry )); |
|||
fflush($rd); |
|||
flock($rd, LOCK_UN); |
|||
}; |
|||
fclose( $rd); |
|||
?>
|
|||
@ -1,92 +0,0 @@ |
|||
<?php |
|||
function interpolate( $color1, $color2, $progress) { |
|||
//$a1 = ($color1 & 0xff000000) >> 24;
|
|||
$r1 = ($color1 & 0x00ff0000) >> 16; |
|||
$g1 = ($color1 & 0x0000ff00) >> 8; |
|||
$b1 = $color1 & 0x000000ff; |
|||
//$a2 = ($color2 & 0xff000000) >> 24;
|
|||
$r2 = ($color2 & 0x00ff0000) >> 16; |
|||
$g2 = ($color2 & 0x0000ff00) >> 8; |
|||
$b2 = $color2 & 0x000000ff; |
|||
$k1 = log10( $progress ); |
|||
$k2 = 1.0 - $k1; |
|||
//$newA = (int)($a1 * $k2 + $a2 * $k1);
|
|||
$newR = (int)($r1 * $k2 + $r2 * $k1); |
|||
$newG = (int)($g1 * $k2 + $g2 * $k1); |
|||
$newB = (int)($b1 * $k2 + $b2 * $k1); |
|||
//return ($newA << 24) + ($newR << 16) + ($newG << 8) + $newB;
|
|||
return ($newR << 16) + ($newG << 8) + $newB; |
|||
}; |
|||
|
|||
//*
|
|||
|
|||
$thumbnail = imagecreatetruecolor( 2304, 288); |
|||
if(!$thumbnail) { |
|||
die('Error when creating the destination image.'); |
|||
}; |
|||
//$filename = "storage/192.168.1.63_2222_draw_yard.raw";
|
|||
$filename = "storage/192.168.1.63_2222_draw_field.raw"; |
|||
$handle = fopen($filename, "rb"); |
|||
$cx = 0; |
|||
$cy = 288; |
|||
$cc = 0.0; |
|||
$k = 1.0/409.60; |
|||
while( !feof( $handle ) ){ |
|||
$data = fread( $handle, 4*2304 ); |
|||
$stride = unpack ( "V*", $data );//, int $offset = 0 );
|
|||
if( count($stride) == 2304 ){ |
|||
for( $index = 0; $index< 2304; $index++ ){ |
|||
$z = $k * ( ( $stride[$index+1] >> 12 ) & 0xFFF); |
|||
//$z = $k * ( $stride[$index+1] & 0xFFF);
|
|||
$s = 1.0 - log10( $z ); |
|||
$R = (int)(255 * $s); |
|||
$G = (int)(255 * $s); |
|||
$B = (int)(255 * $s); |
|||
$C = imagecolorclosest ( $thumbnail, $R, $G, $B); |
|||
imagesetpixel ( $thumbnail, $index, $cy , $C ); |
|||
|
|||
}; |
|||
$cy--; |
|||
}; |
|||
}; |
|||
fclose( $handle ); |
|||
//header("Content-Type: image/png");
|
|||
imagepng( $thumbnail ); |
|||
//*/
|
|||
|
|||
/* |
|||
$canvas = new Imagick(); |
|||
$width = 2304; |
|||
$height = 288; |
|||
$canvas->newImage($width, $height, new ImagickPixel("black")); |
|||
$canvas->setImageFormat("png"); |
|||
|
|||
$filename = "storage/18May_test.raw"; |
|||
$handle = fopen($filename, "rb"); |
|||
$cy = 288; |
|||
$k = 1.0 / 4096.0; |
|||
while( !feof( $handle ) ){ |
|||
$data = fread( $handle, 4*2304 ); |
|||
$stride = unpack ( "V*", $data );//, int $offset = 0 );
|
|||
if( count($stride) == 2304 ){ |
|||
$iterator = $canvas->getPixelRegionIterator( 0, $cy, $width, 1); |
|||
$index = 0; |
|||
foreach( $iterator as $pixels ){ |
|||
foreach( $pixels as $pixel ){ |
|||
$a = interpolate( 0xFFFFFFFF, 0xFF00FF00, ( $k * ( $stride[$index+1] & 0xFFF )) ); |
|||
$c = '#' . sprintf("%08x", $a ); |
|||
//echo $cy . " " . $index . " " . $c . "\n";
|
|||
$pixel->setColor( $c ); |
|||
$index++; |
|||
}; |
|||
$iterator->syncIterator(); |
|||
}; |
|||
$cy--; |
|||
}; |
|||
}; |
|||
fclose( $handle ); |
|||
// header( 'Content-type: ' . $canvas->getFormat() );
|
|||
echo $canvas->getimageblob(); |
|||
*/ |
|||
?>
|
|||
|
|||
Binary file not shown.
|
After Width: 488 | Height: 210 | Size: 48 KiB |
@ -1,25 +0,0 @@ |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset=utf-8/> |
|||
<!-- CSS --> |
|||
<link href="https://vjs.zencdn.net/7.2.3/video-js.css" rel="stylesheet"> |
|||
<!-- JS code --> |
|||
<script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.14.1/videojs-contrib-hls.js"></script> |
|||
<script src="https://vjs.zencdn.net/7.2.3/video.js"></script> |
|||
</head> |
|||
<body> |
|||
DCR01_1=1 |
|||
DCR01_2=1 |
|||
Array |
|||
( |
|||
[0] => DCR01_1=1 |
|||
[1] => DCR01_2=1 |
|||
[2] => |
|||
) |
|||
<br/> Relay Found!<br/> |
|||
Relay DCR01_1 is about to set On!<br/> |
|||
Relay DCR01_2 is about to set On!<br/> |
|||
Command issued: usbrelay DCR01_1=1 DCR01_2=1 Code Received: <br/> |
|||
</body> |
|||
</html> |
|||
@ -1,36 +0,0 @@ |
|||
<?php ?><html lang="en">
|
|||
<head> |
|||
<meta charset=utf-8/> |
|||
<!-- CSS --> |
|||
<link href="https://vjs.zencdn.net/7.2.3/video-js.css" rel="stylesheet"> |
|||
<!-- JS code --> |
|||
<script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.14.1/videojs-contrib-hls.js"></script> |
|||
<script src="https://vjs.zencdn.net/7.2.3/video.js"></script> |
|||
</head> |
|||
<body> |
|||
<?php |
|||
$DATA = `usbrelay`; |
|||
$tArr = explode( "\n", $DATA ); |
|||
$Rel = array(); |
|||
print_r( $DATA ); |
|||
print_r( $tArr ); |
|||
foreach( $tArr as $AR ){ |
|||
$CC = explode('=', trim($AR) ); |
|||
if( strlen($CC[0]) > 4 ) $Rel[]=$CC[0]; |
|||
}; |
|||
if( count( $Rel ) ){ |
|||
echo "<br/> Relay Found!<br/>\n"; |
|||
$CMD_TO_ISSUE = 'usbrelay '; |
|||
foreach( $Rel as $R ){ |
|||
$CMD_TO_ISSUE .= $R . '=0 '; |
|||
echo "Relay ". $R ." is about to set Off!<br/>\n"; |
|||
}; |
|||
$AA = `$CMD_TO_ISSUE`; |
|||
echo "Command issued: " . $CMD_TO_ISSUE . " Code Received: " . $AA . "<br/>\n"; |
|||
} else { |
|||
echo "<br/>No Relay Found<br/>\n"; |
|||
}; |
|||
?>
|
|||
</body> |
|||
</html> |
|||
@ -1,36 +0,0 @@ |
|||
<?php ?><html lang="en">
|
|||
<head> |
|||
<meta charset=utf-8/> |
|||
<!-- CSS --> |
|||
<link href="https://vjs.zencdn.net/7.2.3/video-js.css" rel="stylesheet"> |
|||
<!-- JS code --> |
|||
<script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.14.1/videojs-contrib-hls.js"></script> |
|||
<script src="https://vjs.zencdn.net/7.2.3/video.js"></script> |
|||
</head> |
|||
<body> |
|||
<?php |
|||
$DATA = `usbrelay`; |
|||
$tArr = explode( "\n", $DATA ); |
|||
$Rel = array(); |
|||
print_r( $DATA ); |
|||
print_r( $tArr ); |
|||
foreach( $tArr as $AR ){ |
|||
$CC = explode('=', trim($AR) ); |
|||
if( strlen($CC[0]) > 4 ) $Rel[]=$CC[0]; |
|||
}; |
|||
if( count( $Rel ) ){ |
|||
echo "<br/> Relay Found!<br/>\n"; |
|||
$CMD_TO_ISSUE = 'usbrelay '; |
|||
foreach( $Rel as $R ){ |
|||
$CMD_TO_ISSUE .= $R . '=1 '; |
|||
echo "Relay ". $R ." is about to set On!<br/>\n"; |
|||
}; |
|||
$AA = `$CMD_TO_ISSUE`; |
|||
echo "Command issued: " . $CMD_TO_ISSUE . " Code Received: " . $AA . "<br/>\n"; |
|||
} else { |
|||
echo "<br/>No Relay Found<br/>\n"; |
|||
}; |
|||
?>
|
|||
</body> |
|||
</html> |
|||
@ -1,11 +0,0 @@ |
|||
#/srv/toogler/bin/ffmpeg -y -i "rtsp://gagua:4GetMyID@192.168.200.116:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2" -codec:v libtheora -qscale:v 7 -r 10 -an gaga.ogg |
|||
#2> /dev/null |
|||
|
|||
#/srv/toogler/bin/ffmpeg -rtsp_transport tcp -i "rtsp://gagua:4GetMyID@192.168.200.116:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1" -r 10 -y -c:v libvpx-vp9 -an output.webm |
|||
# 2> /dev/null |
|||
|
|||
#/srv/toogler/bin/ffmpeg -y -rtsp_transport tcp -i "rtsp://gagua:4GetMyID@192.168.200.116:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1" -c:v copy -an toto.mp4 |
|||
|
|||
#ffmpeg -y -i 1.mp4 -c:v libx264 -an -r 25 -strict -2 -map_metadata -1 -movflags faststart -vf "crop=1280:720:0:4, scale=iw*min(426/iw\,240/ih):ih*min(426/iw\,240/ih), pad=426:240:(426-iw*min(426/iw\,240/ih))/2:(240-ih*min(426/iw\,240/ih))/2, setsar=sar=1" 22.mp4 |
|||
|
|||
ffmpeg -y -i "rtsp://gagua:4GetMyID@192.168.200.116:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2" -vf "scale=320:240" -r 5 -vcodec libvpx -an -f webm out |
|||
@ -1,22 +0,0 @@ |
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset=utf-8/> |
|||
<!-- CSS --> |
|||
<link href="https://vjs.zencdn.net/7.2.3/video-js.css" rel="stylesheet"> |
|||
<!-- JS code --> |
|||
<!-- If you'd like to support IE8 (for Video.js versions prior to v7) --> |
|||
<script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script> |
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.14.1/videojs-contrib-hls.js"></script> |
|||
<script src="https://vjs.zencdn.net/7.2.3/video.js"></script> |
|||
</head> |
|||
<body> |
|||
<!-- HTML --> |
|||
<video id='hls-example' class="video-js vjs-default-skin" width="400" height="300" controls autoplay> |
|||
<source type="application/x-mpegURL" src="http://192.168.200.125:8081/argus/0/hls.m3u8"> |
|||
</video> |
|||
<script> |
|||
var player = videojs('hls-example'); |
|||
player.play(); |
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -1,8 +0,0 @@ |
|||
<?php |
|||
//require_once('lib/assembler.php');
|
|||
require_once('lib/php/video/videostream.php'); |
|||
//$stream1 = new VideoStream('1.mp4');
|
|||
//$stream1->start();
|
|||
$stream1 = new VideoStream('rtsp://gagua:4GetMyID@192.168.200.116:554/Streaming/Channels/102?transportmode=unicast&profile=Profile_2'); |
|||
$stream1->startStream(); |
|||
?>
|
|||
@ -1,8 +0,0 @@ |
|||
<html> |
|||
<body> |
|||
<video data-dashjs-player |
|||
width="640" height="480" controls autoplay |
|||
src="test_mp4.php"> |
|||
</video> |
|||
</body> |
|||
</html> |
|||
@ -1,6 +0,0 @@ |
|||
<?php |
|||
//require_once('lib/assembler.php');
|
|||
require_once('lib/php/video/videostream.php'); |
|||
$stream1 = new VideoStream('1.mp4'); |
|||
$stream1->startStream(); |
|||
?>
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue