12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922 |
- /*****************************************************************************
- * AJAX 관련 함수
- *****************************************************************************/
- function ajaxGet(pageURL)
- {
- var page = null;
- $.ajax({
- url: pageURL,
- type: 'GET',
- dataType: 'text',
- timeout: 1000,
- async: false,
- // error: function(){
- // alert('Error: Loading Page(' + pageURL + ')');
- // },
- success: function(data) {
- page = data;
- }
- });
- return page;
- }
- function ajaxGetAsync(pageURL)
- {
- var page = null;
- $.ajax({
- url: pageURL,
- type: 'GET',
- dataType: 'text',
- timeout: 100,
- async: true,
- // error: function(){
- // alert('Error: Loading Page(' + pageURL + ')');
- // },
- success: function(data) {
- page = data;
- }
- });
- return page;
- }
- function ajaxGetAsyncCb(pageURL, params, dcb, cb)
- {
- var page = null;
- $.ajax({
- url: pageURL,
- type: 'GET',
- dataType: 'text',
- timeout: 1000,
- async: true,
- // error: function(){
- // alert('Error: Loading Page(' + pageURL + ')');
- // },
- success: function(data) {
- if(data) {
- if (cb != undefined) {
- if (dcb != undefined) {
- dcb(pageURL, params, data, cb);
- }
- else {
- cb(data);
- }
- }
- }
- }
- });
- }
- function ajaxPost(toURL, toData)
- {
- var result = false;
- $.ajax({
- url: toURL,
- type: 'POST',
- dataType: 'text',
- timeout: 1000,
- // async: false,
- data: toData,
- // error: function(){
- // alert('Error: Post failed.(' + pageURL + ')');
- // },
- success: function(data) {
- result = true;
- }
- });
- return result;
- }
- function ajaxPostFile(toURL, toData)
- {
- var result = false;
- $.ajax({
- url: toURL,
- type: 'POST',
- contentType: false,
- processData: false,
- data: toData,
- timeout: 5000,
- success: function(data) {
- result = true;
- },
- error: function() {
- }
- });
- return result;
- }
- /*****************************************************************************
- * Setup 관련 함수
- *****************************************************************************/
- function readAuthInfo()
- {
- var url = "";
- var data;
- var setupArray = new Array();
- url = "/httpapx/ReadParam?action=getauth";
- data = ajaxGet(url);
- if(data) {
- var lines = data.split("\n");
- for(i = 0; i < lines.length; i++) {
- var token = lines[i].split("=");
- if(token.length != 2)
- break;
- setupArray[token[0]] = token[1];
- //console.log(token[0] + " = " + token[1]);
- }
- }
- return setupArray;
- }
- function readSetupByPage(pageName)
- {
- var url = "";
- var data;
- var setupArray = new Array();
- url = "/httpapx/ReadParam?action=readpage&page=" + pageName;
- data = ajaxGet(url);
- if(data) {
- var lines = data.split("\n");
- for(i = 0; i < lines.length; i++) {
- var token = lines[i].split("=");
- if(token.length == 2){
- setupArray[token[0]] = token[1];
- }
- else if(token.length == 1){
- setupArray[token[0]] = "";
- }
- else{
- var n = lines[i].search("=");
- var res = lines[i].substring(n+1);
- setupArray[token[0]] = res;
- }
- }
- }
- return setupArray;
- }
- function readSetupByKey(key)
- {
- var url = "";
- var data;
- var result = "";
- url ="/httpapx/ReadParam?action=readparam&" + key + "=0";
- data = ajaxGet(url);
- if(data) {
- var lines = data.split("\n");
- var token = lines[0].split("=");
- if(token.length != 2)
- return result;
- if(token[0] == key)
- result = token[1];
- }
- return result;
- }
- function readSetupByKey2(key) // Multi Line
- {
- var url = "";
- var data;
- var result = "";
- url = "/httpapx/ReadParam?action=readparam&" + key + "=0";
- data = ajaxGet(url);
- if(data) {
- var token = data.split("=");
- if (token.length != 2)
- return result;
- if (token[0] == key)
- result = token[1];
- }
- return result;
- }
- function __dcb_readSetupByKeyAsync(url, key, data, cb)
- {
- var result = "";
- if (data) {
- var lines = data.split("\n");
- var token = lines[0].split("=");
- if(token.length != 2)
- cb(result);
- if(token[0] == key)
- result = token[1];
- }
- cb(result);
- }
- function readSetupByKeyAsync(key, cb)
- {
- var url = "";
- url ="/httpapx/ReadParam?action=readparam&" + key + "=0";
- ajaxGetAsyncCb(url, key, __dcb_readSetupByKeyAsync, cb);
- }
- function readSetupByKeyArray(keyArray)
- {
- //alert("readSetupByKeyArray is not implemented");
- }
- function readDefaultByKey(key)
- {
- var url = "";
- var data;
- var result = "";
- url ="/httpapx/ReadParam?action=readdefault&" + key + "=0";
- data = ajaxGet(url);
- if(data) {
- var lines = data.split("\n");
- var token = lines[0].split("=");
- if(token.length != 2)
- return result;
- if(token[0] == key)
- result = token[1];
- }
- return result;
- }
- function writeSetup(params)
- {
- var url;
- url = "/httpapx/WriteParam?action=writeparam&" + params;
- return ajaxGet(url);
- }
- function writeSetupAsync(params)
- {
- var url;
- url = "/httpapx/WriteParam?action=writeparam&" + params;
-
- return ajaxGetAsync(url);
- }
- function writeState(params)
- {
- var url;
- url = "/httpapx/SetState?action=setoutput&" + params;
- return ajaxGet(url);
- }
- function writeStateAsync(params)
- {
- var url;
- url = "/httpapx/SetState?action=setoutput&" + params;
- return ajaxGetAsync(url);
- }
- /******************************************************************************
- * State 관련 함수
- *****************************************************************************/
- function _readState(params)
- {
- var url = "";
- var data;
- var stateArray = new Array();
- url = "/httpapx/GetState?" + params;
- data = ajaxGet(url);
- if(data) {
- var lines = data.split("\n");
- for(i = 0; i < lines.length; i++) {
- var token = lines[i].split("=");
- if(token.length != 2)
- break;
- stateArray[token[0]] = token[1];
- }
- }
- return stateArray;
- }
- function __dcb_readStateAsync(url, params, data, cb)
- {
- var stateArray = new Array();
- if(data) {
- var lines = data.split("\n");
- for(i = 0; i < lines.length; i++) {
- var token = lines[i].split("=");
- if(token.length != 2)
- break;
- stateArray[token[0]] = token[1];
- }
- }
- cb(stateArray);
- }
- function _readStateAsync(params, cb)
- {
- var url = "";
- url = "/httpapx/GetState?" + params;
- ajaxGetAsyncCb(url, params, __dcb_readStateAsync, cb);
- }
- function _readData(params)
- {
- var url = "";
- var data;
- url = "/httpapx/GetState?" + params;
- return ajaxGet(url);
- }
- function readRateState()
- {
- var result;
- result = _readState(
- "action=getrate&GRS_VENCFRAME1=0&GRS_VENCBITRATE1=0&GRS_VENCFRAME2=0&GRS_VENCBITRATE2=0&GRS_VENCFRAME3=0&GRS_VENCBITRATE3=0&GRS_VENCFRAME4=0&GRS_VENCBITRATE4=0&GRS_AENCBITRATE1=0&GRS_ADECBITRATE1=0&GRS_ADECALGORITHM1=0&GRS_ADECSAMPLERATE1=0");
- return result;
- }
- function readRateState_SCoding()
- {
- var result;
- result = _readState(
- "action=getrate&GRS_VENCFRAME1=0&GRS_VENCBITRATE1=0&GRS_VENCFRAME2=0&GRS_VENCBITRATE2=0&GRS_VENCFRAME3=0&GRS_VENCBITRATE3=0&GRS_VENCFRAME4=0&GRS_VENCBITRATE4=0&GRS_AENCBITRATE1=0&GRS_ADECBITRATE1=0&GRS_ADECALGORITHM1=0&GRS_ADECSAMPLERATE1=0&GRS_VENCIDR1=0&GRS_VENCPIDR1=0&GRS_VENCPBASE1=0&GRS_VENCIDR2=0&GRS_VENCPIDR2=0&GRS_VENCPBASE2=0&GRS_VENCIDR3=0&GRS_VENCPIDR3=0&GRS_VENCPBASE3=0&GRS_VENCIDR4=0&GRS_VENCPIDR4=0&GRS_VENCPBASE4=0");
- return result;
- }
- function readInputState()
- {
- var result;
- result = _readState(
- "action=getinput&GIS_SENSOR1=0&GIS_SENSOR2=0&GIS_SENSOR3=0&GIS_SENSOR4=0&GIS_SENSOR5=0&GIS_MOTION1=0&GIS_MOTION2=0&GIS_MOTION3=0&GIS_MOTION4=0&GIS_VIDEOLOSS1=0&GIS_VIDEOLOSS2=0&GIS_VIDEOLOSS3=0&GIS_VIDEOLOSS4=0&GIS_ALARM1=0&GIS_ALARM2=0&GIS_ALARM3=0&GIS_ALARM4=0&GIS_RECORD1=0&GIS_AIRWIPER=0");
- return result;
- }
- function readInputStateAsync(cb)
- {
- var result;
- result = _readStateAsync(
- "action=getinput&GIS_SENSOR1=0&GIS_SENSOR2=0&GIS_SENSOR3=0&GIS_SENSOR4=0&GIS_SENSOR5=0&GIS_MOTION1=0&GIS_MOTION2=0&GIS_MOTION3=0&GIS_MOTION4=0&GIS_VIDEOLOSS1=0&GIS_VIDEOLOSS2=0&GIS_VIDEOLOSS3=0&GIS_VIDEOLOSS4=0&GIS_ALARM1=0&GIS_ALARM2=0&GIS_ALARM3=0&GIS_ALARM4=0&GIS_RECORD1=0&GIS_AIRWIPER=0", cb);
- return;
- }
- function readRateStateDec()
- {
- var result;
- result = _readState(
- "action=getrate&GRS_VDECALGORITHM1=0&GRS_VDECFRAME1=0&GRS_VDECBITRATE1=0&GRS_VDECALGORITHM2=0&GRS_VDECFRAME2=0&GRS_VDECBITRATE2=0&GRS_VDECALGORITHM3=0&GRS_VDECFRAME3=0&GRS_VDECBITRATE3=0&GRS_VDECALGORITHM4=0&GRS_VDECFRAME4=0&GRS_VDECBITRATE4=0&GRS_AENCBITRATE1=0&GRS_ADECBITRATE1=0&GRS_ADECALGORITHM1=0&GRS_ADECSAMPLERATE1=0");
- return result;
- }
- function readRateState410()
- {
- var result;
- result = _readState(
- "action=getrate&GRS_VENCFRAME1=0&GRS_VENCBITRATE1=0&GRS_VENCFRAME2=0&GRS_VENCBITRATE2=0&GRS_VENCFRAME3=0&GRS_VENCBITRATE3=0&GRS_VENCFRAME4=0&GRS_VENCBITRATE4=0&GRS_VENCFRAME5=0&GRS_VENCBITRATE5=0&GRS_AENCBITRATE1=0&GRS_ADECBITRATE1=0&GRS_ADECALGORITHM1=0&GRS_ADECSAMPLERATE1=0");
- return result;
- }
- function readRateStateA400()
- {
- var result;
- result = _readState(
- "action=getrate&GRS_VENCFRAME1=0&GRS_VENCBITRATE1=0&GRS_VENCFRAME2=0&GRS_VENCBITRATE2=0&GRS_VENCFRAME3=0&GRS_VENCBITRATE3=0&GRS_VENCFRAME4=0&GRS_VENCBITRATE4=0&GRS_VENCFRAME5=0&GRS_VENCBITRATE5=0&GRS_VENCFRAME6=0&GRS_VENCBITRATE6=0&GRS_VENCFRAME7=0&GRS_VENCBITRATE7=0&GRS_VENCFRAME8=0&GRS_VENCBITRATE8=0&GRS_VENCFRAME9=0&GRS_VENCBITRATE9=0&GRS_VENCFRAME10=0&GRS_VENCBITRATE10=0");
- return result;
- }
- function readSerialState()
- {
- var result;
- result = _readState(
- "action=getrate&GRS_STXRATE1=0&GRS_SRXRATE1=0&GRS_STXRATE2=0&GRS_SRXRATE2=0");
- return result;
- }
- function readSystemState()
- {
- var result;
- result = _readState("action=getinfo&GIN_READ=0");
- return result;
- }
- function readSystemConn()
- {
- var result;
- result = _readData("action=getinfo&GIN_CONN=0");
- return result;
- }
- function readSystemLog()
- {
- var result;
- result = _readData("action=getlog&GLO_READ=0");
- return result;
- }
- function readSystemNewLog(params)
- {
- var result;
- var url = "";
- url = "action=getnewlog&GNL_READ=" + params;
- result = _readData(url);
- return result;
- }
- function runGeneralCommand(str)
- {
- var cmd = "action=command&Command=" + str;
- var result;
- result = _readData(cmd);
- return result;
- }
- function stopGeneralCommand(str)
- {
- var cmd = "action=command&Stop=" + str;
- var result;
- result = _readData(cmd);
- return result;
- }
- /******************************************************************************
- * Style 관련 함수
- *****************************************************************************/
- function initLoading()
- {
- $("#PopupMessage").html("<img src=\"img/loading.gif\"></img>").hide();
- }
- function showLoading()
- {
- var popup = $("#PopupMessage");
- width = popup.width();
- height = popup.height();
-
- popup.css("position","absolute")
- .css("z-index","10001")
- .css("top","30%")
- .css("left","50%")
- .css("margin-left", -1 * width / 2)
- .css("margin-top", -1 * height / 2);
- popup.show();
- }
- function hideLoadingDelay(delay)
- {
- setTimeout(function() { $("#PopupMessage").hide(); }, delay);
- }
- function beautifyButtons()
- {
- // change design
- $(":input[type=radio]").button({ icons: { primary: "ui-icon-blank" } });
- $(":input[type=checkbox]").button({ icons: { primary: "ui-icon-blank" } });
- $("label.ui-button" ).css("height", "22px").css("font-size", "12px").css("padding-top", ".2em");
- $("a.ui-slider-handle").button({ icons: { primary: "ui-icon-blank" } , text: false });
- // apply default button image
- $(":input[type=radio]").button({ icons: { primary: "ui-icon-blank" } });
- $(":input[type=radio]:checked").button({ icons: { primary: "ui-icon-radio-on" } });
- $(":input[type=checkbox]").button({ icons: { primary: "ui-icon-blank" } });
- $(":input[type=checkbox]:checked").button({ icons: { primary: "ui-icon-check" } });
- // install change event for icon change
- $( ":input[type=radio]" ).change(function(event) {
- id = $(this).attr("id");
- name = $(this).attr("name");
- $(":input[name=" + name + "]").button({ icons: { primary: "ui-icon-blank" } });
- $("#" + id).button({ icons: { primary: "ui-icon-radio-on" } });
- });
-
- $( ":input[type=checkbox]" ).change(function(event) {
- id = $(this).attr("id");
- if($("#" + id).prop("checked") == true){
- $("#" + id).button({ icons: { primary: "ui-icon-check" } });
- }
- else{
- $("#" + id).button({ icons: { primary: "ui-icon-blank" } });
- }
- initLanguage();
- });
-
- }
- function beautifyRadioButtonsInGroup(groupId)
- {
- // change design
- $(groupId + " :radio").button({ icons: { primary: "ui-icon-blank" } });
- $("label.ui-button" ).css("height", "22px").css("font-size", "12px").css("padding-top", ".2em");
- // apply default button image
- $(groupId + " :radio").button({ icons: { primary: "ui-icon-blank" } });
- $(groupId + " :radio:checked").button({ icons: { primary: "ui-icon-radio-on" } });
- // install change event for icon change
- $( groupId + " :radio" ).change(function(event) {
- id = $(this).attr("id");
- name = $(this).attr("name");
- $(groupId + " :input[name=" + name + "]").button({ icons: { primary: "ui-icon-blank" } });
- $("#" + id).button({ icons: { primary: "ui-icon-radio-on" } });
- });
- }
- function beautifyButtonsForRadio()
- {
- // change design
- $(":input[type=radio]").button({ icons: { primary: "ui-icon-blank" } });
- $("label.ui-button" ).css("height", "22px").css("font-size", "12px").css("padding-top", ".2em");
- // apply default button image
- $(":input[type=radio]").button({ icons: { primary: "ui-icon-blank" } });
- $(":input[type=radio]:checked").button({ icons: { primary: "ui-icon-radio-on" } });
- // install change event for icon change
- $( ":input[type=radio]" ).change(function(event) {
- id = $(this).attr("id");
- name = $(this).attr("name");
- $(":input[name=" + name + "]").button({ icons: { primary: "ui-icon-blank" } });
- $("#" + id).button({ icons: { primary: "ui-icon-radio-on" } });
- });
-
- }
- function beautify() {
- $("select").customSelect();
- }
- function disableButton(obj)
- {
- obj.attr("disabled", "disabled");
- }
- function enableButtonDelay(obj, delay)
- {
- setTimeout(function() { obj.removeAttr("disabled"); }, delay);
- }
- const SUPPORT_MULTI_DEVICE_NONE_TYPE = 0 ;
- const SUPPORT_MULTI_DEVICE_DETECTION_CAM_TYPE = 1 ;
- const SUPPORT_MULTI_DEVICE_PTZ_TYPE = 2 ;
- var support_multi_device_type = SUPPORT_MULTI_DEVICE_NONE_TYPE ;
- var support_multi_device_ipaddress = "";
- /*****************************************************************************/
- function loadSetupTemplate(product)
- {
- url = "/product/" + product + "/template.html";
- contents = ajaxGet(url);
- $("body").html(contents);
-
- var setup = readSetupByPage("setuptemplate");
- var mode = setup["SYS_MODE"];
- var ptztype = setup["SYS_PTZ_TYPE"];
- var boardid = setup["SYS_BOARDID"];
- var moduletype = setup["SYS_MODULE_TYPE"];
- var moduledetail = setup["SYS_MODULE_DETAIL"];
- var ft_ir4 = setup["SYS_FTCAMERA_IR4"];
- var support_location_osd = (((boardid & 0xF000) == 0xB000) || ((boardid & 0xF000) == 0x9000) || ((boardid & 0xF00F) == 0xA004) || ((boardid & 0xF000) == 0xE000)) && (7 == ptztype) ; // (3519A || 3519 || CV2) && TRUEN ZOOM MODULE
-
- if( ((boardid & 0xF000) == 0x9000 || (boardid & 0xF000) == 0xA000 || (boardid & 0xF000) == 0xB000 ) && ( (4 == ft_ir4) ) ) {
- // if( ((boardid & 0xF000) == 0x9000 || (boardid & 0xF000) == 0xA000 || (boardid & 0xF000) == 0xB000 ) && ( (4 == ft_ir4) || (3 == ft_ir4) || (2 == ft_ir4) ) ) {
- support_multi_device_type = SUPPORT_MULTI_DEVICE_DETECTION_CAM_TYPE ;
- }
- else if(0xB001 == boardid) { // A400
- support_multi_device_type = SUPPORT_MULTI_DEVICE_PTZ_TYPE ;
- }
- else {
- ;
- }
- $("[name=li-systemptzcamera]").css("display", "none");
- $("[name=li-detectioncam-systemptzcamera]").css("display", "none");
- if(SUPPORT_MULTI_DEVICE_DETECTION_CAM_TYPE == support_multi_device_type) {
- $("[name=li-detectioncam]").css("display", "");
- $("[name=folderble-ptzcam]").css("display", "");
-
- $("[name=li-ptzcam-videoaudio]").css("display", "none");
- $("[name=li-ptzcam-videooutput]").css("display", "none");
- $("[name=li-ptzcam-imageschedule]").css("display", "none");
- $("[name=li-ptzcam-imageircontrol]").css("display", "none");
- $("[name=li-ptzcam-eventsilence]").css("display", "none");
- $("[name=li-ptzcam-eventshock]").css("display", "none");
- $("[name=li-ptzcam-eventsensor]").css("display", "none");
- $("[name=li-ptzcam-eventalarm]").css("display", "none");
- $("[name=li-ptzcam-record]").css("display", "none");
- $("[name=li-ptzcam-device]").css("display", "none");
- $("[name=li-ptzcam-ptz]").css("display", "none");
- $("[name=li-ptzcam-systemdirectioncamera]").css("display", "none");
- $("[name=li-ptzcam-eventva]").css("display", "");
- $("[name=li-detectioncam-systemtiltposition]").css("display", "");
- $("[name=li-detectioncam-systemexttracking]").css("display", "");
- $("[name=li-detectioncam-systemptzcamera]").css("display", "");
- $("[name=li-systemptzcamera]").css("display", "none");
-
-
- var directioncam = readSetupByPage("directioncam");
- var protocol = location.protocol;
- if (protocol == "https:") {
- support_multi_device_ipaddress = protocol + "//" + directioncam["DIRECTIONCAM_IP"] + ":" + directioncam["DIRECTIONCAM_HTTPS_PORT"] + "/" ;
- } else {
- support_multi_device_ipaddress = "http://" + directioncam["DIRECTIONCAM_IP"] + ":" + directioncam["DIRECTIONCAM_HTTP_PORT"] + "/" ;
- }
- }
- else if(SUPPORT_MULTI_DEVICE_PTZ_TYPE == support_multi_device_type) {
- $("[name=li-detectioncam]").css("display", "");
- $("[name=folderble-ptzcam]").css("display", "");
- $("[name=li-ptzcam-videoaudio]").css("display", "");
- $("[name=li-ptzcam-videooutput]").css("display", "");
- $("[name=li-ptzcam-imageschedule]").css("display", "");
- $("[name=li-ptzcam-imageircontrol]").css("display", "");
- $("[name=li-ptzcam-eventsilence]").css("display", "");
- $("[name=li-ptzcam-eventshock]").css("display", "");
- $("[name=li-ptzcam-eventsensor]").css("display", "");
- $("[name=li-ptzcam-eventalarm]").css("display", "");
- $("[name=li-ptzcam-record]").css("display", "");
- $("[name=li-ptzcam-device]").css("display", "");
- $("[name=li-ptzcam-ptz]").css("display", "");
- $("[name=li-ptzcam-systemdirectioncamera]").css("display", "");
- $("[name=li-detectioncam-systemtiltposition]").css("display", "none");
- $("[name=li-detectioncam-systemexttracking]").css("display", "none");
- $("[name=li-ptzcam-eventva]").css("display", "none");
- $("[name=li-ptzcam-ptzintelligent]").css("display", "none");
- $("[name=li-detectioncam-systemptzcamera]").css("display", "none");
- $("[name=li-systemptzcamera]").css("display", "");
- var directioncam = readSetupByPage("directioncam");
- var protocol = location.protocol;
- if (protocol == "https:") {
- support_multi_device_ipaddress = protocol + "//" + directioncam["DIRECTIONCAM_IP"] + ":" + directioncam["DIRECTIONCAM_HTTPS_PORT"] + "/" ;
- } else {
- support_multi_device_ipaddress = "http://" + directioncam["DIRECTIONCAM_IP"] + ":" + directioncam["DIRECTIONCAM_HTTP_PORT"] + "/" ;
- }
- }
- else {
- $("[name=li-detectioncam]").css("display", "none");
- $("[name=folderble-ptzcam]").css("display", "none");
- }
-
- if(mode == 0){ // encoder system
- $("[name=li-networkremote]").css("display", "none");
- $("[name=li-videooutputosd]").css("display", "none");
- if((boardid & 0xF000) == 0x4000 && setup["SYS_ISIPCAM"] == 0)
- {
- // amba encoder does not have composite
- if(setup["SYS_AMBA_SUPPORT_HDMI_BCS"] == 0)
- {
- $("[name=li-image]").css("display", "none");
- }
- }
- }
- else{ // decoder system
- if((boardid & 0xF000) != 0x3000 && (boardid & 0xF000) != 0xB000) {
- $("[name=li-record]").css("display", "none");
- $("[name=li-videooutputosd]").css("display", "none");
- }
- $("[name=li-image]").css("display", "none");
- $("[name=li-videoencode]").css("display", "none");
- $("[name=li-networkoneway]").css("display", "none");
- $("[name=li-networkemail]").css("display", "none");
- $("[name=li-networkftp]").css("display", "none");
- $("[name=li-eventmotion]").css("display", "none");
- $("[name=li-ptzgroup]").css("display", "none");
- $("[name=li-ptzadvanced]").css("display", "none");
- $("[name=li-networkgoogledrive]").css("display", "none");
- }
-
- if(ptztype != 7){
- $("[name=li-ptzpattern]").css("display", "none");
- $("[name=li-ptzswing]").css("display", "none");
- if(moduletype == HITACHI_MODULE){
- $("[name=li-imagemask]").css("display", "none");
- }
- }
- if(!support_location_osd) {
- $("[name=li-ptzlocationosd]").css("display", "none");
- $("[name=li-ptzcam-ptzlocationosd]").css("display", "none");
- }
-
- if(setup["SYS_ISIPCAM"] == 0){
- $("[name=li-imageschedule]").css("display", "none");
- $("[name=li-imagemask]").css("display", "none");
- }
- if(mode == 0 && ((boardid & 0xF000) == 0x3000 || (boardid & 0xF000) == 0xB000) && setup["SYS_ISIPCAM"] == 0)
- $("[name=li-imagemask]").css("display", "");
- if(moduledetail == MODULE_TI_TECHWIN_W5)
- {
- $("[name=li-imageschedule]").css("display", "none");
- $("[name=li-imagemask]").css("display", "none");
- $("[name=li-videooutput]").css("display", "none");
- }
- if((boardid & 0xF000) == 0x3000){
- $("[name=li-eventsilence]").css("display", "none");
- if(boardid == 0x3003){
- $("[name=li-eventsensor]").css("display", "none");
- $("[name=li-systemsystemmode]").css("display", "none");
- }
- if(boardid == 0x3004) {
- $("[name=li-record]").css("display", "none");
- }
- // Decoder Mode && Smooth Switching List Enable
- if((setup["SYS_MODE"] == 1) && (setup["SYS_IS_USE_SMOOTH_SW"] == 1)) {
- $("[name=li-networklist]").css("display", "");
- }
- else {
- $("[name=li-networklist]").css("display", "none");
- }
- }
- else if((boardid & 0xF000) == 0xB000){
-
- if(setup["SYS_ISIPCAM"] != 0){
- $("[name=li-systemsystemmode]").css("display", "none");
- }
- else{
- if ((boardid & 0xFFFF) == 0xB005) { // TCS-1600
- $("[name=li-systemsystemmode]").css("display", "none");
- }
- $("[name=li-imagegeneral]").css("display", "none");
- }
-
- // Decoder Mode && Smooth Switching List Enable
- if((setup["SYS_MODE"] == 1) && (setup["SYS_IS_USE_SMOOTH_SW"] == 1)) {
- $("[name=li-networklist]").css("display", "");
- }
- else {
- $("[name=li-networklist]").css("display", "none");
- }
- if(boardid == 0xB001) { // IPM-A400
- $("[name=li-videoaudio]").css("display", "none");
- $("[name=li-videooutput]").css("display", "none");
- $("[name=li-imageschedule]").css("display", "none");
- $("[name=li-eventsilence]").css("display", "none");
- $("[name=li-record]").css("display", "none");
- $("[name=li-device]").css("display", "none");
- $("[name=li-ptz]").css("display", "none");
-
- }
- }
- else if((boardid & 0xF000) == 0xD000 || (boardid & 0xF000) == 0xE000){
- $("[name=li-systemsystemmode]").css("display", "none");
- $("[name=li-networklist]").css("display", "none");
- $("[name=li-networkssl]").css("display", "none");
- if((boardid & 0xFFF000) == 0x10D000) { // Scale AQ
- $("[name=li-record]").css("display", "none");
- }
- }
- else{
- $("[name=li-systemsystemmode]").css("display", "none");
- $("[name=li-networklist]").css("display", "none");
- }
-
- $("[name=li-networkmulticast]").css("display", "none");
- if(boardid == 0x1003 || boardid == 0x1007){ // TCS-410
- $("[name=li-networkoneway]").css("display", "none");
- $("[name=li-ptzgroup]").css("display", "none");
- $("[name=li-ptzadvanced]").css("display", "none");
- $("[name=li-eventsilence]").css("display", "none");
- if(setup["SYS_IS_MULTICAST_SPECIFIC"] == 1){
- $("[name=li-networkmulticast]").css("display", "");
- }
- $("[name=li-ptzpositionosd]").css("display", "none");
- $("[name=li-imagemask]").css("display", "");
- }
-
- if((parseInt(setup["SYS_NOT_SUPPORT_FUNCTION"]) & parseInt(1<<PTZ_FUNCTION)) == parseInt(1<<PTZ_FUNCTION)){
- $("[name=li-ptz]").css("display", "none");
- $("[name=li-device]").css("display", "none");
- }
- else if(parseInt(setup["SYS_IS_FIR2"]) == 1){
- $("[name=li-device]").css("display", "none");
- }
-
- if((parseInt(setup["SYS_NOT_SUPPORT_FUNCTION"]) & parseInt(1<<RECORD_FUNCTION)) == parseInt(1<<RECORD_FUNCTION)){
- $("[name=li-record]").css("display", "none");
- }
-
- if(parseInt(setup["SYS_NUMOFSENSOR"]) == 0){
- $("[name=li-eventsensor]").css("display", "none");
- }
- if(parseInt(setup["SYS_NUMOFALARM"]) == 0){
- $("[name=li-eventalarm]").css("display", "none");
- }
-
- if((boardid & 0xF000) != 0x1000 && (boardid & 0xF000) != 0x3000 && (boardid & 0xF000) != 0xB000 && (boardid & 0xF000) != 0x5000 && (boardid & 0xF000) != 0x9000 && (boardid & 0xF000) != 0xA000 && (boardid & 0xF000) != 0xD000 && (boardid & 0xF000) != 0xE000 || mode != 0){
- $("[name=li-ptzpositionosd]").css("display", "none");
- }
-
- if((setup["SYS_IS_CTECNEW"] == 1 || setup["SYS_CYNIX_XIR"] == 1 || (setup["SYS_FTCAMERA"] == 1 && (boardid & 0x000F) == 0x0002 || boardid == 0x29000 || boardid == 0x49000 || boardid == 0x69000 || boardid == 0x89000 || boardid == 0x129000 || boardid == 0x11A004 || boardid == 0x12A004 || (boardid & 0xF0F00F) == 0x10B004) || (setup["SYS_IS_HOUSINGSPECIFIC"] == 1) || (moduletype == NXP_ISP_MODULE && ptztype == 1) || ((moduletype == HI_ISP_MODULE || moduletype == S5LM55_ISP_MODULE || moduletype == CV2_ISP_MODULE) && ptztype == 1 && (setup["SYS_ZOOMRATIO"] > 0x5)) || (moduletype == CV2_ISP_MODULE && ptztype == 7)) && (setup["SYS_IS_FIRHOUSING_SPECIFIC"] != 1)){
- }
- else{
- $("[name=li-imageircontrol]").css("display", "none");
- }
- if(moduletype == HI3519_ISP_MODULE && parseInt(setup["SYS_FTCAMERA_FA3"]) != 0)
- {
- $("[name=li-imageircontrol]").css("display", "none");
- }
- if(setup["VID_FAKE_DEMIST"] == 1 && moduledetail == MODULE_SONY_EH6300){
- }
- else{
- $("[name=li-imagedemist]").css("display", "none");
- }
- if(setup["SYS_IS_PLCSPECIFIC"] == 1){
- $("[name=li-ptzpositionosd]").css("display", "none");
- }
- else{
- $("[name=li-deviceplc]").css("display", "none");
- }
- if(setup["SYS_IS_BOOKISPECIFIC"] != 1){
- $("[name=li-devicebooki]").css("display", "none");
- }
-
- if(ptztype == 1 && (moduletype == 1 || moduletype == 2 || moduletype == 3 || moduletype == 4 || moduletype == 6 || moduletype == 9) ){
- }
- else{
- $("[name=li-devicefan]").css("display", "none");
- }
-
- if (moduletype != PANASONIC_MODULE && setup["SYS_USE_AUTO_PTZ"] != 1){
- $("[name=li-ptztracking]").css("display", "none");
- }
-
- if ((((setup["SYS_BOARDID"] & 0xF000) == 0x1000 || (setup["SYS_BOARDID"] & 0xF000) == 0x4000 || (setup["SYS_BOARDID"] & 0xF000) == 0x5000 || (setup["SYS_BOARDID"] & 0xF000) == 0x6000 || (setup["SYS_BOARDID"] & 0xF000) == 0x9000 || (setup["SYS_BOARDID"] & 0xF000) == 0xA000) && (setup["SYS_ISIPCAM"] == 1)) ||
- ((setup["SYS_BOARDID"] & 0xF000) == 0xB000 || (setup["SYS_BOARDID"] & 0xF000) == 0xD000 || (setup["SYS_BOARDID"] & 0xF000) == 0xE000)){
- if(parseInt(setup["VA_LicenseValid"]) == 1){
- $("[name=li-eventva]").css("display", "");
- }
- else{
- $("[name=li-eventva]").css("display", "none");
- }
- }
- else{
- $("[name=li-eventva]").css("display", "none");
- }
- if (setup["SYS_IS_IIST_SPECIFIC"] == 1) {
- $("[name=li-eventflamedetection]").css("display", "");
- } else {
- $("[name=li-eventflamedetection]").css("display", "none");
- }
- if( ((boardid & 0xF000) == 0x4000 || (boardid & 0xF000) == 0x6000 || boardid == 0x1003 || boardid == 0x1007) ||
- mode == 1) {
- $("[name=li-eventosd]").css("display", "none");
- }
- if(boardid == 0x1003 || boardid == 0x1007) {
- $("[name=li-eventhttpaction]").css("display", "none");
- }
- if((boardid == 0x1A002 || boardid == 0x2A002 || boardid == 0x3A002 || boardid == 0x4A002 || boardid == 0x5A002 || boardid == 0x6A002 || boardid == 0xB003 || boardid == 0x1B003 || boardid == 0x2B003) && (setup["SYS_IS_FIRHOUSING_SPECIFIC"] != 1)) {
- $("[name=li-imageircontrol]").css("display", "");
- }
- // if((moduletype == NXP_ISP_MODULE || moduletype == HI_ISP_MODULE || moduletype == HI3519_ISP_MODULE) && ptztype == 1){
- // $("[name=li-imagemask]").css("display", "none");
- // }
-
- if(setup["SYS_IS_RAPIER_SPECIFIC"] == 1){
- $("[name=li-image]").css("display", "none");
- $("[name=li-ptzpositionosd]").css("display", "none");
- }
- if(setup["SYS_IS_SEMOCON_SPECIFIC"] == 1){
- $("[name=li-devicehousing]").css("display", "");
- $("[name=li-ptzpattern]").css("display", "");
- // $("[name=li-imagemask]").css("display", "none");
- // $("[name=li-ptzpositionosd]").css("display", "none");
- }
- else {
- $("[name=li-devicehousing]").css("display", "none");
- }
- if(setup["SYS_IS_FIRHOUSING_SPECIFIC"] == 1){
- $("[name=li-deviceirhousing]").css("display", "");
- $("[name=li-ptzgeneral]").css("display", "none");
- } else {
- $("[name=li-deviceirhousing]").css("display", "none");
- }
-
- if(parseInt(setup["SYS_GDS_DISABLE"]) == 1){
- $("[name=li-networkgoogledrive]").css("display", "none");
- }
- if(parseInt(setup["SYS_LPR_ITSTECH"]) == 1 ||
- parseInt(setup["SYS_USE_LPR"]) == 1 ||
- parseInt(setup["SYS_USE_GIT_LPR"]) == 1){
- $("[name=li-eventlpr]").css("display", "");
- }
- else{
- $("[name=li-eventlpr]").css("display", "none");
- }
- if(setup["SYS_IS_OBJECT_DETECT"] == 1) {
- $("[name=li-eventobjectdetection]").css("display", "");
- }
- else {
- $("[name=li-eventobjectdetection]").css("display", "none");
- }
- if(setup["SYS_FTCAMERA_IR4"] != 3 && setup["SYS_FTCAMERA_IR4"] != 4){
- $("[name=li-devicewiper]").css("display", "none");
- }
-
- if( ((boardid & 0xF000) == 0x9000 || (boardid & 0xF000) == 0xA000 || (boardid & 0xF000) == 0xB000 ) && (setup["SYS_FTCAMERA_IR4"] == 4) ) {
- // if( ((boardid & 0xF000) == 0x9000 || (boardid & 0xF000) == 0xA000 || (boardid & 0xF000) == 0xB000 ) && ( (setup["SYS_FTCAMERA_IR4"] == 4) || (setup["SYS_FTCAMERA_IR4"] == 3) || (setup["SYS_FTCAMERA_IR4"] == 2)) ) {
- $("[name=li-systemdirectioncamera]").css("display", "");
- }
- else {
- $("[name=li-systemdirectioncamera]").css("display", "none");
- }
-
- if(setup["SYS_ISIPCAM"] == 0){
- $("[name=li-ptzextptz]").css("display", "none");
- }
- else if(((boardid & 0xF000) == 0x1000 || (boardid & 0xF000) == 0x5000) && ptztype != 1 && ptztype != 7){
- $("[name=li-ptzextptz]").css("display", "");
- }
- else if(moduletype == NXP_ISP_MODULE && ptztype == 1){
- $("[name=li-ptzextptz]").css("display", "");
- }
- else if((moduletype == HI_ISP_MODULE || moduletype == HI3519_ISP_MODULE || moduletype == HI3519A_ISP_MODULE) && ptztype == 1){
- $("[name=li-ptzextptz]").css("display", "");
- }
- else if((moduletype == S5LM55_ISP_MODULE || moduletype == CV2_ISP_MODULE) && ptztype == 1){
- $("[name=li-ptzextptz]").css("display", "");
- }
- else{
- $("[name=li-ptzextptz]").css("display", "none");
- }
-
- if(parseInt(setup["SYS_WIFI_DEVICEDETECT"]) != 1){
- $("[name=li-networkwifi]").css("display", "none");
- }
- if(setup["SYS_CLOUD_INTERCONNECTION"] != 1){
- $("[name=li-networkcloud]").css("display", "none");
- }
-
- if(parseInt(setup["SYS_FIXEDMASK_TEMPORARY"]) != 1){
- $("[name=li-imagemask2]").css("display", "none");
- }
-
- if(parseInt(setup["SYS_ILLUMINATOR"]) != 1) {
- $("[name=li-deviceilluminator]").css("display", "none");
- }
- if(parseInt(setup["SYS_RTU_SPECIFIC"]) != 1) {
- $("[name=li-devicertu]").css("display", "none");
- }
- if(parseInt(setup["SYS_SHOCK_SENSOR_EXIST"]) != 1) {
- $("[name=li-eventshock]").css("display", "none");
- }
- if(parseInt(setup["SYS_NEWLOG"]) != 1) {
- $("[name=li-systemlog]").css("display", "none");
- }
- if(mode == 0 && parseInt(setup["SYS_USE_LIVE555"]) == 1) {
- } else {
- $("[name=li-networkrtspmulticast]").css("display", "none");
- }
- if(parseInt(setup["SYS_TTA_SECURITY_VERIFIED"]) == 1) {
- $("[name=li-networksnmp]").css("display", "none");
- }
- if(mode == 1 || parseInt(setup["SYS_USE_SRT"]) != 1) {
- $("[name=li-networksrt]").css("display", "none");
- }
- if(boardid == 0x3D011 || boardid == 0x4D011 || boardid == 0x5D011 || boardid == 0x6D011 || boardid == 0x9D011) { // S5L TN
- }
- else {
- $("[name=li-networklink]").css("display", "none");
- }
- if(ptztype != 7 || parseInt(setup["SYS_INTELLIGENT_PTZ"]) != 1) {
- $("[name=li-ptzintelligent]").css("display", "none");
- }
- if(boardid == 0x1003 || boardid == 0x1007) { // TCS-410
- $("[name=li-eventuserdefinedevent]").css("display", "none");
- }
- if(setup["SYS_ISIPCAM"] == 1) {
- $("[name=li-deviceled]").css("display", "none");
- }
- if((boardid & 0xFFFF) == 0xB000 || (boardid & 0xFFFF) == 0xB005) { // TCS-8500 or TCS-1600
- $("[name=li-deviceled]").css("display", "none");
- if(boardid == 0x1B000) { // TCS-8500A
- $("[name=li-device]").css("display", "none");
- }
- }
- if(boardid == 0xB001) {
- $("[name=li-systemtiltposition]").css("display", "");
- $("[name=li-systemexttracking]").css("display", "");
- } else {
- $("[name=li-systemtiltposition]").css("display", "none");
- $("[name=li-systemexttracking]").css("display", "none");
- }
- if(setup["SYS_IS_DATATOYS_SPECIFIC"] == 1) {
- $("[name=li-deviceled]").css("display", "none");
- }
- if(setup["SYS_USE_GIT_LPR"] == 1) {
- $("[name=li-systemaudiofile]").css("display", "");
- } else {
- $("[name=li-systemaudiofile]").css("display", "none");
- }
- if(setup["SYS_IS_JIINTECH_SPECIFIC"] == 1) {
- $("[name=li-systemcrimemanager]").css("display", "");
- } else {
- $("[name=li-systemcrimemanager]").css("display", "none");
- }
- if(setup["SYS_IS_KEXMOLIT_SPEC"] == 1) {
- $("[name=li-systemmolit]").css("display", "");
- } else {
- $("[name=li-systemmolit]").css("display", "none");
- }
- if(setup["SYS_IS_AVEC_PTHOUSING_SPECIFIC"] == 1) {
- $("[name=li-imagemask]").css("display", "none");
- }
- if(setup["SYS_IS_HATTLELAND_SPEC"] == 1){
- $("[name=li-videoaudio]").css("display", "none");
- $("[name=li-eventsilence]").css("display", "none");
- $("[name=li-eventsensor]").css("display", "none");
- $("[name=li-eventva]").css("display", "none");
- $("[name=li-eventosd]").css("display", "none");
- $("[name=li-ptz]").css("display", "none");
- $("[name=li-videooutput]").css("display", "none");
- $("[name=li-device]").css("display", "none");
- $("[name=li-eventhttpaction]").css("display", "none");
- }
- if(setup["SYS_REMOVE_DDNS"] == 1) {
- $("[name=li-networkddns]").css("display", "none");
- }
- }
- function isSupportMenu(menu)
- {
- for(i = 0; i < T_SupportMenu.length; i++) {
- if(menu == T_SupportMenu[i])
- return true;
- }
- return false;
- }
- /*
- function applyLanguage(lid)
- {
- var table;
- var locale = [ "English", "Japanese", "Korean", ];
- table = ajaxGet("/resources/lang/LT_" + locale[lid] + ".tlf.json");
- if(table) {
- //console.log(table);
- LT = eval('(' + table + ')');
- for(var i = 0; i < LT.length; i++) {
- // IE9에서는 LT.length가 Chrome이나 FF보다 1더 많이 넘어온다.
- // 이를 해결하기 위해 null 체크
- if(LT[i] == null)
- break;
- $(".LAN_" + LT[i].id).text(LT[i].str);
- //console.log("#" + LT[i].id + " = " + LT[i].str);
- }
- }
- }
- */
- function initLanguage()
- {
- var table;
- var locale = [ "English", "Japanese", "Korean", "Hebrew", "Russian", "Spanish", "Portuguese" , "Chinese", "German" , "Arabic", "Finnish", "Italian" , "Polish", "French", "Czech" , "Chinese_tw", "Turkish", "Dutch"];
- LID = readSetupByKey("SYS_LANGUAGE");
- table = ajaxGet("/resources/lang/LT_" + locale[LID] + ".tlf.json");
- if(table) {
- //console.log(table);
- LT = eval('(' + table + ')');
- if(1){
- $("[class*='LAN_']").each(function(i, d) {
- // n = n + 1;
- //console.log(d.className);
- var caption = d.className;
- id = parseInt(caption.substr(caption.indexOf("LAN_") + 4, 4), 10);
- $(this).text(LT[id].str);
- });
- }
- else{
- // 기존 로직
- for(var i = 0; i < LT.length; i++) {
- if(LT[i] == null)
- break;
- $(".LAN_" + LT[i].id).text(LT[i].str);
- }
- }
- }
- }
- function initLanguage2()
- {
- var table;
- var locale = [ "English", "Japanese", "Korean", "Hebrew", "Russian", "Spanish", "Portuguese" , "Chinese", "German" , "Arabic", "Finnish", "Italian" , "Polish", "French", "Czech" , "Chinese_tw", "Turkish", "Dutch"];
- LID = readSetupByKey("SYS_LANGUAGE");
- table = ajaxGet("/resources/lang/LT_" + locale[LID] + ".tlf.json");
- if(table) {
- //console.log(table);
- LT = eval('(' + table + ')');
-
- // $("[name^='LAN_']").text(LT[parseInt($(this).text())].str);
- $("[name^='LAN_']").text(function(){
- // alert("xxx=" + parseInt($(this).text()));
- return LT[parseInt($(this).text())].str;
- });
- }
- }
- function GetLan(index)
- {
- return LT[index].str;
- }
- /*
- function T_GetLangString(key)
- {
- var id = key.slice(4);
- console.log("key = " + key + " id = " + id);
- for(i = 0; i < LT.length; i++) {
- if(LT[i].id == id)
- return LT[i].str;
- }
- return undefined;
- }
- */
- /*****************************************************************************/
- var PRODUCT = "truen";
- var LID = 2;
- /*****************************************************************************/
- function T_LoadSetup(page)
- {
- var setup = readSetupByPage(page);
- $(":input").each(function(index, obj) {
- //console.log("name = " + $(this).prop("name") + " type = " + $(this).prop("type"));
- if($(this).prop("name") != undefined){
- if(setup[$(this).prop("name")] != undefined){
- if($(this).prop("type") == "checkbox") {
- if(setup[$(this).prop("name")] == "0")
- $(this).prop("checked", false);
- else
- $(this).prop("checked", true);
- }
- else if($(this).prop("type") == "radio") {
- if($(this).val() == setup[$(this).prop("name")])
- $(this).prop("checked", true);
- else
- $(this).prop("checked", false);
- }
- else if($(this).prop("type") == "select-one") {
- var value = setup[$(this).prop("name")];
- $(this).find("option").filter(function() {
- return $(this).val() == value;
- }).prop("selected", true);
- }
- else if($(this).prop("type") == "textarea") {
- $(this).val(setup[$(this).prop("name")]);
- }
- else {
- $(this).val(setup[$(this).prop("name")]);
- }
- }
- }
- });
- $("span").each(function(index, obj) {
- if($(this).attr("name") != undefined){
- if(setup[$(this).attr("name")] != undefined){
- $(this).text(setup[$(this).attr("name")]);
- }
- }
- });
- }
- function T_ApplySetup(formId, prefix)
- {
- var message = "";
- if(formId == undefined)
- formFilter = "";
- else
- formFilter = "form[id=" + formId + "] ";
- $(formFilter + ":input[name^=" + prefix + "]").each(function(index, obj) {
- if(!$(this).readOnly && !$(this).disabled) {
- if($(this).prop("type") == "radio") {
- if($(this).prop("checked")) {
- var tmp = encodeURIComponent($(this).prop("name")) + "=" + $(this).val() + "&";
- message += tmp;
- }
- }
- else if($(this).prop("type") == "checkbox") {
- var tmp = encodeURIComponent($(this).prop("name")) + "=";
- if($(this).prop("checked")) {
- tmp += "1&";
- }
- else {
- tmp += "0&";
- }
- message += tmp;
- }
- else if($(this).prop("type") == "select-one") {
- var tmp = encodeURIComponent($(this).prop("name")) + "=" + encodeURIComponent($(this).val()) + "&";
- message += tmp;
- }
- else if($(this).prop("type") == "textarea") {
- var tmp = encodeURIComponent($(this).prop("name")) + "=" + encodeURIComponent($(this).val()) + "&";
- message += tmp;
- }
- else if($(this).prop("type") == "text") {
- var tmp = encodeURIComponent($(this).prop("name")) + "=" + encodeURIComponent($(this).val()) + "&";
- message += tmp;
- }
- else if($(this).prop("type") == "password") {
- var tmp = encodeURIComponent($(this).prop("name")) + "=" + encodeURIComponent($(this).val()) + "&";
- message += tmp;
- }
- else if($(this).prop("type") == "hidden") {
- var tmp = encodeURIComponent($(this).prop("name")) + "=" + encodeURIComponent($(this).val()) + "&";
- message += tmp;
- }
- }
- });
- // console.log("[MSG] = [" + message + "]");
- writeSetup(message);
- }
- function T_SelectMenu(product, menu)
- {
- url = "/product/" + product + "/" + menu + ".html";
- var boardid = readSetupByKey("SYS_BOARDID");
- if(boardid == 0x1003 || boardid == 0x1007){
- if(menu == "systemsystemid" || menu == "imagegeneral" || menu == "imagemask" || menu == "videoinformation" || menu == "videoencode" || menu == "ptzgeneral" || menu == "ptzpreset" || menu == "eventmotion" || menu == "eventnotification" || menu == "recordgeneral" || menu == "recordschedule" || menu == "networkftp"){
- url = "/product/" + product + "/" + menu + "_410.html";
- }
- }
- else if(boardid == 0xB001){
- if(menu == "systemsystemid" || menu == "videoinformation" || menu == "videoencode" || menu == "imagegeneral" || menu == "imagemask" || menu == "eventnotification" || menu == "networkftp" || menu == "networkrtspmulticast" || menu == "networkoneway" || menu == "networksrt" || menu == "eventmotion" || menu == "eventva" || menu == "eventuserdefinedevent"){
- url = "/product/" + product + "/" + menu + "_a400.html";
- }
- }
- else{
- if(menu == "imagegeneral"){
- var val = readSetupByKey("SYS_MODULE_TYPE");
- var ipcam = readSetupByKey("SYS_ISIPCAM");
- if(ipcam == 0){
- url = "/product/" + product + "/" + menu + "_server.html";
- }
- else{
- if(val == NEXT_MODULE){
- url = "/product/" + product + "/" + menu + "_eagle.html";
- }
- else if(val == SONY_MODULE){
- url = "/product/" + product + "/" + menu + "_sony.html";
- }
- else if(val == PANASONIC_MODULE){
- url = "/product/" + product + "/" + menu + "_panasonic.html";
- }
- else if(val == TECHWIN_MODULE){
- url = "/product/" + product + "/" + menu + "_techwin.html";
- }
- else if(val == HITACHI_MODULE){
- url = "/product/" + product + "/" + menu + "_hitachi.html";
- }
- else if(val == LG_MODULE){
- url = "/product/" + product + "/" + menu + "_lg.html";
- }
- else if(val == SONYIS_MODULE){
- url = "/product/" + product + "/" + menu + "_imx103.html";
- }
- else if(val == WONWOO_MODULE){
- url = "/product/" + product + "/" + menu + "_wonwoo.html";
- }
- else if(val == CYNIX_MODULE){
- url = "/product/" + product + "/" + menu + "_cynix.html";
- }
- else if(val == POWERVIEW_MODULE){
- url = "/product/" + product + "/" + menu + "_powerview.html";
- }
- else if(val == NXP_ISP_MODULE) {
- url = "/product/" + product + "/" + menu + "_nxp.html";
- }
- else if(val == AMBA_ISP_MODULE) {
- url = "/product/" + product + "/" + menu + "_amba.html";
- }
- else if(val == HI_ISP_MODULE) {
- url = "/product/" + product + "/" + menu + "_hi.html";
- }
- else if(val == HI3519_ISP_MODULE) {
- url = "/product/" + product + "/" + menu + "_hi.html";
- }
- else if(val == HI3519A_ISP_MODULE) {
- url = "/product/" + product + "/" + menu + "_hi.html";
- }
- else if(val == S5LM55_ISP_MODULE) {
- url = "/product/" + product + "/" + menu + "_s5l.html"; // TODO: check
- }
- else if(val == CV2_ISP_MODULE) {
- url = "/product/" + product + "/" + menu + "_cv2.html"; // TODO: check
- }
- }
- }
-
- if(menu == "imagemask"){
- var val = readSetupByKey("SYS_MODULE_TYPE");
- var detail = readSetupByKey("SYS_MODULE_DETAIL");
- var ptz = readSetupByKey("SYS_PTZ_TYPE");
- if(val == NEXT_MODULE){
- if(readSetupByKey("SYS_IS_SEMOCON_SPECIFIC") == 1){
- url = "/product/" + product + "/" + menu + "_zoom.html";
- }
- else{
- url = "/product/" + product + "/" + menu + "_box.html";
- }
- }
- else if(val == SONYIS_MODULE){
- url = "/product/" + product + "/" + menu + "_box.html";
- }
- else if (detail == MODULE_SONY_SE600 || detail == MODULE_PACIFIC_20 || detail == MODULE_SONY_EH6300 || detail == MODULE_SONY_EH6500 || detail == MODULE_SONY_EV7500 || detail == MODULE_SONY_EV7300 || detail == MODULE_SONY_EV7310 || detail == MODULE_SONY_EV7520 || detail == MODULE_SONY_EV7520A || detail == MODULE_SONY_EV7320 || detail == MODULE_SONY_EV7517 || detail == MODULE_SONY_EV7317 || detail == MODULE_SONY_ER8300 || (val == HITACHI_MODULE && ptz == 7) || val == TECHWIN_MODULE || val == LG_MODULE || val == PANASONIC_MODULE || val == WONWOO_MODULE || val == CYNIX_MODULE || val == POWERVIEW_MODULE){
- url = "/product/" + product + "/" + menu + "_zoom.html";
- }
- else if (val == NXP_ISP_MODULE)
- {
- if(ptz == 1){
- url = "/product/" + product + "/" + menu + "_zoom.html";
- }
- else{
- url = "/product/" + product + "/" + menu + "_ti.html";
- }
- }
- else if (val == HI3519_ISP_MODULE)
- {
- var is_ptz_micom = readSetupByKey("SYS_IS_TRUEN_PTZ_MICOM");
- if(is_ptz_micom != 0){
- url = "/product/" + product + "/" + menu + "_zoom.html";
- }
- else{
- if(ptz == 1)
- {
- if(readSetupByKey("SYS_USE_POLYGONMASK") == 1){
- url = "/product/" + product + "/" + menu + "_polygon.html"; // TODO: check
- } else {
- url = "/product/" + product + "/" + menu + "_zoom.html";
- }
- }
- else
- {
- url = "/product/" + product + "/" + menu + "_ti.html";
- }
- }
- }
- else if (val == HI_ISP_MODULE || val == HI3519A_ISP_MODULE)
- {
- var is_ptz_micom = readSetupByKey("SYS_IS_TRUEN_PTZ_MICOM");
- var mosaic = readSetupByKey("SYS_USE_MOSAIC_MASK");
- if(is_ptz_micom != 0){
- if(mosaic == 1) {
- url = "/product/" + product + "/" + menu + "_mosaic.html";
- } else {
- url = "/product/" + product + "/" + menu + "_zoom.html";
- }
- }
- else {
- if(ptz == 1){
- url = "/product/" + product + "/" + menu + "_zoom.html";
- }
- else{
- if(readSetupByKey("SYS_IS_SEMOCON_SPECIFIC") == 1){
- url = "/product/" + product + "/" + menu + "_zoom.html";
- }
- else{
- url = "/product/" + product + "/" + menu + "_ti.html";
- }
- }
- }
- }
- else if (val == S5LM55_ISP_MODULE)
- {
- if (ptz == 1)
- {
- if(readSetupByKey("SYS_USE_POLYGONMASK") == 1){
- url = "/product/" + product + "/" + menu + "_polygon.html"; // TODO: check
- } else {
- url = "/product/" + product + "/" + menu + "_zoom.html"; // TODO: check
- }
- }
- else
- {
- url = "/product/" + product + "/" + menu + "_ti.html"; // TODO: check
- }
- }
- else if (val == CV2_ISP_MODULE)
- {
- if(is_ptz_micom != 0){
- if(readSetupByKey("SYS_USE_POLYGONMASK") == 1){
- url = "/product/" + product + "/" + menu + "_polygon.html"; // TODO: check
- } else {
- url = "/product/" + product + "/" + menu + "_zoom.html"; // TODO: check
- }
- } else {
- if (ptz == 1)
- {
- url = "/product/" + product + "/" + menu + "_zoom.html"; // TODO: check
- }
- else
- {
- url = "/product/" + product + "/" + menu + "_ti.html"; // TODO: check
- }
- }
- }
- else if(val == AMBA_ISP_MODULE)
- {
- url = "/product/" + product + "/" + menu + "_ti.html";
- }
- else if(readSetupByKey("SYS_ISIPCAM") == 0 && ((readSetupByKey("SYS_BOARDID") & 0xF000) == 0x3000 || (readSetupByKey("SYS_BOARDID") & 0xF000) == 0xB000))
- {
- url = "/product/" + product + "/" + menu + "_ti.html";
- }
- }
- if(menu == "imageircontrol"){
- var is_ptz_micom = readSetupByKey("SYS_IS_TRUEN_PTZ_MICOM");
- var module_type = readSetupByKey("SYS_MODULE_TYPE");
- var sys_ftcamera = readSetupByKey("SYS_FTCAMERA");
- var sys_ftcamera_ir4 = readSetupByKey("SYS_FTCAMERA_IR4");
- var sys_ftcamera_nline = readSetupByKey("SYS_FTCAMERA_NLINE");
- var sys_ftcamera_hwversion = readSetupByKey("SYS_FTCAMERA_HWVERSION");
- if(readSetupByKey("SYS_IS_CTECNEW") == 1){
- }
- else if(readSetupByKey("SYS_CYNIX_XIR") == 1){
- url = "/product/" + product + "/" + menu + "_xir.html";
- }
- else if(sys_ftcamera == 1 && (readSetupByKey("SYS_BOARDID") & 0x000F) == 0x0002 || (readSetupByKey("SYS_BOARDID") & 0xF00F) == 0xB004){
- if(sys_ftcamera_ir4 != 0){
- if((sys_ftcamera_ir4 == 4 && sys_ftcamera_hwversion == 1) || (sys_ftcamera_ir4 == 2 && sys_ftcamera_nline == 1))
- {
- url = "/product/" + product + "/" + menu + "_fir_laser.html";
- }
- else{
- url = "/product/" + product + "/" + menu + "_fir4.html";
- }
- }
- else{
- url = "/product/" + product + "/" + menu + "_fir.html";
- }
- }
- else if(module_type == HI3519_ISP_MODULE)
- {
- if(is_ptz_micom != 0)
- {
- if(sys_ftcamera == 1 && sys_ftcamera_ir4 != 0)
- {
- url = "/product/" + product + "/" + menu + "_fir4.html";
- }
- else{
- url = "/product/" + product + "/" + menu + "_fir.html";
- }
- }
- else
- {
- url = "/product/" + product + "/" + menu + "_nxpisp.html";
- }
- }
- else if(module_type == S5LM55_ISP_MODULE)
- {
- url = "/product/" + product + "/" + menu + "_nxpisp.html";
- }
- else if(module_type == CV2_ISP_MODULE)
- {
- if(is_ptz_micom != 0)
- {
- if(sys_ftcamera == 1 && sys_ftcamera_ir4 != 0)
- {
- if((sys_ftcamera_ir4 == 4 && sys_ftcamera_hwversion == 1) || (sys_ftcamera_ir4 == 2 && sys_ftcamera_nline == 1))
- {
- url = "/product/" + product + "/" + menu + "_fir_laser.html";
- }
- else {
- url = "/product/" + product + "/" + menu + "_fir4.html";
- }
- }
- else{
- url = "/product/" + product + "/" + menu + "_fir.html";
- }
- }
- else
- {
- url = "/product/" + product + "/" + menu + "_nxpisp.html";
- }
- }
- if(readSetupByKey("SYS_IS_HOUSINGSPECIFIC") == 1){
- var val = readSetupByKey("SYS_MODULE_TYPE");
- if(val == NEXT_MODULE || val == SONYIS_MODULE){
- url = "/product/" + product + "/" + menu + "_housingeagle.html";
- }
- else{
- url = "/product/" + product + "/" + menu + "_housing.html";
- }
- }
- if(module_type == NXP_ISP_MODULE || module_type == HI_ISP_MODULE){
- url = "/product/" + product + "/" + menu + "_nxpisp.html";
- }
- if(module_type == HI3519A_ISP_MODULE && (readSetupByKey("SYS_BOARDID") & 0xF00F) == 0xB003){
- url = "/product/" + product + "/" + menu + "_nxpisp.html";
- }
- }
-
- if(menu == "videoinformation"){
- if(parseInt(readSetupByKey("VID_MAX_STREAM_OF_ONE_CHANNEL")) == 2)
- {
- url = "/product/" + product + "/" + menu + "_2sub.html";
- }
- else if(readSetupByKey("SYS_MODE") != 0){ // decoder system
- url = "/product/" + product + "/" + menu + "_dec.html";
- }
- }
- if(menu == "videoencode"){
- if(parseInt(readSetupByKey("VID_MAX_STREAM_OF_ONE_CHANNEL")) == 2)
- {
- url = "/product/" + product + "/" + menu + "_2sub.html";
- }
- }
- if(menu == "videoaudio") {
- if((parseInt(boardid) & 0xF000) == 0x3000 || (parseInt(boardid) & 0xF000) == 0xB000)
- url = "/product/" + product + "/" + menu + "_3500.html";
- }
-
- if(menu == "networkddns"){
- if(parseInt(readSetupByKey("SYS_COMMAX_DDNS")) == 1)
- {
- url = "/product/" + product + "/" + menu + "_commax.html";
- }
- }
- if(menu == "ptzpositionosd"){
- if(parseInt(readSetupByKey("SYS_IS_PVOSD_EXTENSION")) == 1)
- {
- url = "/product/" + product + "/" + menu + "_ex.html";
- }
- }
- if(menu == "ptztracking"){
- if(parseInt(readSetupByKey("SYS_IS_OBJECT_DETECT")) == 1)
- {
- url = "/product/" + product + "/" + menu + "_od.html";
- }
- }
-
- if(menu == "eventnotification") {
- if(boardid == 0x3003)
- url = "/product/" + product + "/" + menu + "_3500d.html";
- }
- if(menu == "systemsystemid") {
- if(readSetupByKey("SYS_OSD_PREVIEW") == 1) {
- url = "/product/" + product + "/" + menu + "_preview.html";
- }
- }
- if(menu == "networkftp") {
- if(readSetupByKey("SYS_IS_BNB_SPECIFIC") == 1) {
- url = "/product/" + product + "/" + menu + "_bnb.html";
- }
- }
- }
- if (menu == "eventlpr") {
- if(readSetupByKey("SYS_USE_LPR") == 1) {
- url = "/product/" + product + "/" + menu + "2.html";
- }
- if(readSetupByKey("SYS_USE_GIT_LPR") == 1){
- url = "/product/" + product + "/" + menu + "git.html";
- }
- }
- if (menu == "eventobjectdetection") {
- if(readSetupByKey("SYS_IS_OBJECT_DETECT") == 1) {
- url = "/product/" + product + "/" + menu + ".html";
- }
- }
- if((readSetupByKey("SYS_IS_HATTLELAND_SPEC")) == 1){
- $(".LAN_686").attr('class', 'LAN_031');
- }
- contents = ajaxGet(url);
- $("#TSetupContents").html(contents);
- // set
- $("a#" + menu).parent().parent().parent(".menuWrap").addClass("on");
- $("a#" + menu).addClass("on");
- $("a#" + menu).children("img").attr("src", "/resources/img/btn45_N.gif");
- }
- function T_LoadSetupItem(name)
- {
- contents = ajaxGet("/setup-item/" + name + ".html");
- $("#TSetupItemList").append(contents);
- }
- function T_LiveInit(product)
- {
- alert("T_LiveInit");
- }
- function T_SetupInit(menu)
- {
- //loadModel();
- loadSetupTemplate(PRODUCT);
-
- if(!isSupportMenu(menu)) {
- alert("TODO: 지원하지 않는 페이지일 경우 redirect 해야 한다.");
- }
- T_SelectMenu(PRODUCT, menu);
- initLoading();
- if(startSetup() == undefined) {
- initLanguage();
- beautify();
- }
- if(SUPPORT_MULTI_DEVICE_DETECTION_CAM_TYPE == support_multi_device_type) {
- $("[name=subcam-text]").text(GetLan(1060));
- $("[name=maincam-text]").text(GetLan(1064));
- }
- else if(SUPPORT_MULTI_DEVICE_PTZ_TYPE == support_multi_device_type) {
- $("[name=subcam-text]").text(GetLan(1064));
- $("[name=maincam-text]").text(GetLan(1060));
- }
- else {
- ;
- }
-
- contents = ajaxGet("/resources/oem/title.html");
- if(contents){
- document.title = contents;
- // $("#page_title").html(contents);
- }
- else{
- document.title = readSetupByKey("SYS_SYSTEMID");
- if(document.title == ""){
- document.title = "Video Surveillance";
- }
- }
- contents = ajaxGet("/resources/oem/url.html");
- if(!contents){
- contents = ajaxGet("/bitmap/oem/logo.gif");
- if (!contents){
- contents = '<h1><img src="/resources/oem/logo.gif"/></h1>';
- } else {
- contents = '<h1><img src="/bitmap/oem/logo.gif"/></h1>';
- }
- }
- if((readSetupByKey("SYS_IS_HATTLELAND_SPEC")) == 1){
- contents3 = '<h3><img src="/resources/oem/logo2.gif"/></h3>';
- document.getElementById('logoarea1').style.display = "";
- $("#logoarea1").html(contents3);
- } else {
- document.getElementById('logoarea1').style.display = "none";
- }
- if(readSetupByKey("SYS_IS_SYSPRO_SPECIFIC") != 1) {
- $("#logoarea").html(contents);
- }
- if(parseInt(readSetupByKey("SYS_IS_HAPCHEON_SPECIFIC")) == 1){
- document.getElementById('logout').style.display = "";
- }
- }
- function T_Term()
- {
- terminateSetup();
- }
- function T_Init()
- {
- initalizeSetup();
- }
- function initLoading()
- {
- // $("#PopupMessage").html("").hide();
- $("#PopupMessage").html("<img src=\"/resources/img/loading.gif\"></img>").hide();
- }
- function showLoading()
- {
- var popup = $("#PopupMessage");
- width = popup.width();
- height = popup.height();
-
- popup.css("position","absolute")
- .css("z-index","10001")
- .css("top","30%")
- .css("left","50%")
- .css("margin-left", -1 * width / 2)
- .css("margin-top", -1 * height / 2);
- popup.show();
- }
- function hideLoadingDelay(delay)
- {
- setTimeout(function() { $("#PopupMessage").hide(); }, delay);
- }
- /*****************************************************************************/
- function GetVideoAlgorithm(boardid, sysmode, sub, force_detection_cam, cb)
- {
- if (cb == undefined)
- {
- if (sysmode == 1)
- {
- return parseInt(readSetupByKey("VID_CURDECALGORITHM"));
- }
- else
- {
- if (((boardid & 0xffff) == 0xB001) || (force_detection_cam == 1))
- {
- if (sub == 0) return parseInt(readSetupByKey("VID_ALGORITHM"));
- else if (sub == 1) return parseInt(readSetupByKey("VI1_ALGORITHM"));
- else if (sub == 2) return parseInt(readSetupByKey("VI2_ALGORITHM"));
- else if (sub == 3) return parseInt(readSetupByKey("VI3_ALGORITHM"));
- else if (sub == 4) return parseInt(readSetupByKey("VID_DUALALGORITHM"));
- else if (sub == 5) return parseInt(readSetupByKey("VI1_DUALALGORITHM"));
- else if (sub == 6) return parseInt(readSetupByKey("VI2_DUALALGORITHM"));
- else if (sub == 7) return parseInt(readSetupByKey("VI3_DUALALGORITHM"));
- else if (sub == 8) return parseInt(readSetupByKey("VI4_ALGORITHM"));
- else if (sub == 9) return parseInt(readSetupByKey("VI4_DUALALGORITHM"));
- else return parseInt(readSetupByKey("VID_ALGORITHM"));
- }
- else
- {
- if (sub == 0) return parseInt(readSetupByKey("VID_ALGORITHM"));
- else if (sub == 1) return parseInt(readSetupByKey("VID_DUALALGORITHM"));
- else if (sub == 2) return parseInt(readSetupByKey("VID_TRIPLEALGORITHM1"));
- else if (sub == 3) return parseInt(readSetupByKey("VID_TRIPLEALGORITHM2"));
- else return parseInt(readSetupByKey("VID_ALGORITHM"));
- }
- }
- }
- else
- {
- if (sysmode == 1)
- {
- readSetupByKeyAsync("VID_CURDECALGORITHM", cb);
- }
- else
- {
- if (((boardid & 0xffff) == 0xB001) || (force_detection_cam == 1))
- {
- if (sub == 0) readSetupByKeyAsync("VID_ALGORITHM", cb);
- else if (sub == 1) readSetupByKeyAsync("VI1_ALGORITHM", cb);
- else if (sub == 2) readSetupByKeyAsync("VI2_ALGORITHM", cb);
- else if (sub == 3) readSetupByKeyAsync("VI3_ALGORITHM", cb);
- else if (sub == 4) readSetupByKeyAsync("VID_DUALALGORITHM", cb);
- else if (sub == 5) readSetupByKeyAsync("VI1_DUALALGORITHM", cb);
- else if (sub == 6) readSetupByKeyAsync("VI2_DUALALGORITHM", cb);
- else if (sub == 7) readSetupByKeyAsync("VI3_DUALALGORITHM", cb);
- else if (sub == 8) readSetupByKeyAsync("VI4_ALGORITHM", cb);
- else if (sub == 9) readSetupByKeyAsync("VI4_DUALALGORITHM", cb);
- else readSetupByKeyAsync("VID_ALGORITHM", cb);
- }
- else
- {
- if (sub == 0) readSetupByKeyAsync("VID_ALGORITHM", cb);
- else if (sub == 1) readSetupByKeyAsync("VID_DUALALGORITHM", cb);
- else if (sub == 2) readSetupByKeyAsync("VID_TRIPLEALGORITHM1", cb);
- else if (sub == 3) readSetupByKeyAsync("VID_TRIPLEALGORITHM2", cb);
- else readSetupByKeyAsync("VID_ALGORITHM", cb);
- }
- }
- }
- }
|