You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

2127 lines
95 KiB

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="cache-control"
content="max-age=0" />
<meta http-equiv="cache-control"
content="no-store" />
<meta http-equiv="expires"
content="-1" />
<meta http-equiv="expires"
content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma"
content="no-cache" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--meta http-equiv="refresh" content="300" />--> <!--Refresh each 5s-->
<meta charset="utf-8" />
<!--
<link rel="preload" href="images/info-2-32X32.png" as="image" />
<link rel="preload" href="labels/car_type/denial.png" as="image" />
<link rel="preload" href="labels/car_type/allowed.png" as="image" />
<link rel="preload" href="labels/car_type/visitor.png" as="image" />
<link rel="preload" href="labels/car_type/ambulance.png" as="image" />
<link rel="preload" href="labels/car_type/bus.png" as="image" />
<link rel="preload" href="labels/car_type/car.png" as="image" />
<link rel="preload" href="labels/car_type/fire_engine.png" as="image" />
<link rel="preload" href="labels/car_type/motorbike.png" as="image" />
<link rel="preload" href="labels/car_type/pickup.png" as="image" />
<link rel="preload" href="labels/car_type/police_car.png" as="image" />
<link rel="preload" href="labels/car_type/SUV.png" as="image" />
<link rel="preload" href="labels/car_type/trailer.png" as="image" />
<link rel="preload" href="labels/car_type/truck.png" as="image" />
<link rel="preload" href="labels/car_type/tuktuk.png" as="image" />
<link rel="preload" href="labels/car_type/van.png" as="image" />
<link rel="preload" href="images/down_arrow.png" as="image" />
<link rel="preload" href="images/up_arrow.png" as="image" />
<link rel="preload" href="images/slider_handle.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_anpr.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_lpr_list.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_alarm.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_license.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_ptz.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_setting.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_output.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_stopwatch.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_radar.png" as="image" onerror="reloadIcon(this)" />
<link rel="preload" href="images/icon_tof.png" as="image" onerror="reloadIcon(this)" />-->
<link rel="preload" href="bootstrap.min.css" as="style" onload="this.rel='stylesheet'">
<!--<link rel="preload" href="css/style.css" as="style" onload="this.rel='stylesheet'">-->
<link rel="preload" href="jquery_3_2_1.min.js" as="script">
<link rel="preload" href="fabric_jquery.easyui.min_compressed_on_nvr.js" as="script">
<link rel="preload" href="config.js" as="script">
<link rel="preload" href="cookie.min.js" as="script">
<link rel="preload" href="lang.js" as="script">
<link rel="preload" href="label_names.js" as="script">
<link rel="preload" href="third_party_label_names.js" as="script">
<link rel="preload" href="lang_cookie.js" as="script">
<script>
//localStorage.clear();lang_cookie.js
sessionStorage.clear();
</script>
<script src="jquery_3_2_1.min.js"></script>
<script src="fabric_jquery.easyui.min_compressed_on_nvr.js"></script>
<script src="config.js"></script>
<!--<script src="js_3_5_1.js"></script>-->
<script src="cookie.min.js"></script>
<script src="lang.js"></script>
<script src="lang_cookie.js"></script>
<script>
window.onerror = function (message, url, linenumber) {
console.log('JavaScript error: ' + message + ' on line ' + linenumber + ' for ' + url);
if (url.search("fabric_jquery.easyui.min_compressed_on_nvr.js") >= 1) {
loadScript("fabric_jquery.easyui.min_compressed_on_nvr.js", function () {
});
}
else if (url.search("jquery_3_2_1.min.js") >= 1) {
loadScript("jquery_3_2_1.min.js", function () {
});
}
else if (url.search("config.js") >= 1) {
loadScript("config.js", function () {
});
}
else if (url.search("cookie.min.js") >= 1) {
loadScript("cookie.min.js", function () {
});
}
else if (url.search("lang.js") >= 1) {
loadScript("lang.js", function () {
});
}
/*
else if (url.search("js_3_5_1.js") >= 1) {
loadScript("js_3_5_1.js", function () {
});
}*/
else if (url.search("lang_cookie.js") >= 1) {
loadScript("lang_cookie.js", function () {
});
}
else if (message.search("slider") >= 1) {
loadScript("fabric_jquery.easyui.min_compressed_on_nvr.js", function () {
});
}
else if (message.search("myport") >= 1) {
loadScript("config.js", function () {
});
}
else if (message.search("cookie") >= 1) {
loadScript("cookie.min.js", function () {
});
}
else {
//location.reload();
var replaceUrl = 'http://' + window.location.hostname + ':' + GetUrlPort() + '/Aida/index.html';
//alert(replaceUrl);
window.location.replace(replaceUrl);
}
}
function GetUrlPort() {
var url_href = window.location.href;
var arr_url = url_href.split(":")[2].split("/")[0];
return arr_url;
}
if (window.history.replaceState) {
window.history.replaceState(null, null, window.location.href);
}
function reloadIcon(imgLink) {
console.log(imgLink);
console.log("Loading icon error : ");
var tabName = imgLink.href.slice(
imgLink.href.search("_") + 1,
imgLink.href.search(".png")
);
console.log(tabName.toUpperCase());
// console.log($("#TAB_" + tabName.toUpperCase() + "::before"));
$("#TAB_" + tabName.toUpperCase() + "::before").css('background-image', 'url(' + imgLink.href + ')');
}
</script>
<title>AI Engine</title>
<script>
window.console = window.console || function (t) { };
</script>
<script>
if (document.location.search.match(/type=embed/gi)) {
window.parent.postMessage("resize", "*");
}
</script>
<style>
body, html {
width: 90%;
height: 90%;
background: #FFFFFF;
font-family: "Arial";
font-size: 12px;
padding: 10px;
margin: 0 auto;
}
main {
width: 100%;
height: 100%;
margin: 0px auto;
background: #FFFFFF;
padding: 0px;
margin-left: 0px;
margin-right: 0px;
position: center;
}
input[name=css-tabs] {
display: none;
}
a {
color: #F29A77;
}
#tabs {
margin-left: 0px;
background: #5C5C5C;
height: 110px;
border-bottom: 5px solid #6c87d4;
box-shadow: 0 3px 5px rgba(0,0,0,0.2);
}
#tabs::before {
}
#tabs::after {
content: "";
display: block;
position: absolute;
z-index: 0;
height: 110px;
width: 102px;
/*background: #6c87d4;*/
-webkit-transition: -webkit-transform 400ms;
transition: -webkit-transform 400ms;
transition: transform 400ms;
transition: transform 400ms, -webkit-transform 400ms;
}
#tabs label {
position: relative;
font-family: "Arial";
z-index: 100;
display: block;
float: left;
font-size: 12px;
text-transform: uppercase;
text-align: center;
width: 100px;
height: 100%;
border-right: 1px dotted #575654;
cursor: pointer;
color: #FFFFFF;
}
#tabs label:first-child {
border-left: 1px dotted #575654;
}
#tabs label::before {
content: "";
display: block;
height: 60px;
width: 60px;
background-position: center;
background-repeat: no-repeat;
background-size: contain;
-webkit-filter: invert(0);
filter: invert(0);
margin: 10px auto;
}
/*
#TAB_LPR_MAPPING::before {
background-image: url('.images/icon_lpr_mapping.png');
}
#TAB_LPR_LIST_UPLOAD::before {
background-image: url('.images/icon_lpr_list_upload.png');
}
*/
#TAB_ANPR::before {
background-image: url('images/icon_anpr.png');
}
#TAB_LPR_LIST::before {
background-image: url('images/icon_lpr_list.png');
}
#TAB_ALARM::before {
background-image: url('images/icon_alarm.png');
}
#TAB_LICENSE::before {
background-image: url('images/icon_license.png');
}
#TAB_PTZ::before {
background-image: url('images/icon_ptz.png');
}
#TAB_SETTING::before {
background-image: url('images/icon_setting.png');
}
#TAB_OUTPUT::before {
background-image: url('images/icon_output.png');
}
#TAB_SPEED::before {
background-image: url('images/icon_stopwatch.png');
}
#TAB_RADAR::before {
background-image: url('images/icon_radar.png');
}
#TAB_TOF::before {
background-image: url('images/icon_tof.png');
}
#TAB_FACE::before {
background-image: url('images/icon_face.png');
}
#TAB_FACE_LIST::before {
background-image: url('images/icon_lpr_list.png');
}
/*
#RADIO_LPR_MAPPING:checked ~ #tabs #TAB_LPR_MAPPING::before,
#RADIO_LPR_LIST_UPLOAD:checked ~ #tabs #TAB_LPR_LIST_UPLOAD::before,
*/
/*
#RADIO_LPR_MAPPING:checked ~ #tabs::after {
-webkit-transform: translateX(202px);
transform: translateX(202px);
}
#RADIO_LPR_LIST_UPLOAD:checked ~ #tabs::after {
-webkit-transform: translateX(303px);
transform: translateX(303px);
}
*/
#RADIO_ANPR:checked ~ #tabs #TAB_ANPR::before,
#RADIO_LPR_LIST:checked ~ #tabs #TAB_LPR_LIST::before,
#RADIO_ALARM:checked ~ #tabs #TAB_ALARM::before,
#RADIO_LICENSE:checked ~ #tabs #TAB_LICENSE::before,
#RADIO_OUTPUT:checked ~ #tabs #TAB_OUTPUT::before,
#RADIO_RADAR:checked ~ #tabs #TAB_RADAR::before,
#RADIO_SPEED:checked ~ #tabs #TAB_SPEED::before,
#RADIO_PTZ:checked ~ #tabs #TAB_PTZ::before,
#RADIO_TOF:checked ~ #tabs #TAB_TOF::before,
#RADIO_FACE:checked ~ #content #CONTENT_FACE,
#RADIO_FACE_LIST:checked ~ #content #CONTENT_FACE_LIST,
#RADIO_SETTING:checked ~ #tabs #TAB_SETTING::before {
}
#RADIO_ANPR:checked ~ #tabs::after {
-webkit-transform: translateX(0);
transform: translateX(0);
}
#RADIO_LPR_LIST:checked ~ #tabs::after {
-webkit-transform: translateX(101px);
transform: translateX(101px);
}
#RADIO_ALARM:checked ~ #tabs::after {
-webkit-transform: translateX(202px);
transform: translateX(202px);
}
#RADIO_OUTPUT:checked ~ #tabs::after {
-webkit-transform: translateX(303px);
transform: translateX(303px);
}
#RADIO_SPEED:checked ~ #tabs::after {
-webkit-transform: translateX(404px);
transform: translateX(404px);
}
#RADIO_RADAR:checked ~ #tabs::after {
-webkit-transform: translateX(505px);
transform: translateX(505px);
}
#RADIO_TOF:checked ~ #tabs::after {
-webkit-transform: translateX(606px);
transform: translateX(606px);
}
#RADIO_PTZ:checked ~ #tabs::after {
-webkit-transform: translateX(707px);
transform: translateX(707px);
}
#RADIO_SETTING:checked ~ #tabs::after {
-webkit-transform: translateX(808px);
transform: translateX(808px);
}
#RADIO_LICENSE:checked ~ #tabs::after {
-webkit-transform: translateX(909px);
transform: translateX(909px);
}
#RADIO_FACE:checked ~ #tabs::after {
-webkit-transform: translateX(0px);
transform: translateX(0px);
}
#RADIO_FACE_LIST:checked ~ #tabs::after {
-webkit-transform: translateX(101px);
transform: translateX(101px);
}
#content {
position: center;
width: 100%;
height: 100%;
}
#content section {
position: center;
width: 100%;
height: 100%;
display: none;
}
/*#RADIO_LPR_MAPPING:checked ~ #content #CONTENT_LPR_MAPPING,
#RADIO_LPR_LIST_UPLOAD:checked ~ #content #CONTENT_LPR_LIST_UPLOAD,
*/
#RADIO_ANPR:checked ~ #content #CONTENT_ANPR,
#RADIO_LPR_LIST:checked ~ #content #CONTENT_LPR_LIST,
#RADIO_ALARM:checked ~ #content #CONTENT_ALARM,
#RADIO_LICENSE:checked ~ #content #CONTENT_LICENSE,
#RADIO_TOF:checked ~ #content #CONTENT_TOF,
#RADIO_OUTPUT:checked ~ #content #CONTENT_OUTPUT,
#RADIO_RADAR:checked ~ #content #CONTENT_RADAR,
#RADIO_SPEED:checked ~ #content #CONTENT_SPEED,
#RADIO_PTZ:checked ~ #content #CONTENT_PTZ,
#RADIO_FACE:checked ~ #content #CONTENT_FACE,
#RADIO_FACE_LIST:checked ~ #content #CONTENT_FACE_LIST,
#RADIO_SETTING:checked ~ #content #CONTENT_SETTING {
display: block;
}
#content #CONTENT_ANPR iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_LPR_LIST iframe {
width: 100%;
height: 100%;
}
/*
#content #CONTENT_LPR_MAPPING iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_LPR_LIST_UPLOAD iframe {
width: 100%;
height: 100%;
}*/
#content #CONTENT_ALARM iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_LICENSE iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_OUTPUT iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_RADAR iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_SPEED iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_SETTING iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_PTZ iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_TOF iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_FACE iframe {
width: 100%;
height: 100%;
}
#content #CONTENT_FACE_LIST iframe {
width: 100%;
height: 100%;
}
</style>
<!--<link href="css/style.css" rel="stylesheet" type="text/css" />-->
<link rel="icon" type="image/png" href="favicon.ico">
</head>
<body translate="no" onContextMenu="window.event.returnValue=false">
<main>
<input id="RADIO_ANPR" type="radio" name="css-tabs">
<input id="RADIO_LPR_LIST" type="radio" name="css-tabs">
<!--<input id="RADIO_LPR_MAPPING" type="radio" name="css-tabs" style="visibility:hidden;"> -->
<!--<input id="RADIO_LPR_LIST_UPLOAD" type="radio" name="css-tabs" style="visibility:hidden;"> -->
<input id="RADIO_FACE" type="radio" name="css-tabs">
<input id="RADIO_FACE_LIST" type="radio" name="css-tabs">
<input id="RADIO_ALARM" type="radio" name="css-tabs">
<input id="RADIO_OUTPUT" type="radio" name="css-tabs">
<input id="RADIO_SPEED" type="radio" name="css-tabs">
<input id="RADIO_RADAR" type="radio" name="css-tabs"> <!-- Ken 2022-09-20 -->
<input id="RADIO_TOF" type="radio" name="css-tabs">
<input id="RADIO_PTZ" type="radio" name="css-tabs">
<input id="RADIO_SETTING" type="radio" name="css-tabs">
<input id="RADIO_LICENSE" type="radio" name="css-tabs">
<div id="tabs">
<label id="TAB_ANPR" for="RADIO_ANPR"><nobr id="HTTP_TITLE01"></nobr></label>
<label id="TAB_LPR_LIST" for="RADIO_LPR_LIST"><nobr id="HTTP_TITLE02"></nobr></label>
<!--
<label id="TAB_LPR_MAPPING" for="RADIO_LPR_MAPPING"><nobr id="HTTP_TITLE03" style="visibility:hidden;"></nobr></label>
<label id="TAB_LPR_LIST_UPLOAD" for="RADIO_LPR_LIST_UPLOAD"><nobr id="HTTP_TITLE04" style="visibility:hidden;"></nobr></label>
-->
<label id="TAB_FACE" for="RADIO_FACE"><nobr id="HTTP_TITLE_FACE"></nobr></label>
<label id="TAB_FACE_LIST" for="RADIO_FACE_LIST"><nobr id="HTTP_TITLE_FACE_LIST"></nobr></label>
<label id="TAB_ALARM" for="RADIO_ALARM"><nobr id="HTTP_TITLE05"></nobr></label>
<label id="TAB_OUTPUT" for="RADIO_OUTPUT"><nobr id="HTTP_TITLE08"></nobr></label>
<label id="TAB_SPEED" for="RADIO_SPEED"><nobr id="IDC_STATIC_SPEED"></nobr></label>
<label id="TAB_RADAR" for="RADIO_RADAR"><nobr id="HTTP_TITLE11"></nobr></label> <!-- Ken 2022-09-20 -->
<label id="TAB_TOF" for="RADIO_TOF"><nobr id="HTTP_TITLE_TOF"></nobr></label><!-- 2022-12-08 Ken -->
<label id="TAB_PTZ" for="RADIO_PTZ"><nobr id="HTTP_TITLE09"></nobr></label> <!--style="visibility:hidden"-->
<label id="TAB_SETTING" for="RADIO_SETTING"><nobr id="HTTP_TITLE06"></nobr></label>
<label id="TAB_LICENSE" for="RADIO_LICENSE"><nobr id="HTTP_TITLE07"></nobr></label>
</div>
<div id="content">
<section id="CONTENT_ANPR">
<iframe id="IFRAME_ANPR" src=""
scrolling="yes"></iframe>
</section>
<!--about:blank-->
<section id="CONTENT_LPR_LIST">
<iframe id="IFRAME_LPR_LIST" src=""
scrolling="yes"></iframe>
</section>
<!--
<section id="CONTENT_LPR_MAPPING" style="visibility:hidden;">
<iframe id="IFRAME_LPR_MAPPING" src=" "
scrolling="yes"></iframe>
</section>
<section id="CONTENT_LPR_LIST_UPLOAD" style="visibility:hidden;">
<iframe id="IFRAME_LPR_LIST_UPLOAD" src=" "
scrolling="no"></iframe>
</section>
-->
<section id="CONTENT_FACE">
<iframe id="IFRAME_FACE" src=""
scrolling="yes"></iframe>
</section>
<section id="CONTENT_FACE_LIST">
<iframe id="IFRAME_FACE_LIST" src=""
scrolling="yes"></iframe>
</section>
<section id="CONTENT_ALARM">
<iframe id="IFRAME_ALARM" src=""
scrolling="yes"></iframe>
</section>
<section id="CONTENT_OUTPUT">
<iframe id="IFRAME_OUTPUT" src=""
scrolling="yes"></iframe>
</section>
<section id="CONTENT_SPEED">
<iframe id="IFRAME_SPEED" src=""
scrolling="no"></iframe>
</section>
<section id="CONTENT_PTZ">
<iframe id="IFRAME_PTZ" src=""
scrolling="yes"></iframe>
</section>
<section id="CONTENT_SETTING">
<iframe id="IFRAME_SETTING" src=""
scrolling="yes"></iframe>
</section>
<section id="CONTENT_LICENSE">
<iframe id="IFRAME_LICENSE" src=""
scrolling="no"></iframe>
</section>
<section id="CONTENT_RADAR">
<iframe id="IFRAME_RADAR" src=""
scrolling="yes"></iframe>
</section>
<section id="CONTENT_TOF">
<iframe id="IFRAME_TOF" src=""
scrolling="yes"></iframe>
</section>
</div>
</main>
<script>
/*
loadScript("jquery_3_2_1.min.js", function () {
loadScript("config.js", function () {
loadScript("js_3_5_1.js", function () {
loadScript("cookie.min.js", function () {
loadScript("lang.js", function () {
loadScript("jqueryAll_compressed.js", function () {
loadScript("lang_cookie.js", function () {
//alert("all load");
});
});
});
});
});
});
});*/
function loadScript(url, callback) {
var script = document.createElement("Script");
script.type = "text/javascript";
//IE 验证脚本是否下载完成
if (script.readyState) {
script.onreadystatechange = function () {
//readyState属性有5种取值
//uninitialized:初始状态
//loading:开始下载
//interactive:数据完成下载但尚不可用
//complete:数据已经准备就绪
//实际使用时,readyState的值并不像我们预想的那样有规律,实践发现使用readyState
//最靠谱的方式是同时检查以下2个状态,只要其中1个触发,就认为脚本下载完成。
if (script.readyState == "loaded" || script.readyState == "complete") {
//移除事件处理器,确保事件不会处理2次
script.onreadystatechange = null;
callback();
}
};
}
//其他浏览器
else {
script.onload = function () {
callback();
};
}
script.src = url;
//把新建的<Script>添加到<head>里比添加到<body>里更保险。
document.getElementsByTagName("head")[0].appendChild(script);
}
if (localStorage.getItem('current_page') == null)
localStorage.setItem('current_page', 'Null');
if (localStorage.getItem('alarm_success') == null)
localStorage.setItem('alarm_success', 'Null');
if (localStorage.getItem('anpr_index_success') == null)
localStorage.setItem('anpr_index_success', 'Null');
if (localStorage.getItem('setting_success') == null)
localStorage.setItem('setting_success', 'Null');
if (localStorage.getItem('license_success') == null)
localStorage.setItem('license_success', 'Null');
if (localStorage.getItem('output_success') == null)
localStorage.setItem('output_success', 'Null');
if (localStorage.getItem('lpr_list_success') == null)
localStorage.setItem('lpr_list_success', 'Null');
if (localStorage.getItem('ptz_success') == null)
localStorage.setItem('ptz_success', 'Null');
if (localStorage.getItem('speed_success') == null)
localStorage.setItem('speed_success', 'Null');
if (localStorage.getItem('radar_success') == null)
localStorage.setItem('radar_success', 'Null');
if (localStorage.getItem('speed_index_success') == null)
localStorage.setItem('speed_index_success', 'Null');
if (localStorage.getItem('face_success') == null)
localStorage.setItem('face_success', 'Null');
if (localStorage.getItem('face_list_success') == null)
localStorage.setItem('face_list_success', 'Null');
if (localStorage.getItem('current_state_hide_or_open_direction') == null)
localStorage.setItem('current_state_hide_or_open_direction', 0);
if (localStorage.getItem('current_state_hide_or_open_speed') == null)
localStorage.setItem('current_state_hide_or_open_speed', 0);
//UI Interface
func_get_lang_cookie();
//var scale = 'scale(1)';
//document.body.style.transform = scale;// General
//document.body.style.zoom = "100%";
func_getIndexData();
document.getElementById("HTTP_TITLE01").innerHTML = HTTP_TITLE01;
document.getElementById("HTTP_TITLE02").innerHTML = HTTP_TITLE02;
//document.getElementById("HTTP_TITLE03").innerHTML = HTTP_TITLE03;
//document.getElementById("HTTP_TITLE04").innerHTML = HTTP_TITLE04;
document.getElementById("HTTP_TITLE05").innerHTML = HTTP_TITLE05;
document.getElementById("HTTP_TITLE06").innerHTML = HTTP_TITLE06;
document.getElementById("HTTP_TITLE07").innerHTML = HTTP_TITLE07;
document.getElementById("HTTP_TITLE08").innerHTML = HTTP_TITLE08;
document.getElementById("HTTP_TITLE09").innerHTML = HTTP_TITLE09;
document.getElementById("HTTP_TITLE11").innerHTML = HTTP_TITLE11; // Ken 2022-09-21
document.getElementById("IDC_STATIC_SPEED").innerHTML = IDC_STATIC_SPEED;
document.getElementById("HTTP_TITLE_TOF").innerHTML = HTTP_TITLE_TOF;
document.getElementById("HTTP_TITLE_FACE").innerHTML = HTTP_TITLE_FACE;
document.getElementById("HTTP_TITLE_FACE_LIST").innerHTML = HTTP_TITLE_FACE_LIST;
//document.getElementById("TAB_SETTING").style.background = "#6c87d4";
var enable_PTZ = "No";
var check_key_false = 0;
var check_lpr = 0;
var check_ship = 0;
var check_radar = 0;
var check_tof = 0;
var enable_cloud = "No";
var g_enable_anpr = 0;
var check_face = 0;
/*
$("#label").click(function () {
//console.log($(this));
//$('#content2').html(o);
});*/
$(document).ready(function () {
//console.log($(this));
/*
$("#IFRAME_LPR_LIST").prop("style", "visibility: hidden;");
$("#IFRAME_SETTING").prop("style", "visibility: hidden;");
$("#IFRAME_OUTPUT").prop("style", "visibility: hidden;");
$("#IFRAME_SPEED").prop("style", "visibility: hidden;");
$("#IFRAME_LICENSE").prop("style", "visibility: hidden;");
$("#IFRAME_RADAR").prop("style", "visibility: hidden;");
$("#IFRAME_ANPR").prop("style", "visibility: hidden;");
$("#IFRAME_ALARM").prop("style", "visibility: hidden;");
$("#IFRAME_PTZ").prop("style", "visibility: hidden;");
$("#IFRAME_TOF").prop("style", "visibility: hidden;");*/
/*
if (localStorage.getItem('current_page') != null) {
if (localStorage.getItem('current_page') == 'anpr_index') {
$("#IFRAME_ANPR").prop("style", "visibility: visible;");
}
else if (localStorage.getItem('current_page') == 'alarm') {
$("#IFRAME_ALARM").prop("style", "visibility: visible;");
}
else if (localStorage.getItem('current_page') == 'ptz') {
$("#IFRAME_PTZ").prop("style", "visibility: visible;");
}
else if (localStorage.getItem('current_page') == 'speed_index') {
$("#IFRAME_SPEED").prop("style", "visibility: visible;");
}
else if (localStorage.getItem('current_page') == 'radar') {
$("#IFRAME_RADAR").prop("style", "visibility: visible;");
}
else if (localStorage.getItem('current_page') == 'tof') {
$("#IFRAME_TOF").prop("style", "visibility: visible;");
}
else if (localStorage.getItem('current_page') == 'license') {
$("#IFRAME_LICENSE").prop("style", "visibility: visible;");
}
else {
$("#IFRAME_SETTING").prop("style", "visibility: visible;");
$("#TAB_SETTING").click();
}
}
else {
$("#IFRAME_LICENSE").prop("style", "visibility: visible;");
//console.log("click TAB_LICENSE");
$("#TAB_LICENSE").click();
}
*/
});
func_showIndex_display_none();
func_getaboutinfo();
//func_getCloudData();
function func_showIndex_display_none() {
if (localStorage.getItem('CheckIsExistingSpeed') == 1) {
}
else {
$("#TAB_SPEED").prop("style", "display: none;");
$("#RADIO_SPEED").prop("style", "display: none;");
$("#IFRAME_SPEED").prop("style", "display: none;");
}
if (localStorage.getItem('check_lpr') == 1 && localStorage.getItem('check_key_false') == 0 && localStorage.getItem('check_face') == 0) {
}
else {
$("#TAB_LPR_LIST").prop("style", "display: none;");
$("#RADIO_LPR_LIST").prop("style", "display: none;");
$("#IFRAME_LPR_LIST").prop("style", "display: none;");
$("#TAB_ANPR").prop("style", "display: none;");
$("#RADIO_ANPR").prop("style", "display: none;");
$("#IFRAME_ANPR").prop("style", "display: none;");
}
if (localStorage.getItem('check_PTZ') == 1) {
}
else {
$("#TAB_PTZ").prop("style", "display: none;");
$("#RADIO_PTZ").prop("style", "display: none;");
$("#IFRAME_PTZ").prop("style", "display: none;");
}
// 2022-12-28 Merge issue
if (localStorage.getItem('check_radar') == 1) {
console.log("Loading radar.html");
}
else {
$("#TAB_RADAR").prop("style", "display: none;");
$("#RADIO_RADAR").prop("style", "display: none;");
$("#IFRAME_RADAR").prop("style", "display: none;");
}
if (localStorage.getItem('check_tof') == 1) {
}
else {
$("#TAB_TOF").prop("style", "display: none;");
$("#RADIO_TOF").prop("style", "display: none;");
$("#IFRAME_TOF").prop("style", "display: none;");
}
if (localStorage.getItem('check_face') == 1) {
console.log("Loading face_index.html");
}
else {
$("#TAB_FACE").prop("style", "display: none;");
$("#RADIO_FACE").prop("style", "display: none;");
$("#IFRAME_FACE").prop("style", "display: none;");
$("#TAB_FACE_LIST").prop("style", "display: none;");
$("#RADIO_FACE_LIST").prop("style", "display: none;");
$("#IFRAME_FACE_LIST").prop("style", "display: none;");
}
}
function func_getCloudData() {
$.ajax({
url: "/getconfig?ch=system_setting",
type: "GET",
async: false,
beforeSend: function (xmlHttp) {
xmlHttp.setRequestHeader("If-Modified-Since", "0");
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
//xmlHttp.setRequestHeader("Authorization", "Basic " + btoa("username:password"));
},
success: function (retdata) {
//var jsonbuf = JSON.parse('{ "name":"John", "age":30, "city":"New York"}');
var jsonbuf = JSON.parse(retdata);
enable_cloud = jsonbuf["enable_cloud"];
},
error: function (retdata) {
console.warn(retdata);
}
});
}
function clear_iframe() {
func_get_lang_cookie();
//func_get_check_if_illegal_id_or_pass();
///var data = new Object();
//$("#IFRAME_LPR_LIST").prop("src", "about:blank");
$("#IFRAME_LPR_LIST").prop("style", "visibility: hidden;");
//$("#IFRAME_LPR_MAPPING").prop("style","visibility: hidden;");
//$("#IFRAME_LPR_LIST_UPLOAD").prop("style","visibility: hidden;");
$("#IFRAME_SETTING").prop("style", "visibility: hidden;");
$("#IFRAME_OUTPUT").prop("style", "visibility: hidden;");
$("#IFRAME_RADAR").prop("style", "visibility: hidden;");
$("#IFRAME_SPEED").prop("style", "visibility: hidden;");
$("#IFRAME_LICENSE").prop("style", "visibility: hidden;");
$("#IFRAME_ANPR").prop("style", "visibility: hidden;");
$("#IFRAME_ALARM").prop("style", "visibility: hidden;");
$("#IFRAME_PTZ").prop("style", "visibility: hidden;");
$("#IFRAME_TOF").prop("style", "visibility: hidden;");
$("#IFRAME_FACE").prop("style", "visibility: hidden;");
$("#IFRAME_FACE_LIST").prop("style", "visibility: hidden;");
localStorage.setItem('lpr_list_success', 'Null');
}
// ##########################################################################################
// Ken 2022-09-20
$("#TAB_RADAR").click(function () {
console.log("check_radar: ", check_radar);
console.log("check_key_false: ", check_key_false);
if (!(check_radar == 0 || check_key_false == 1)) {
$("#IFRAME_RADAR").prop("src", "radar.html");
console.log("switch to RADAR TAB");
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#6c87d4";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'radar');
clear_iframe();
//$('#content').load("anpr_index.html");
//var iframe = document.getElementById('#IFRAME_ANPR');
//iframe.src = iframe.src;
//$("#IFRAME_ANPR").location.reload(true);
if (localStorage.getItem('radar_success') == 'Null') {
var iframe = document.getElementById("IFRAME_RADAR");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_RADAR").prop("src", "radar.html");
}
$("#IFRAME_RADAR").prop("style", "visibility: visible;");
}
});
// ##########################################################################################
//jQuery's .attr only uses the initial attributes. Use .prop instead of .attr to change the current DOM.
$("#TAB_ANPR").click(function () {
//console.log($(this));
if (!(check_lpr == 0 || check_key_false == 1)) {
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ANPR").style.background = "#6c87d4";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'anpr_index');
clear_iframe();
//$('#content').load("anpr_index.html");
//var iframe = document.getElementById('#IFRAME_ANPR');
//iframe.src = iframe.src;
//$("#IFRAME_ANPR").location.reload(true);
if (localStorage.getItem('anpr_index_success') == 'Null') {
var iframe = document.getElementById("IFRAME_ANPR");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_ANPR").prop("src", "anpr_index.html");
}
$("#IFRAME_ANPR").prop("style", "visibility: visible;");
}
});
$("#TAB_LPR_LIST").click(function () {
//console.log($(this));
if (!(check_lpr == 0 || check_key_false == 1)) {
document.getElementById("TAB_LPR_LIST").style.background = "#6c87d4";
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'lpr_list');
clear_iframe();
//$("#IFRAME_LPR_LIST").prop("src", "about:blank");
//$('#content').load("lpr_list.html");
//$("#IFRAME_LPR_LIST").location.reload(true);
//calcHeight();
if (localStorage.getItem('lpr_list_success') == 'Null') {
var iframe = document.getElementById("IFRAME_LPR_LIST");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_LPR_LIST").prop("src", "lpr_list.html");
}
$("#IFRAME_LPR_LIST").prop("style", "visibility: visible;");
}
});
/*
$("#TAB_LPR_MAPPING").click(function () {
console.log($(this));
clear_iframe();
//$('#content').load("lpr_mapping.html");
$("#IFRAME_LPR_MAPPING").prop("style","visibility: visible;");
$("#IFRAME_LPR_MAPPING").location.reload(true);
});
$("#TAB_LPR_LIST_UPLOAD").click(function () {
console.log($(this));
clear_iframe();
//$('#content').load("lpr_list_upload.html");
$("#IFRAME_LPR_LIST_UPLOAD").prop("style","visibility: visible;");
$("#IFRAME_LPR_LIST_UPLOAD").location.reload(true);
});*/
$("#TAB_ALARM").click(function () {
//console.log($(this));
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#6c87d4";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'alarm');
clear_iframe();
//$('#content').load("alarm.html");
if (localStorage.getItem('alarm_success') == 'Null') {
var iframe = document.getElementById("IFRAME_ALARM");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_ALARM").prop("src", "alarm.html");
}
$("#IFRAME_ALARM").prop("style", "visibility: visible;");
//$("#IFRAME_ALARM").location.reload(true);
});
$("#TAB_SETTING").click(function () {
//console.log($(this));
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#6c87d4";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'setting');
clear_iframe();
if (localStorage.getItem('setting_success') == 'Null') {
var iframe = document.getElementById("IFRAME_SETTING");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_SETTING").prop("src", "setting.html");
}
$("#IFRAME_SETTING").prop("style", "visibility: visible;");
//$("#IFRAME_SETTING").location.reload(true);
});
$("#TAB_OUTPUT").click(function () {
//console.log($(this));
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#6c87d4";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'output');
clear_iframe();
if (localStorage.getItem('output_success') == 'Null') {
var iframe = document.getElementById("IFRAME_OUTPUT");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_OUTPUT").prop("src", "output.html");
}
$("#IFRAME_OUTPUT").prop("style", "visibility: visible;");
//$("#IFRAME_OUTPUT").location.reload(true);
});
$("#TAB_SPEED").click(function () {
//console.log($(this));
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#6c87d4";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'speed_index');
clear_iframe();
if (localStorage.getItem('speed_index_success') == 'Null') {
var iframe = document.getElementById("IFRAME_SPEED");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_SPEED").prop("src", "speed_index.html");
}
$("#IFRAME_SPEED").prop("style", "visibility: visible;");
//$("#IFRAME_OUTPUT").location.reload(true);
});
$("#TAB_PTZ").click(function () {
if (enable_PTZ == "Yes") {
//console.log($(this));
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#6c87d4";
localStorage.setItem('current_page', 'ptz');
clear_iframe();
if (localStorage.getItem('ptz_success') == 'Null') {
var iframe = document.getElementById("IFRAME_PTZ");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_PTZ").prop("src", "ptz.html");
}
$("#IFRAME_PTZ").prop("style", "visibility: visible;");
//$("#IFRAME_PTZ").location.reload(true);
}
});
$("#TAB_LICENSE").click(function () {
//console.log($(this));
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#6c87d4";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'license');
clear_iframe();
//$('#content').load("license.html");
if (localStorage.getItem('license_success') == 'Null') {
var iframe = document.getElementById("IFRAME_LICENSE");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_LICENSE").prop("src", "license.html");
}
$("#IFRAME_LICENSE").prop("style", "visibility: visible;");
//$("#IFRAME_LICENSE").location.reload(true);
});
// 2022-12-08 Ken
$("#TAB_TOF").click(function () {
console.log("check_tof: ", check_tof);
console.log("check_key_false: ", check_key_false);
if (!(check_tof == 0 || check_key_false == 1)) {
console.log("switch to TOF TAB");
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#6c87d4";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'tof');
clear_iframe();
if (localStorage.getItem('license_success') == 'Null') {
var iframe = document.getElementById("IFRAME_TOF");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_TOF").prop("src", "tof.html");
}
$("#IFRAME_TOF").prop("style", "visibility: visible;");
}
});
$("#TAB_FACE").click(function () {
check_key_false = 0;
console.log("check_face: ", check_face);
console.log("check_key_false: ", check_key_false);
if (!(check_face == 0 || check_key_false == 1)) {
console.log("switch to FACE TAB");
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#6c87d4";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#5C5C5C";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'face');
clear_iframe();
if (localStorage.getItem('face_success') == 'Null')
{
var iframe = document.getElementById("IFRAME_FACE");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_FACE").prop("src", "face_index.html");
console.log("open face_index.html");
}
$("#IFRAME_FACE").prop("style", "visibility: visible;");
}
});
$("#TAB_FACE_LIST").click(function () {
check_key_false = 0;
console.log("check_face: ", check_face);
console.log("check_key_false: ", check_key_false);
if (!(check_face == 0 || check_key_false == 1)) {
console.log("switch to FACE LIST TAB");
if (g_enable_anpr)
document.getElementById("TAB_LPR_LIST").style.background = "#5C5C5C";
if (g_enable_anpr)
document.getElementById("TAB_ANPR").style.background = "#5C5C5C";
if (check_radar)
document.getElementById("TAB_RADAR").style.background = "#5C5C5C";
if (check_tof)
document.getElementById("TAB_TOF").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE").style.background = "#5C5C5C";
if (check_face)
document.getElementById("TAB_FACE_LIST").style.background = "#6c87d4";
document.getElementById("TAB_ALARM").style.background = "#5C5C5C";
document.getElementById("TAB_SETTING").style.background = "#5C5C5C";
document.getElementById("TAB_OUTPUT").style.background = "#5C5C5C";
document.getElementById("TAB_SPEED").style.background = "#5C5C5C";
document.getElementById("TAB_LICENSE").style.background = "#5C5C5C";
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.background = "#5C5C5C";
localStorage.setItem('current_page', 'face_list');
clear_iframe();
if (localStorage.getItem('face_list_success') == 'Null')
{
var iframe = document.getElementById("IFRAME_FACE");
var tmp_src = iframe.src;
iframe.src = '';
iframe.src = tmp_src;
$("#IFRAME_FACE_LIST").prop("src", "face_list.html");
}
$("#IFRAME_FACE_LIST").prop("style", "visibility: visible;");
}
});
/*
function calcHeight() {
var the_height = document.getElementById('IFRAME_LPRL_IST')
.contentWindow.document.body.scrollHeight + 15;
document.getElementById('IFRAME_LPRL_IST').height = the_height;
$("#IFRAME_LPRL_IST").css("height", the_height);
alert(the_height);
}
*/
function func_getaboutinfo() {
$.ajax({
url: "/getAidaInfo",
type: "GET",
async: true,
beforeSend: function (xmlHttp) {
xmlHttp.setRequestHeader("If-Modified-Since", "0");
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
//xmlHttp.setRequestHeader("Authorization", "Basic " + btoa("username:password"));
},
success: function (retdata) {
//var jsonbuf = JSON.parse('{ "name":"John", "age":30, "city":"New York"}');
var jsonbuf = JSON.parse(retdata);
//$('#license_status_2').val(jsonbuf["jstr1"]);
//$('#enable_anpr').prop("checked", true);
var license_status_1_temp = jsonbuf["license_status"];
var license_type_temp = jsonbuf["license_type"].substr(1, 255);
var index_mismatch = license_status_1_temp.indexOf("mismatch");
var index_expired = license_status_1_temp.indexOf("expired");
var index_error = license_type_temp.indexOf("Error");
var index_invalid = license_status_1_temp.indexOf("alid");
var index_empty = license_status_1_temp.length;
var index_third_party = license_type_temp.indexOf("arty");
var index_radar = license_type_temp.indexOf("adar");
var index_tof = license_type_temp.indexOf("ToF");
var index_face = license_type_temp.indexOf("Face");
localStorage.setItem("events_default_version", jsonbuf["events_default_version"]);
if (localStorage.getItem('current_state_hide_or_open_label') == null) {
if (localStorage.getItem("events_default_version") != null && localStorage.getItem("events_default_version") == "4") {
localStorage.setItem('current_state_hide_or_open_label', 0);
}
else {
localStorage.setItem('current_state_hide_or_open_label', 0);
}
}
if ((index_mismatch >= 2 || index_expired >= 2 || index_error >= 2 || index_empty <= 2 || index_invalid >= 2) && index_third_party <= 2 && index_radar <= 0 && index_tof < 0 && index_face <= 0) {
check_key_false = 1;
}
localStorage.setItem('check_key_false', check_key_false);
localStorage.setItem("unlock_key", jsonbuf["unlock_key"]);
localStorage.setItem("sys_id", jsonbuf["sys_id"]);
localStorage.setItem("dataset_ver", jsonbuf["dataset_ver"]);
//console.log(jsonbuf["dataset_ver"]);
localStorage.setItem("soft_ver", jsonbuf["soft_ver"]);
localStorage.setItem("license_type", jsonbuf["license_type"]);
localStorage.setItem("license_status", jsonbuf["license_status"]);
//console.log(jsonbuf["license_file_content"]);
localStorage.setItem("license_file_content", jsonbuf["license_file_content"]);
//console.info(retdata);
localStorage.setItem("v_series", jsonbuf["v_series"]);
localStorage.setItem("No_brand", jsonbuf["No_brand"]);
localStorage.setItem("sdk_version", jsonbuf["sdk_version"]);
if (jsonbuf["license_type"].search("CAP") >= 1 || jsonbuf["license_type"].search("EMASK") >= 1 || jsonbuf["license_type"].search("EFRONTBACK") >= 1 || jsonbuf["license_type"].search("EDENSITY") >= 1 || jsonbuf["license_type"].search("SPORTS") >= 1 || jsonbuf["license_type"].search("ESAFTY") >= 1) {//03AI
localStorage.setItem("03AI", "Yes");
}
else {
localStorage.setItem("03AI", "No");
}
if ((jsonbuf["license_type"].search("ESAFTY") >= 1 || jsonbuf["license_type"].search("ESPORTS") >= 1 || jsonbuf["license_type"].search("EGENDER") >= 1) && jsonbuf["license_type"].search("CAP") < 1 && jsonbuf["license_type"].search("EDENSITY") < 1 &&
jsonbuf["license_type"].search("FLOW") < 1 && jsonbuf["license_type"].search("FENCE") < 1 && jsonbuf["license_type"].search("EFRONTBACK") < 1) {
localStorage.setItem("g_IsHelm_without_car", "Yes");
}
else {
localStorage.setItem("g_IsHelm_without_car", "No");
}
if (jsonbuf["license_type"].search("hird") >= 1) {
localStorage.setItem("Third_party", "Yes");
}
else {
localStorage.setItem("Third_party", "No");
}
if (jsonbuf["license_type"].search("adar") >= 1) {
localStorage.setItem("Radar_recognition", "Yes");
check_radar = 1;
console.log("[index.html] modify check_radar value: ", check_radar);
}
else {
localStorage.setItem("Radar_recognition", "No");
}
// 2023-01-05 bypass ToF license
// localStorage.setItem("ToF_recognition", "Yes");
// check_tof = 1;
if (jsonbuf["license_type"].search("ToF") >= 1) {
localStorage.setItem("ToF_recognition", "Yes");
check_tof = 1;
}
else {
localStorage.setItem("ToF_recognition", "No");
}
if (jsonbuf["license_type"].search("Face") >= 1) {
localStorage.setItem("Face_recognition", "Yes");
check_face = 1;
console.log("[index.html] modify check_face value: ", check_face);
}
else {
localStorage.setItem("Face_recognition", "No");
console.log("[index.html] modify check_face value: ", check_face);
}
if (jsonbuf["license_type"].search("EPRODUCTION") >= 1) {
localStorage.setItem("barcode_qr", "Yes");
}
else {
localStorage.setItem("barcode_qr", "No");
}
if (jsonbuf["license_type"].search("LPR") >= 1 || jsonbuf["license_type"].search("EPRODUCTION") >= 1 || jsonbuf["license_type"].search("Face") >= 1) {//06AI
localStorage.setItem("06AI", "Yes");
check_lpr = 1;
g_enable_anpr = 1;
}
else {
localStorage.setItem("06AI", "No");
}
localStorage.setItem("model_camera", jsonbuf["model_camera"]);
if (jsonbuf["license_type"].search("ssel") >= 1) {//Vessel Recognition
check_ship = 1;
}
// ----------------------------------------------
// 06-06 bypass face licence
// check_face = 1;
// localStorage.setItem("Face_recognition", "Yes");
// ----------------------------------------------
localStorage.setItem('check_face', check_face);
localStorage.setItem('check_lpr', check_lpr);
localStorage.setItem('check_ship', check_ship);
localStorage.setItem('check_radar', check_radar);
localStorage.setItem('check_tof', check_tof);
localStorage.setItem('check_key_false', check_key_false);
localStorage.setItem('CheckIsExistingSpeed', jsonbuf["CheckIsExistingSpeed"]);
// console.log("[index.html] localStorage check_tof", localStorage.getItem('check_tof'));
// console.log("[index.html] check_key_false:", localStorage.getItem('check_key_false'));
if (check_key_false) {
$("#RADIO_SETTING").prop('checked', false);
$("#IFRAME_SETTING").prop("style", "visibility: hidden;");
$("#RADIO_LICENSE").prop('checked', true);
$("#IFRAME_LICENSE").prop("style", "visibility: visible;");
}
if ((check_tof == 0 && check_radar == 0 && check_lpr == 0 && check_face == 0) || check_key_false == 1) {
//document.getElementById("TAB_LPR_LIST").style.visibility = "hidden";
//document.getElementById("TAB_ANPR").style.visibility = "hidden";
g_enable_anpr = 0;
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else {
if (check_radar == 1) {
// console.log("[index.html] check_radar == 1");
toggle_specific_tabs(localStorage.getItem('current_page'));
} else if (check_tof == 1) {
// console.log("[index.html] check_tof == 1");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else {
toggle_specific_tabs(localStorage.getItem('current_page'));
}
}
/*
if (enable_PTZ == "Yes")
document.getElementById("TAB_PTZ").style.visibility = "visible";
else
document.getElementById("TAB_PTZ").style.visibility = "hidden";*/
func_showIndex_display_none();
},
error: function (retdata) {
setTimeout(func_getaboutinfo(),3000);
console.warn(retdata);
}
});
}
function func_getIndexData() {
$.ajax({
url: "/get_enable_ptz",
type: "GET",
async: true,
beforeSend: function (xmlHttp) {
xmlHttp.setRequestHeader("If-Modified-Since", "0");
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
//xmlHttp.setRequestHeader("Authorization", "Basic " + btoa("username:password"));
},
success: function (retdata) {
//var jsonbuf = JSON.parse('{ "name":"John", "age":30, "city":"New York"}');
var jsonbuf = JSON.parse(retdata);
//$('#license_status_2').val(jsonbuf["jstr1"]);
//$('#enable_anpr').prop("checked", true);
enable_PTZ = jsonbuf["enable_PTZ"];
if (enable_PTZ == "Yes") {
localStorage.setItem('check_PTZ', 1);
}
else {
localStorage.setItem('check_PTZ', 0);
}
},
error: function (retdata) {
setTimeout(func_getIndexData(),3000);
console.warn(retdata);
}
});
}
function func_get_check_if_illegal_id_or_pass() {
$.ajax({
url: "/get_check_if_illegal_id_or_pass",
type: "GET",
async: false,
beforeSend: function (xmlHttp) {
xmlHttp.setRequestHeader("If-Modified-Since", "0");
xmlHttp.setRequestHeader("Cache-Control", "no-cache");
//xmlHttp.setRequestHeader("Authorization", "Basic " + btoa("username:password"));
},
success: function (retdata) {
//var jsonbuf = JSON.parse(retdata);
//$('#license_status_2').val(jsonbuf["jstr1"]);
//$('#enable_anpr').prop("checked", true);
if (parseInt(retdata, 10) == 1) {
if (MESSAGE75 != null && MESSAGE75 != "") {
alert(MESSAGE75);
}
else {
alert("The special characters, ?, :, /, , @,and #, are not supported for the username and password. Please change the username and password at System -> User -> Edit User.");
}
}
},
error: function (retdata) {
console.warn(retdata);
}
});
}
function toggle_specific_tabs(page) {
var tabFGcolor = "#6c87d4";
var tabBGcolor = "#5C5C5C";
var tabDisableColor = "#D3D3D3";
document.getElementById("TAB_ANPR").style.background = tabBGcolor;
document.getElementById("TAB_LPR_LIST").style.background = tabBGcolor;
document.getElementById("TAB_ALARM").style.background = tabBGcolor;
document.getElementById("TAB_OUTPUT").style.background = tabBGcolor;
document.getElementById("TAB_SPEED").style.background = tabBGcolor;
document.getElementById("TAB_RADAR").style.background = tabBGcolor;
document.getElementById("TAB_TOF").style.background = tabBGcolor;
document.getElementById("TAB_PTZ").style.background = tabBGcolor;
document.getElementById("TAB_SETTING").style.background = tabBGcolor;
document.getElementById("TAB_LICENSE").style.background = tabBGcolor;
document.getElementById("TAB_FACE").style.background = tabBGcolor;
document.getElementById("TAB_FACE_LIST").style.background = tabBGcolor;
if (localStorage.getItem('check_lpr') == 1 && localStorage.getItem('check_face') == 0) {
// radio enable
if (page == 'anpr_index') {
document.getElementById("TAB_ANPR").style.background = tabFGcolor;
document.getElementById("TAB_LPR_LIST").style.background = tabBGcolor;
} else {
document.getElementById("TAB_ANPR").style.background = tabBGcolor;
document.getElementById("TAB_LPR_LIST").style.background = tabBGcolor;
}
}
else {
document.getElementById("TAB_ANPR").style.background = tabDisableColor;
document.getElementById("TAB_LPR_LIST").style.background = tabDisableColor;
}
if (localStorage.getItem('check_radar') == 1) {
// radio enable
document.getElementById("TAB_RADAR").style.background = tabBGcolor;
if (page == 'radar') {
document.getElementById("TAB_RADAR").style.background = tabFGcolor;
}
else {
document.getElementById("TAB_RADAR").style.background = tabBGcolor;
}
}
else {
// radio disable
document.getElementById("TAB_RADAR").style.background = tabDisableColor;
}
if (localStorage.getItem('check_tof') == 1) {
// radio enable
if (page == 'tof') {
document.getElementById("TAB_TOF").style.background = tabFGcolor;
} else {
document.getElementById("TAB_TOF").style.background = tabBGcolor;
}
}
else {
// radio disable
document.getElementById("TAB_TOF").style.background = tabDisableColor;
}
if (localStorage.getItem('check_face') == 1) {
// radio enable
if (page == 'face') {
document.getElementById("TAB_FACE").style.background = tabFGcolor;
document.getElementById("TAB_FACE_LIST").style.background = tabBGcolor;
} else {
document.getElementById("TAB_FACE").style.background = tabBGcolor;
document.getElementById("TAB_FACE_LIST").style.background = tabBGcolor;
}
}
else {
// radio disable
document.getElementById("TAB_FACE").style.background = tabDisableColor;
document.getElementById("TAB_FACE_LIST").style.background = tabDisableColor;
}
if (localStorage.getItem('check_PTZ') == 1) {
// radio enable
if (page == 'ptz') {
document.getElementById("TAB_PTZ").style.background = tabFGcolor;
} else {
document.getElementById("TAB_PTZ").style.background = tabBGcolor;
}
}
else {
document.getElementById("TAB_PTZ").style.background = tabDisableColor;
}
if (page == 'alarm') {
document.getElementById("TAB_ALARM").style.background = tabFGcolor;
}
else if (page == 'speed_index') {
document.getElementById("TAB_SPEED").style.background = tabFGcolor;
}
else if (page == 'setting') {
document.getElementById("TAB_SETTING").style.background = tabFGcolor;
}
else if (page == 'face') {
document.getElementById("TAB_FACE").style.background = tabFGcolor;
}
else if (page == 'license') {
document.getElementById("TAB_LICENSE").style.background = tabFGcolor;
}
}
</script>
<script defer="defer">
window.onload = function () {//do something
//if (localStorage.getItem('check_key_false')==0)
func_refresh_current_page();
func_showIndex();
}
function func_refresh_current_page() {
console.log(localStorage.getItem('current_page'));
if (localStorage.getItem('current_page') != null) {
if (localStorage.getItem('current_page') == 'anpr_index') {
if (localStorage.getItem('check_lpr') == 1) {
$("#RADIO_ANPR").prop('checked', true);
$("#RADIO_ANPR").prop("style", "visibility: visible;");
//$("#IFRAME_ANPR").prop("src", "anpr_index.html");
//$("#IFRAME_ANPR").prop("style", "visibility: visible;");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
}
else if (localStorage.getItem('current_page') == 'alarm') {
$("#RADIO_ALARM").prop('checked', true);
$("#RADIO_ALARM").prop("style", "visibility: visible;");
//$("#IFRAME_ALARM").prop("src", "alarm.html");
//$("#IFRAME_ALARM").prop("style", "visibility: visible;");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
// ##################################################################################
// Ken 2022-09-20
else if (localStorage.getItem('current_page') == 'radar') {
$("#RADIO_RADAR").prop('checked', true);
$("#RADIO_RADAR").prop("style", "visibility: visible;");
//$("#IFRAME_RADAR").prop("src", "radar.html");
// $("#IFRAME_RADAR").prop("style", "visibility: visible;");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
// ##################################################################################
else if (localStorage.getItem('current_page') == 'ptz') {
$("#RADIO_PTZ").prop('checked', true);
$("#RADIO_PTZ").prop("style", "visibility: visible;");
//$("#IFRAME_PTZ").prop("src", "ptz.html");
//$("#IFRAME_PTZ").prop("style", "visibility: visible;");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else if (localStorage.getItem('current_page') == 'speed_index') {
$("#RADIO_SPEED").prop('checked', true);
$("#RADIO_SPEED").prop("style", "visibility: visible;");
//$("#IFRAME_SPEED").prop("src", "speed_index.html");
//$("#IFRAME_SPEED").prop("style", "visibility: visible;");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else if (localStorage.getItem('current_page') == 'tof') {
$("#RADIO_TOF").prop('checked', true);
$("#RADIO_TOF").prop("style", "visibility: visible;");
//$("#IFRAME_TOF").prop("src", "tof.html");
//$("#IFRAME_TOF").prop("style", "visibility: visible;");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else if (localStorage.getItem('current_page') == 'face') {
$("#RADIO_FACE").prop('checked', true);
$("#RADIO_FACE").prop("style", "visibility: visible;");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else if (localStorage.getItem('current_page') == 'license') {
$("#RADIO_LICENSE").prop('checked', true);
$("#RADIO_LICENSE").prop("style", "visibility: visible;");
//$("#IFRAME_LICENSE").prop("src", "tof.html");
//$("#IFRAME_LICENSE").prop("style", "visibility: visible;");
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else {
if (localStorage.getItem('check_PTZ') != 1) {
$("#RADIO_SETTING").prop('checked', true);
$("#RADIO_SETTING").prop("style", "visibility: visible;");
//$("#IFRAME_SETTING").prop("src", "setting.html");
//$("#IFRAME_SETTING").prop("style", "visibility: visible;");
localStorage.setItem('current_page', 'setting');
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else {
$("#RADIO_PTZ").prop('checked', true);
$("#RADIO_PTZ").prop("style", "visibility: visible;");
//$("#IFRAME_PTZ").prop("src", "ptz.html");
//$("#IFRAME_PTZ").prop("style", "visibility: visible;");
localStorage.setItem('current_page', 'ptz');
toggle_specific_tabs(localStorage.getItem('current_page'));
}
}
}
else {
if (localStorage.getItem('check_PTZ') != 1) {
$("#RADIO_SETTING").prop('checked', true);
$("#RADIO_SETTING").prop("style", "visibility: visible;");
//$("#IFRAME_SETTING").prop("src", "setting.html");
//$("#IFRAME_SETTING").prop("style", "visibility: visible;");
localStorage.setItem('current_page', 'setting');
toggle_specific_tabs(localStorage.getItem('current_page'));
}
else {
$("#RADIO_PTZ").prop('checked', true);
$("#RADIO_PTZ").prop("style", "visibility: visible;");
//$("#IFRAME_PTZ").prop("src", "ptz.html");
//$("#IFRAME_PTZ").prop("style", "visibility: visible;");
localStorage.setItem('current_page', 'ptz');
toggle_specific_tabs(localStorage.getItem('current_page'));
}
}
}
function toggle_specific_tabs(page) {
var tabFGcolor = "#6c87d4";
var tabBGcolor = "#5C5C5C";
var tabDisableColor = "#D3D3D3";
document.getElementById("TAB_ANPR").style.background = tabBGcolor;
document.getElementById("TAB_LPR_LIST").style.background = tabBGcolor;
document.getElementById("TAB_ALARM").style.background = tabBGcolor;
document.getElementById("TAB_OUTPUT").style.background = tabBGcolor;
document.getElementById("TAB_SPEED").style.background = tabBGcolor;
document.getElementById("TAB_RADAR").style.background = tabBGcolor;
document.getElementById("TAB_TOF").style.background = tabBGcolor;
document.getElementById("TAB_PTZ").style.background = tabBGcolor;
document.getElementById("TAB_SETTING").style.background = tabBGcolor;
document.getElementById("TAB_LICENSE").style.background = tabBGcolor;
document.getElementById("TAB_FACE").style.background = tabBGcolor;
document.getElementById("TAB_FACE_LIST").style.background = tabBGcolor;
if (localStorage.getItem('check_lpr') == 1 && localStorage.getItem('check_face') == 0) {
// radio enable
if (page == 'anpr_index') {
document.getElementById("TAB_ANPR").style.background = tabFGcolor;
document.getElementById("TAB_LPR_LIST").style.background = tabBGcolor;
} else {
document.getElementById("TAB_ANPR").style.background = tabBGcolor;
document.getElementById("TAB_LPR_LIST").style.background = tabBGcolor;
}
}
else {
document.getElementById("TAB_ANPR").style.background = tabDisableColor;
document.getElementById("TAB_LPR_LIST").style.background = tabDisableColor;
}
if (localStorage.getItem('check_radar') == 1) {
// radio enable
document.getElementById("TAB_RADAR").style.background = tabBGcolor;
if (page == 'radar') {
document.getElementById("TAB_RADAR").style.background = tabFGcolor;
}
else {
document.getElementById("TAB_RADAR").style.background = tabBGcolor;
}
}
else {
// radio disable
document.getElementById("TAB_RADAR").style.background = tabDisableColor;
}
if (localStorage.getItem('check_tof') == 1) {
// radio enable
if (page == 'tof') {
document.getElementById("TAB_TOF").style.background = tabFGcolor;
} else {
document.getElementById("TAB_TOF").style.background = tabBGcolor;
}
}
else {
// radio disable
document.getElementById("TAB_TOF").style.background = tabDisableColor;
}
if (localStorage.getItem('check_face') == 1) {
// radio enable
if (page == 'face') {
document.getElementById("TAB_FACE").style.background = tabFGcolor;
document.getElementById("TAB_FACE_LIST").style.background = tabBGcolor;
} else {
document.getElementById("TAB_FACE").style.background = tabBGcolor;
document.getElementById("TAB_FACE_LIST").style.background = tabBGcolor;
}
}
else {
// radio disable
document.getElementById("TAB_FACE").style.background = tabDisableColor;
document.getElementById("TAB_FACE_LIST").style.background = tabDisableColor;
}
if (localStorage.getItem('check_PTZ') == 1) {
// radio enable
if (page == 'ptz') {
document.getElementById("TAB_PTZ").style.background = tabFGcolor;
} else {
document.getElementById("TAB_PTZ").style.background = tabBGcolor;
}
}
else {
document.getElementById("TAB_PTZ").style.background = tabDisableColor;
}
if (page == 'alarm') {
document.getElementById("TAB_ALARM").style.background = tabFGcolor;
}
else if (page == 'speed_index') {
document.getElementById("TAB_SPEED").style.background = tabFGcolor;
}
else if (page == 'setting') {
document.getElementById("TAB_SETTING").style.background = tabFGcolor;
}
else if (page == 'face') {
document.getElementById("TAB_FACE").style.background = tabFGcolor;
}
else if (page == 'license') {
document.getElementById("TAB_LICENSE").style.background = tabFGcolor;
}
}
function func_showIndex() {
//$("#IFRAME_LPR_MAPPING").prop("src","lpr_mapping.htm");
//$("#IFRAME_LPR_LIST_UPLOAD").prop("src","lpr_list_upload.htm");
$("#IFRAME_SETTING").prop("src", "setting.html");
$("#IFRAME_OUTPUT").prop("src", "output.html");
if (localStorage.getItem('CheckIsExistingSpeed') == 1) {
$("#IFRAME_SPEED").prop("src", "speed_index.html");
}
else {
$("#TAB_SPEED").prop("style", "display: none;");
$("#RADIO_SPEED").prop("style", "display: none;");
$("#IFRAME_SPEED").prop("style", "display: none;");
}
$("#IFRAME_LICENSE").prop("src", "license.html");
$("#IFRAME_ALARM").prop("src", "alarm.html");
if (localStorage.getItem('check_lpr') == 1 && localStorage.getItem('check_key_false') == 0 && localStorage.getItem('check_face') == 0) {
$("#IFRAME_ANPR").prop("src", "anpr_index.html");
$("#IFRAME_LPR_LIST").prop("src", "lpr_list.html");
}
else {
$("#TAB_LPR_LIST").prop("style", "display: none;");
$("#RADIO_LPR_LIST").prop("style", "display: none;");
$("#IFRAME_LPR_LIST").prop("style", "display: none;");
$("#TAB_ANPR").prop("style", "display: none;");
$("#RADIO_ANPR").prop("style", "display: none;");
$("#IFRAME_ANPR").prop("style", "display: none;");
}
if (localStorage.getItem('check_PTZ') == 1) {
$("#IFRAME_PTZ").prop("src", "ptz.html");
}
else {
$("#TAB_PTZ").prop("style", "display: none;");
$("#RADIO_PTZ").prop("style", "display: none;");
$("#IFRAME_PTZ").prop("style", "display: none;");
}
// 2022-12-28 Merge issue
if (localStorage.getItem('check_radar') == 1) {
console.log("Loading radar.html");
$("#IFRAME_RADAR").prop("src", "radar.html");
}
else {
$("#TAB_RADAR").prop("style", "display: none;");
$("#RADIO_RADAR").prop("style", "display: none;");
$("#IFRAME_RADAR").prop("style", "display: none;");
}
if (localStorage.getItem('check_tof') == 1) {
$("#IFRAME_TOF").prop("src", "tof.html");
}
else {
$("#TAB_TOF").prop("style", "display: none;");
$("#RADIO_TOF").prop("style", "display: none;");
$("#IFRAME_TOF").prop("style", "display: none;");
}
if (localStorage.getItem('check_face') == 1) {
$("#IFRAME_FACE").prop("src", "face_index.html");
$("#IFRAME_FACE_LIST").prop("src", "face_list.html");
}
else {
$("#TAB_FACE").prop("style", "display: none;");
$("#RADIO_FACE").prop("style", "display: none;");
$("#IFRAME_FACE").prop("style", "display: none;");
$("#TAB_FACE_LIST").prop("style", "display: none;");
$("#RADIO_FACE_LIST").prop("style", "display: none;");
$("#IFRAME_FACE_LIST").prop("style", "display: none;");
}
//console.log("func_showCloud:" + enable_cloud);
if (enable_cloud == "Yes") {
//$("#IFRAME_SETTING").prop("scrolling", "yes");
/*
$("#RADIO_SPEED").prop('checked', true);
$("#RADIO_SPEED").prop("style", "visibility: visible;");
$("#IFRAME_SPEED").prop("src", "speed.html");
$("#IFRAME_SPEED").prop("style", "visibility: visible;");
document.getElementById("TAB_SPEED").style.visibility = "visible";*/
}
else {
// $("#IFRAME_SETTING").prop("scrolling", "No");
/*
$("#RADIO_SPEED").prop('checked', false);
$("#RADIO_SPEED").prop("style", "visibility: hidden;");
$("#IFRAME_SPEED").prop("src", "");
$("#IFRAME_SPEED").prop("style", "visibility: hidden;");
document.getElementById("TAB_SPEED").style.visibility = "hidden";*/
}
}
</script>
</body>
</html>