

<div class="detailCon">
	<ul class="line firUl">
		<li class="line lineD">
			<label id="exSwitchDes" class="des desECED">{%label.accessExceDetect%}</label>
			<div id="exSwitch" class="switchCon">
				<i class="switchBg"></i>
				<i class="switchBall"></i>
			</div>
			<label class="des desH">ON</label>
		</li>
	</ul>
	<div style="position:relative;z-index:1;">
		<div id="hidebg"></div>
	</div>
	<ul class="line">
		<li class="line lineD">
			<label class="des desECED" for="accessFailTime">{%label.accessLoginTime%}</label>
			<input class="text textA4" id="accessFailTime" maxlength="2" />
			<span class="tip">{%label.accessFailTime%}</span><span class="tip">{%label.lBrackets%}{%label.accessTimeRange%}{%label.rBrackets%}</span>
		</li>
	</ul>
	<div class="actionBarDiv">
		<div class="actionTitleDiv">
			<label class="actionTitle">{%label.handleWay%}</label>
		</div>
		<div class="handleWay" id="handleWay">
			<ul class="Line">
				<!--li class="Line lineFirst">
					<i name="showInfo" id="sendEmail" class="chObj" value="-1"></i>
					<label class="des desA">{%label.sendEmail%}</label>
				</li-->
				<li class="Line lineE">
					<i name="showInfo" id="msgPush" class="chObj" value="1"></i>
					<label class="des desA">{%label.msgPush%}</label>
				</li>
				<!--li class="Line lineLast">
					<i name="showInfo" id="triggerAlarmDevice" class="chObj" value="0"></i>
					<label class="des desA">{%label.triggerAlarmDevice%}</label>
				</li-->
			</ul>
		</div>
	</div>
	<div class="funcBtnCon">
		<input id="save" type="button" class="subBtn btnA" value="{%btn.save%}" />
	</div>
</div>
<script type="text/javascript">function init(){function n(a,b){var c="";closeNoteAll();switch(parseInt(a)){case ENONE:return!0;case IPCABENERR:c=errStr.ipcAbEnErr;break;case IPCABMAXERR:c=errStr.ipcAbMaxErr;break;case IPCABAPPENERR:c=errStr.ipcAbAppenErr;break;case IPCABCLTENERR:c=errStr.ipcAbCltenErr;break;case IPCSYSRPARAERR:c=errStr.ipcSysRparaErr;break;case IPCSYSRCONFERR:c=errStr.ipcSysRconfErr;break;case IPCUBUSCONNFAIL:c=errStr.ipcUbusConnFail;break;case IPCUBUSCALLERR:c=errStr.ipcUbusCallErr;break;case IPCUMGUESTNAUTH:c=
errStr.invPermissionDenied;break;case IPCFILEOPENERR:c=errStr.ipcFileOpenErr;break;case IPCDIRMKERR:c=errStr.ipcDirMkErr;break;case IPCDATESETERR:c=errStr.ipcDateSetErr;break;case IPCFUNCPARAEXPT:c=errStr.ipcFuncParaExpt;break;case IPCUCCONVERR:c=errStr.ipcUcConvErr;break;case IPCNOTIFYEMAILENERR:case IPCNOTIFYALARMENERR:case IPCNOTIFMSGPUSHENERR:showStr=errStr.IPCHandleInalid;break;default:c=errStr.unknown}closeToast();showAlert(c);return!1}function w(a,b){return 1>a.length?(showNote(b,errStr.extLoginTimeNull),
!1):!1==checkNum(a)?(showNote(b,errStr.extLoginTimeIll),!1):!1==checkNumRange(parseInt(a,10),x,y)?(showNote(b,errStr.extLoginTimeOverflow),!1):!0}function z(){var a={},b=k.value;a[d]={};a[d][e]={};if(!1==w(b,"accessFailTime"))return!1;a[d][e][p]=parseInt(b,10);a[d][e][q]=1==l.state?f:m;g&&(a[d][e][r]="true"==s.getAttribute("checked")?f:m);h&&(a[d][e][t]="true"==u.getAttribute("checked")?f:m);showToast("loading");$.modify(a,function(a){!0==n(a[ERR_CODE])&&(showToast("success"),k.value=parseInt(b,10))})}
function v(a){var b=document.getElementById("hidebg");0==a?(b.style.display="block",b.style.height=getoffset(id("save")).top-getoffset(id("accessFailTime")).top+"px"):b.style.display="none"}var y=3,x=10,h=function(a){a=$.linkageCapability[a];return 20>a.length?!1:"1"==a[a.length-20]?!0:!1}(uciLinkageCapability.optName.msg_push_capability),g=!1,d=uciUnusualDetection.fileName,e=uciUnusualDetection.secName.loginErr,q=uciUnusualDetection.optName.enabled,p=uciUnusualDetection.optName.maxNumErr,r=uciUnusualDetection.optName.emailEnabled,
t=uciUnusualDetection.optName.msgPushEnabled,f=uciUnusualDetection.optValue.enableVal.on,m=uciUnusualDetection.optValue.enableVal.off,s=id("sendEmail");id("triggerAlarmDevice");var u=id("msgPush"),l;id("exSwitchDes");var k=id("accessFailTime");(function(){var a={},b=0;initCheckInput("hd");id("save").onclick=z;a[d]={};a[d][NAME]=[e];g||h?g?h||$("#msgPush").parent().hide():$("#sendEmail").parent().hide():$(".actionBarDiv").hide();$.query(a,function(a){!0==n(a[ERR_CODE])&&(!0==$.local?l=new Switch("exSwitch",
0,v):(b=a[d][e][q]==f?1:0,l=new Switch("exSwitch",b,v),k.value=a[d][e][p],g&&(b=a[d][e][r]==f,changeCheckInput(s,b)),h&&(b=a[d][e][t]==f,changeCheckInput(u,b))),showDetailCon())})})();initCheckInput("showInfo",null)}init();
</script><style type="text/css">label.desECED{font-size:13px;color:#666;line-height:30px;width:130px;margin-right:4px}</style>