HanvonAttendanceService/device-api-dump/sys_setting.html

1370 lines
62 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE HTML>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title class="lang" key="device_setting">system setting</title>
<link href="resources/plugins/bootstrap-3.3.0/css/bootstrap.min.css" rel="stylesheet"/>
<link href="resources/css/common.css" rel="stylesheet"/>
<style>
.content-box {
display: flex;
flex-direction: column;
align-items: stretch;
position: relative;
border: 2px dashed #ccc;
padding: 1em;
background-color: #f9f9f9;
border-radius: 10px / 18px;
margin: 1em;
margin-top: 25px;
}
.tag {
position: absolute;
top: -18px;
left: 12px;
background-color: #f9f9f9;
padding: 0.3em 1em;
z-index: 1;
border: 2px solid #888;
border-radius: 15px / 30px;
overflow: hidden;
}
.content {
font-size: 1rem;
line-height: 1.5;
margin-left: 20px;
margin-top: 25px;
}
.itemlabel {
width: 200px;
display: inline-block;
text-align: right;
}
.net_input
{
width: 120px;
}
input.month_day {
width: 120px;
}
input.hour_minute {
width: 120px;
}
.btn_row
{
width: 100%;
display: flex;
position: relative;
margin: 1em;
}
</style>
</head>
<body>
<div class="content_main">
<div id="iframe_home" class="iframe cur">
<div class="content-box" id="item_elevator_control">
<div class="tag"><label class="lang" key="UISTR_ELEVATOR_CONTROL">elevator control</label></div>
<div class="content">
<div class="col-md-4">
<div>
<label for="elevator_control" class="lang itemlabel" key="UISTR_ELEVATOR_CONTROL" >elevator control</label>
<input id="elevator_control" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="floors" class="lang itemlabel" key="UISTR_FLOOR_NUMBER">floors</label>
<input id="floors" class="alg_input" value="48" max="100" min="0" step="1" type="number" oninput="if (value > 100) {value=100} else if (value < 0) {value = 0}">
</div>
</div>
<div class="col-md-4">
<div>
<label for="have_g_floor" class="lang itemlabel" key="UISTR_G_FLOOR" >G Floor</label>
<input id="have_g_floor" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="base_floor" class="lang itemlabel" key="UISTR_START_FLOOR">Start Floor</label>
<select class="alg_input" id="base_floor">
<option class="lang" key="" value="0">1/G</option>
<option class="lang" key="" value="1">-1</option>
<option class="lang" key="" value="2">-2</option>
<option class="lang" key="" value="3">-3</option>
<option class="lang" key="" value="4">-4</option>
<option class="lang" key="" value="5">-5</option>
<option class="lang" key="" value="5">2</option>
<option class="lang" key="" value="5">3</option>
<option class="lang" key="" value="5">4</option>
<option class="lang" key="" value="5">5</option>
</select>
</div>
</div>
</div>
</div>
<div class="content-box">
<div class="tag"><label class="lang" key="UISTR_ENROLL_OPTION">Enroll Option</label></div>
<div class="content">
<div class="col-md-4">
<div>
<label for="rfid_free_reg" class="lang itemlabel" key="UISTR_RFID_FREE_REG" >RFID Free Registration</label>
<input id="rfid_free_reg" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="rfid_auto_reg" class="lang itemlabel" key="UISTR_RFID_AUTO_REG" >Swipe to register face</label>
<input id="rfid_auto_reg" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="face_double_check" class="lang itemlabel" key="UISTR_FACE_DOUBLEDCHECK" >Face Duplication Check</label>
<input id="face_double_check" class="alg_input" value="1" type="checkbox">
</div>
</div>
<div class="col-md-4">
<div>
<label for="reg_card_1" class="lang itemlabel" key="UISTR_ADMIN_RFID" >Register RFID</label>1
<input id="reg_card_1" class="alg_input" value="">
</div>
<div>
<label for="reg_card_2" class="lang itemlabel" key="UISTR_ADMIN_RFID" >Register RFID</label>2
<input id="reg_card_2" class="alg_input" value="">
</div>
<div>
<label for="reg_card_3" class="lang itemlabel" key="UISTR_ADMIN_RFID" >Register RFID</label>3
<input id="reg_card_3" class="alg_input" value="">
</div>
</div>
</div>
</div>
<div class="content-box">
<div class="tag"><label class="lang" key="UISTR_Shift">Shift</label></div>
<div class="content">
<div class="col-md-4">
<div>
<label for="reverifytime" class="lang itemlabel" key="UISTR_REVERIFY_TIME" >Re verify </label>
<input id="reverifytime" class="alg_input" value="60" max="99999999" min="0" step="1" type="number" oninput="if (value > 4294967295) {value=4294967295} else if (value < 0) {value = 0}">
</div>
<div>
<label for="glog_warning" class="lang itemlabel" key="UISTR_LOG_WARNING" >Log Warning</label>
<input id="glog_warning" class="alg_input" value="1000" max="99999999" min="0" step="1" type="number" oninput="if (value > 4294967295) {value=4294967295} else if (value < 0) {value = 0}">
</div>
<div>
<label for="use_logphoto" class="lang itemlabel" key="UISTR_LOGPHOTO" >Save Photo</label>
<select class="alg_input" id="use_logphoto">
<option class="lang" key="UISTR_NO" value="0">no</option>
<option class="lang" key="UISTR_YES" value="1">yes</option>
<option class="lang" key="UISTR_ANY_SNAPSHOT" value="2">Random Snap</option>
</select>
</div>
<div>
<label for="stranger_photo" class="lang itemlabel" key="UISTR_Stranger_Photo" >Stranger Photo</label>
<input id="stranger_photo" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="verifyfail_hint" class="lang itemlabel" key="UISTR_VERIFY_FAIL_HINT" >Verify fail Hint</label>
<input id="verifyfail_hint" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="selfchecklog" class="lang itemlabel" key="UISTR_SELF_CHECK_LOG" >Self-service check log</label>
<input id="selfchecklog" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="default_shift" class="lang itemlabel" key="UISTR_DEFAULT_SHIFT" >Default Shift</label>
<input id="default_shift" class="alg_input" value="1" max="12" min="0" step="1" type="number" oninput="if (value > 12) {value=1} else if (value < 0) {value = 0}">
</div>
</div>
<div class="col-md-4">
<div>
<label for="shift_weekend" class="lang itemlabel" key="UISTR_WEEKEND" >Weekend</label>
<select class="alg_input" id="shift_weekend">
<option class="lang" key="UISTR_WEEKEND_SAT_SUN" value="0">Sat.&Sun.off</option>
<option class="lang" key="UISTR_WEEKEND_SUN" value="1">Sun. off</option>
<option class="lang" key="UISTR_WEEKEND_SATHALF_SUNFULL" value="2">Sat.half,Sun.full</option>
<option class="lang" key="UISTR_WEEKEND_FRI" value="3">Fri.off</option>
<option class="lang" key="UISTR_WEEKEND_FRI_SAT" value="4">Fri.&Sat.off</option>
<option class="lang" key="UISTR_NO" value="5">No</option>
</select>
</div>
<div>
<label for="shift_weekend_ot" class="lang itemlabel" key="UISTR_WEEKEND_OVERTIME" >Weekend Overtime</label>
<input id="shift_weekend_ot" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="auto_sign" class="lang itemlabel" key="UISTR_SignTimes" >Auto sign</label>
<select class="alg_input" id="auto_sign">
<option class="lang" key="UISTR_NO" value="0">No</option>
<option class="lang" key="UISTR_IN_OUT_ADAY" value="1">Inout day</option>
<option class="lang" key="UISTR_IN_A_DAY" value="2">In a day</option>
<option class="lang" key="UISTR_Out_aday" value="3">Out a day</option>
<option class="lang" key="UISTR_ONLYIN" value="4">Only in</option>
<option class="lang" key="UISTR_OnlyOUT" value="5">Only out</option>
</select>
</div>
<div>
<label for="excel_password" class="lang itemlabel" key="UISTR_EXCEL_PWD" >Excel Pwd</label>
<input id="excel_password" class="alg_input" type="password" style="width: 120px;">
</div>
<div>
<label for="allow_latetime" class="lang itemlabel" key="UISTR_Late_time" >Late time</label>
<input id="allow_latetime" class="alg_input" value="10" max="60" min="0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="allow_earlytime" class="lang itemlabel" key="UISTR_lea_time" >Lea time</label>
<input id="allow_earlytime" class="alg_input" value="10" max="60" min="0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="reverify_nolock" class="lang itemlabel" key="UISTR_REVERIFY_NOTOPEN" >Reverify not Open door</label>
<input id="reverify_nolock" class="alg_input" value="1" type="checkbox">
</div>
</div>
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="tag"><label class="lang" key="UISTR_TIME_SETTING">Time</label></div>
<div class="content">
<div class="col-md-4">
<div>
<label for="time_format" class="lang itemlabel" key="UISTR_TIME_FORMAT">Time fmt</label>
<select class="alg_input" id="time_format">
<option class="lang" key="" value="0">24H</option>
<option class="lang" key="" value="1">12H</option>
</select>
</div>
<div>
<label for="date_format" class="lang itemlabel" key="UISTR_DATE_FORMAT">Date fmt</label>
<select class="alg_input" id="date_format">
<option class="lang" key="UISTR_DATEFMT_NOEN" value="0">Y/M/D</option>
<option class="lang" key="UISTR_DATEFMT_EN" value="1">M/D/Y</option>
<option class="lang" key="UISTR_DATEFMT_OTHER" value="2">D/M/Y</option>
</select>
</div>
<div>
<label for="use_dst" class="lang itemlabel" key="UISTR_MAINMENU_USE_DST">DST</label>
<input id="use_dst" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="dst_start" class="lang itemlabel" key="UISTR_MAINMENU_DST_START">DST Start</label>
<input id="dst_start" class="alg_input month_day" value="12/30" type="text" pattern="[0-1][0-9]/[0-3][0-9]" title="Please enter the month/day format, such as 12/30">
</div>
<div>
<label for="dst_end" class="lang itemlabel" key="UISTR_MAINMENU_DST_END">DST End</label>
<input id="dst_end" class="alg_input month_day" value="12/30" type="text" pattern="[0-1][0-9]/[0-3][0-9]" title="Please enter the month/day format, such as 12/30">
</div>
</div>
<div class="col-md-4">
<div>
<label for="use_ntp" class="lang itemlabel" key="UISTR_NTP">NTP</label>
<input id="use_ntp" class="alg_input" value="0" type="checkbox">
</div>
<div>
<label for="ntp_timezone" class="lang itemlabel" key="UISTR_TIMEZONE">timezone</label>
<select class="alg_input" id="ntp_timezone">
<option class="lang" key="" value="0">UTC+0</option>
<option class="lang" key="" value="1">UTC+1</option>
<option class="lang" key="" value="2">UTC+2</option>
<option class="lang" key="" value="3">UTC+3</option>
<option class="lang" key="" value="4">UTC+4</option>
<option class="lang" key="" value="5">UTC+5</option>
<option class="lang" key="" value="6">UTC+6</option>
<option class="lang" key="" value="7">UTC+7</option>
<option class="lang" key="" value="8">UTC+8</option>
<option class="lang" key="" value="9">UTC+9</option>
<option class="lang" key="" value="10">UTC+10</option>
<option class="lang" key="" value="11">UTC+11</option>
<option class="lang" key="" value="12">UTC+12</option>
<option class="lang" key="" value="13">UTC-1</option>
<option class="lang" key="" value="14">UTC-2</option>
<option class="lang" key="" value="15">UTC-3</option>
<option class="lang" key="" value="16">UTC-4</option>
<option class="lang" key="" value="17">UTC-5</option>
<option class="lang" key="" value="18">UTC-6</option>
<option class="lang" key="" value="19">UTC-7</option>
<option class="lang" key="" value="20">UTC-8</option>
<option class="lang" key="" value="21">UTC-9</option>
<option class="lang" key="" value="22">UTC-10</option>
<option class="lang" key="" value="23">UTC-11</option>
<option class="lang" key="" value="24">UTC-12</option>
<option class="lang" key="" value="25">UTC+3:30</option>
<option class="lang" key="" value="26">UTC+4:30</option>
<option class="lang" key="" value="27">UTC+5:30</option>
<option class="lang" key="" value="28">UTC+5:45</option>
<option class="lang" key="" value="29">UTC+6:30</option>
<option class="lang" key="" value="30">UTC+9:30</option>
<option class="lang" key="" value="31">UTC-3:30</option>
<option class="lang" key="" value="32">UTC-4:30</option>
</select>
</div>
<div>
<label for="reboottime1" class="lang itemlabel" key="UISTR_REBOOT_TIME1">Reboot Time1</label>
<input id="reboottime1" class="alg_input hour_minute" value="12:30" type="text" pattern="^([01]?[0-9]|2[0-3]):[0-5][0-9]$" title="Please enter the correct time format, such as 12:30">
</div>
<div>
<label for="reboottime2" class="lang itemlabel" key="UISTR_REBOOT_TIME2">Reboot Time2</label>
<input id="reboottime2" class="alg_input hour_minute" value="12:30" type="text" pattern="^([01]?[0-9]|2[0-3]):[0-5][0-9]$" title="Please enter the correct time format, such as 12:30">
</div>
<div>
<label for="reboottime3" class="lang itemlabel" key="UISTR_REBOOT_TIME3">Reboot Time3</label>
<input id="reboottime3" class="alg_input hour_minute" value="12:30" type="text" pattern="^([01]?[0-9]|2[0-3]):[0-5][0-9]$" title="Please enter the correct time format, such as 12:30">
</div>
</div>
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="tag"><label class="lang" key="UISTR_BELL_SET">Bell</label></div>
<div class="content">
<div class="col-md-4">
<div>
<label for="bellcount" class="lang itemlabel" key="UISTR_BELL_COUNT" >Bell Times</label>
<input id="bellcount" class="alg_input" value="0" max="100" min="0" step="1" type="number" oninput="if (value > 100) {value=100} else if (value < 0) {value = 0}">
</div>
<div>
<label for="ring_style" class="lang itemlabel" key="UISTR_RING_STYLE" >Bell Style</label>
<select class="alg_input" id="ring_style">
<option value="0">________</option>
<option value="1">__ __ __</option>
</select>
</div>
</div>
<div class="col-md-4">
<div>
<label for="belloutput" class="lang itemlabel" key="UISTR_BELL_OUTPUT" >Bell Output</label>
<select class="alg_input" id="belloutput">
<option class="lang" key="UISTR_NO" value="0">no</option>
<option class="lang" key="UISTR_BELL" value="1">bell</option>
</select>
</div>
</div>
</div>
</div>
<div class="content-box">
<div class="tag"><label><span class="lang" key="UISTR_SYSTEM_SETTING">System</span>=&gt;<span class="lang" key="UISTR_DEVICE_SETUP">Device setup</span></label></div>
<div class="content">
<div class="col-md-4">
<div class="mb-3" id="div_language">
<label for="language" class="lang itemlabel" key="UISTR_LANGUAGE">Language</label>
<select class="alg_input" id="language">
</select>
</div>
<div>
<label for="volume" class="lang itemlabel" key="UISTR_VOICE_OUT">Voice</label>
<input id="volume" class="alg_input" value="8" max="10" min="0" step="1" type="number" oninput="if (value > 10) {value=10} else if (value < 0) {value = 0}">
</div>
<div>
<label for="tts_voice" class="lang itemlabel" key="UISTR_TTS_VOICE">Play name voice</label>
<input id="tts_voice" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="multifaces" class="lang itemlabel" key="UISTR_MULTI_FACES">multi faces</label>
<input id="multifaces" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="showresulttime" class="lang itemlabel" key="UISTR_RESULTTIME">result time</label>
<input id="showresulttime" class="alg_input" value="5" max="99" min="0" step="1" type="number" oninput="if (value > 99) {value=99} else if (value < 0) {value = 0}">
</div>
<div>
<label for="screensavertime" class="lang itemlabel" key="UISTR_ADVERTTIME">advert time</label>
<input id="screensavertime" class="alg_input" value="60" max="99999999" min="0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
</div>
<div class="col-md-4">
<div>
<label for="sleeptime" class="lang itemlabel" key="UISTR_SLEEP">sleep time</label>
<input id="sleeptime" class="alg_input" value="15" max="99999999" min="0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="screensaver_wakeup" class="lang itemlabel" key="UISTR_Screen_Saver_Wakeup">screen saver wakeup</label>
<select class="alg_input" id="screensaver_wakeup">
<option class="lang" key="UISTR_VERIFY_FACE" value="0">face</option>
<option class="lang" key="UISTR_TOUCH" value="1">touch</option>
</select>
</div>
<div>
<label for="face_wakeup_seconds" class="lang itemlabel" key="UISTR_FACE_WAKEUP_SECONDS">face wakeup seconds</label>
<input id="face_wakeup_seconds" class="alg_input" value="3" max="10" min="0" step="1" type="number" oninput="if (value > 10) {value=10} else if (value < 0) {value = 0}">
</div>
<div>
<label for="label_style" class="lang itemlabel" key="UISTR_Label_Style">label style</label>
<select class="alg_input" id="label_style">
<option class="lang" key="UISTR_Default" value="0">default</option>
<option class="lang" key="UISTR_Gym_Style" value="1">gym style</option>
<option class="lang" key="UISTR_MESSAGE_BAR" value="2">message bar</option>
</select>
</div>
<div>
<label for="identify_distance" class="lang itemlabel" key="UISTR_IDENTIFY_DISTANCE">identify distance</label>
<select class="alg_input" id="identify_distance">
<option class="lang" key="UISTR_IDENTIFY_DISTANCE_SHORT" value="0">short</option>
<option class="lang" key="UISTR_IDENTIFY_DISTANCE_MIDDLE" value="1">middle</option>
<option class="lang" key="UISTR_IDENTIFY_DISTANCE_LONG" value="2">long</option>
</select>
</div>
<div>
<label for="live_detect" class="lang itemlabel" key="UISTR_PREVENT_PHOTO">live check</label>
<input id="live_detect" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="show_avatar" class="lang itemlabel" key="UISTR_SHOW_AVATAR">show avatar</label>
<input id="show_avatar" class="alg_input" value="1" type="checkbox">
</div>
</div>
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="tag"><label ><span class="lang" key="UISTR_SYSTEM_SETTING">System</span>=&gt;<span class="lang" key="UISTR_ADVANCED_SETUP">Advanced setup</span></label></div>
<div class="content">
<div class="col-md-4">
<div>
<label for="managers" class="lang itemlabel" key="UISTR_MAXMANAGERS">max managers</label>
<input id="managers" class="alg_input" value="10" max="99999999" min="0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="verifymode" class="lang itemlabel" key="UISTR_DEVICE_VERIFY_MODE">device verify mode</label>
<select class="alg_input" id="verifymode">
</select>
</div>
<div>
<label for="use_qrcode" class="lang itemlabel" key="UISTR_QRCODE">qrcode</label>
<select class="alg_input" id="use_qrcode">
<option class="lang" key="UISTR_NO" value="0">no</option>
<option class="lang" key="UISTR_USE_QRCODE" value="1">vistor qrcode</option>
<option class="lang" key="UISTR_CARD_TO_QRCODE" value="2">card->qrcode</option>
<option class="lang" key="UISTR_SERVER_QRCODE" value="3">server qrcode</option>
</select>
</div>
<div>
<label for="hide_privacy" class="lang itemlabel" key="UISTR_Hide_Privacy">hide privacy</label>
<input id="hide_privacy" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="fcmatch_level" class="lang itemlabel" key="UISTR_1N_THRESHOLD">1:N threshold</label>
<input id="fcmatch_level" class="alg_input" value="52" max="99" min="0" step="1" type="number" oninput="if (value > 99) {value=99} else if (value < 0) {value = 0}">
</div>
<div>
<label for="live_treshold" class="lang itemlabel" key="UISTR_LIVE_THRESHOLD">live threshold</label>
<input id="live_treshold" class="alg_input" value="10" max="99" min="0" step="1" type="number" oninput="if (value > 99) {value=99} else if (value < 0) {value = 0}">
</div>
<div>
<label for="fpmatch_level" class="lang itemlabel" key="UISTR_MAINMENU_FP_Level">fp threshold</label>
<input id="fpmatch_level" class="alg_input" value="3" max="10" min="0" step="1" type="number" oninput="if (value > 10) {value=10} else if (value < 0) {value = 0}">
</div>
<div>
<label for="fps_peruser" class="lang itemlabel" key="UISTR_MAINMENU_USER_FPCNT">user fp count</label>
<input id="fps_peruser" class="alg_input" value="2" max="10" min="0" step="1" type="number" oninput="if (value > 10) {value=10} else if (value < 0) {value = 0}">
</div>
</div>
<!-- 第二列 -->
<div class="col-md-4">
<div>
<label for="wear_mask" class="lang itemlabel" key="UISTR_WEAR_MASK">wear mask</label>
<input id="wear_mask" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="mask_treshold" class="lang itemlabel" key="UISTR_MASK_THRESHOLD">mask threshold</label>
<input id="mask_treshold" class="alg_input" value="52" max="99" min="0" step="1" type="number" oninput="if (value > 99) {value=99} else if (value < 0) {value = 0}">
</div>
<div>
<label for="filllight" class="lang itemlabel" key="UISTR_FILLLIGHT">fill light</label>
<select class="alg_input" class="alg_input" id="filllight">
<option class="lang" key="UISTR_AUTO" value="0">AUTO</option>
<option class="lang" key="UISTR_ALWAYS_OFF" value="1">NC</option>
<option class="lang" key="UISTR_ALWAYS_ON" value="2">NO</option>
</select>
</div>
<div>
<label for="filllight_period" class="lang itemlabel" key="UISTR_Constant_light_Period">filllight_period</label>
<input id="filllight_period" class="alg_input time_range" value="00:00~00:00" style="width: 120px;" type="text" pattern="([0-1][0-9]|2[0-3]):[0-5][0-9]~([0-1][0-9]|2[0-3]):[0-5][0-9]" title="Please enter the start time~end time format, such as 11:30~12:30">
</div>
<div>
<label for="exposure_value" class="lang itemlabel" key="UISTR_EXPOSURE_VALUE">exposure_value</label>
<input id="exposure_value" class="alg_input" value="" max="100" min="0" step="1" type="number" oninput="if (value > 100) {value=100} else if (value < 0) {value = 0}">
</div>
<div>
<label for="palm_vein_level" class="lang itemlabel" key="UISTR_Palm_Vein_Level">palm_vein_level</label>
<input id="palm_vein_level" class="alg_input" value="52" max="99" min="0" step="1" type="number" oninput="if (value > 99) {value=99} else if (value < 0) {value = 0}">
</div>
<div>
<label for="palm_det_level" class="lang itemlabel" key="UISTR_Palm_Detect_Level">palm_det_level</label>
<input id="palm_det_level" class="alg_input" value="52" max="99" min="0" step="1" type="number" oninput="if (value > 99) {value=99} else if (value < 0) {value = 0}">
</div>
<div>
<label for="disable_face" class="lang itemlabel" key="UISTR_DIABLE_FACE">disable_face</label>
<input id="disable_face" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="online_debug" class="lang itemlabel" key="UISTR_DEBUG">online debug</label>
<input id="online_debug" class="alg_input" value="1" type="checkbox">
</div>
</div><!-- 第二列 -->
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="tag"><label class="lang" key="UISTR_MAINMENU_LOCK_OTHER">lock setting</label></div>
<div class="content">
<!-- 第一列 -->
<div class="col-md-4">
<div>
<label for="door_opentime" class="lang itemlabel" key="UISTR_OPENDOOR_DELAY">door_opentime</label>
<input id="door_opentime" class="alg_input" value="5" max="99999999" min="0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="door_sensor_type" class="lang itemlabel" key="UISTR_SENSORMODE">door_sensor_type</label>
<select class="alg_input" id="door_sensor_type">
<option class="lang" key="UISTR_SENSOR_NG" value="0">ng</option>
<option class="lang" key="UISTR_SENSOR_NC" value="1">nc</option>
<option class="lang" key="UISTR_SENSOR_NO" value="2">no</option>
</select>
</div>
<div>
<label for="door_alarm_time" class="lang itemlabel" key="UISTR_SENSORDELAY">door_alarm_time</label>
<input id="door_alarm_time" class="alg_input" value="5" max="99999999" min="0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="stranger_lock" class="lang itemlabel" key="UISTR_STRANGER_ACCESS">stranger_lock</label>
<input id="stranger_lock" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="door_password" class="lang itemlabel" key="UISTR_Door_Password">door_password</label>
<input id="door_password" class="alg_input" value="" max="99999999"0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="door_mutiopen" class="lang itemlabel" key="UISTR_MAINMENU_MULTIUSERS">multiusers</label>
<input id="door_mutiopen" class="alg_input" value="" max="99" min="0" step="1" type="number" oninput="if (value > 99) {value=99} else if (value < 0) {value = 0}">
</div>
<div>
<label for="door_antipass" class="lang itemlabel" key="UISTR_MAINMENU_LURK_PROC">door_antipass</label>
<select class="alg_input" id="door_antipass">
<option class="lang" key="UISTR_NO" value="0">no</option>
<option class="lang" key="UISTR_IN" value="1">in</option>
<option class="lang" key="UISTR_OUT" value="2">out</option>
<option class="lang" key="UISTR_Two_way" value="3">two way</option>
</select>
</div>
<div>
<label for="wiegand_output_mode" class="lang itemlabel" key="UISTR_WG_OUTPUT">wiegand_output_mode</label>
<select class="alg_input" id="wiegand_output_mode">
<option class="lang" key="UISTR_WG_TYPE_ID" value="0">id</option>
<option class="lang" key="UISTR_WG_TYPE_Card" value="1">card</option>
<option class="lang" key="UISTR_WG_TYPE_M_ID" value="2">m+id</option>
<option class="lang" key="UISTR_WG_TYPE_GROUPID" value="3">group id</option>
<option class="lang" key="UISTR_WG_TYPE_GROUP+ID" value="4">proup+id</option>
</select>
</div>
<div>
<label for="wiegand_output_bit" class="lang itemlabel" key="UISTR_WG_FORMAT">wiegand_output_bit</label>
<select class="alg_input" id="wiegand_output_bit">
<option class="lang" key="" value="0">26bit</option>
<option class="lang" key="" value="1">34bit</option>
<option class="lang" key="" value="2">42bit</option>
<option class="lang" key="" value="3">50bit</option>
<option class="lang" key="" value="4">58bit</option>
<option class="lang" key="" value="5">64bit</option>
</select>
</div>
<div>
<label for="access_times" class="lang itemlabel" key="UISTR_ACCESS_TIMES">Access times</label>
<input id="access_times" class="alg_input" value="0" max="65535" min="0" step="1" type="number" oninput="if (value > 65535) {value=65535} else if (value < 0) {value = 0}">
</div>
<div>
<label for="wiegand_port" class="lang itemlabel" key="UISTR_WG_PORT">wiegand port</label>
<select class="alg_input" id="wiegand_port">
<option class="lang" key="UISTR_WG_PORT_OUTPUT" value="0">Output</option>
<option class="lang" key="UISTR_WG_PORT_input" value="1">Input</option>
<option class="lang" key="UISTR_DOOR_SENSOR" value="2">Doorsensor</option>
</select>
</div>
</div>
<!-- 第二列 -->
<div class="col-md-4">
<div>
<label for="card_disp_format" class="lang itemlabel" key="UISTR_CARD_DISP_FORMAT">card_disp_format</label>
<select class="alg_input" id="card_disp_format">
<option class="lang" key="UISTR_DIGITAL" value="0">digital</option>
<option class="lang" key="UISTR_WIEGAND" value="1">wiegand</option>
<option class="lang" key="UISTR_HEX" value="2">hex</option>
</select>
</div>
<div>
<label for="card_reversal" class="lang itemlabel" key="UISTR_CARD_REVERSAL">card_reversal</label>
<input id="card_reversal" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="wg_reversal" class="lang itemlabel" key="UISTR_WG_OUTPUT_REVERSAL">wg reversal</label>
<input id="wg_reversal" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="outwg_shot" class="lang itemlabel" key="UISTR_OUTWG_SHOT">outwg_shot</label>
<input id="outwg_shot" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="door_interlock" class="lang itemlabel" key="UISTR_MAINMENU_Interlock">door_interlock</label>
<input id="door_interlock" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="door_firealarmin" class="lang itemlabel" key="UISTR_MAINMENU_ALARM_PROC">door_firealarmin</label>
<input id="door_firealarmin" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="door_trycount" class="lang itemlabel" key="UISTR_MAINMENU_VERIFY_FAILED_COUNT">door_trycount</label>
<input id="door_trycount" class="alg_input" value="" max="99" min="0" step="1" type="number" oninput="if (value > 99) {value=99} else if (value < 0) {value = 0}">
</div>
<div>
<label for="timezone_punchs" class="lang itemlabel" key="UISTR_PUNCHTIMES_IN_TIMEZONE">timezone_punchs</label>
<input id="timezone_punchs" class="alg_input" value="" max="255" min="0" step="1" type="number" oninput="if (value > 255) {value=255} else if (value < 0) {value = 0}">
</div>
<div>
<label for="access_denied_nolog" class="lang itemlabel" key="UISTR_DENIED_NOLOG">access_denied_nolog</label>
<input id="access_denied_nolog" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="outof_notimzone_denied" class="lang itemlabel" key="UISTR_OUTOF_NOTIMZONE_DENIED">outof_notimzone_denied</label>
<input id="outof_notimzone_denied" class="alg_input" value="1" type="checkbox">
</div>
</div><!-- 第二列 -->
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="tag"><label><span class="lang" key="UISTR_COMMUNICATION_SETTING">Comm set</span>=&gt;<span class="lang" key="UISTR_SERIALFUN">serial</span></label></div>
<div class="content">
<!-- 第一列 -->
<div class="col-md-4">
<div>
<label for="deviceid" class="lang itemlabel" key="UISTR_DEVICE_ID">deviceid</label>
<input id="deviceid" class="alg_input" value="1" max="9999" min="0" step="1" type="number" oninput="if (value > 9999) {value=9999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="netportnum" class="lang itemlabel" key="UISTR_PORT_NUM">netportnum</label>
<input id="netportnum" class="alg_input" value="5005" max="99999999" min="0" step="1" type="number" oninput="if (value > 99999999) {value=99999999} else if (value < 0) {value = 0}">
</div>
</div>
<!-- 第二列 -->
<div class="col-md-4">
<div>
<label for="combaurate" class="lang itemlabel" key="UISTR_BAUDRATE">combaurate</label>
<select class="alg_input" id="combaurate">
<option class="lang" key="" value="0">9600</option>
<option class="lang" key="" value="1">19200</option>
<option class="lang" key="" value="2">38400</option>
<option class="lang" key="" value="3">57600</option>
<option class="lang" key="" value="4">115200</option>
</select>
</div>
<div>
<label for="rs485_fun" class="lang itemlabel" key="UISTR_SERIALFUN">rs485_fun</label>
<select class="alg_input" id="rs485_fun">
<option class="lang" key="UISTR_NO" value="0">No</option>
<option class="lang" key="UISTR_USEPRINTER" value="1">Printer</option>
<option class="lang" key="UISTR_SENDJSON" value="2">Send json</option>
</select>
</div>
</div><!-- 第二列 -->
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="tag"><label><span class="lang" key="UISTR_COMMUNICATION_SETTING">Comm set</span>=&gt;<span class="lang" key="UISTR_MAINMENU_SERVER">server</span></label></div>
<div class="content">
<!-- 第一列 -->
<div class="col-md-4">
<div>
<label for="use_bs" class="lang itemlabel" key="UISTR_SERVERREQ">use_bs</label>
<input id="use_bs" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="use_domain_name" class="lang itemlabel" key="UISTR_MAINMENU_USEWEB">use_domain_name</label>
<input id="use_domain_name" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="bs_domain_name" class="lang itemlabel" key="UISTR_MAINMENU_WEB">bs_domain_name</label>
<input id="bs_domain_name" class="alg_input" type="text" >
</div>
<div>
<label for="serverip" class="lang itemlabel" key="UISTR_MAINMENU_SERVERIP">serverip</label>
<input id="serverip" name="serverip" class="net_input" value="192.168.1.1" type="text" oninput="value=value.replace(/[^\d\.]/g,'')">
</div>
</div>
<!-- 第二列 -->
<div class="col-md-4">
<div>
<label for="serverport" class="lang itemlabel" key="UISTR_MAINMENU_SERVERPORT">serverport</label>
<input id="serverport" class="alg_input" value="7788" max="999999" min="0" step="1" type="number" oninput="if (value > 999999) {value=999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="server_response_time" class="lang itemlabel" key="UISTR_MAINMENU_UDPDATAREQ">server_response_time</label>
<input id="server_response_time" class="alg_input" value="5" max="999999" min="0" step="1" type="number" oninput="if (value > 999999) {value=999999} else if (value < 0) {value = 0}">
</div>
<div>
<label for="server_verify" class="lang itemlabel" key="UISTR_SERVE_RATIFY">server_verify</label>
<select class="alg_input" id="server_verify">
<option class="lang" key="UISTR_NO" value="0">no</option>
<option class="lang" key="UISTR_YES" value="1">yes</option>
<option class="lang" key="UISTR_OFFLINE_WAIVER" value="2">Offline Waiver</option>
</select>
</div>
</div><!-- 第二列 -->
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="tag"><label class="lang" key="devinfo"><span class="lang" key="UISTR_COMMUNICATION_SETTING">Comm set</span>=&gt;<span class="lang" key="UISTR_MAINMENU_NET">Ethernet</span></label></div>
<div class="content">
<!-- 第一列 -->
<div class="col-md-4">
<div>
<label for="use_eth_dhcp" class="lang itemlabel" key="UISTR_MAINMENU_DHCP">use_eth_dhcp</label>
<input id="use_eth_dhcp" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="netipaddress" class="lang itemlabel" key="UISTR_IP_ADDRESS">netipaddress</label>
<input id="netipaddress" name="netipaddress" class="net_input" value="192.168.1.224" type="text" oninput="value=value.replace(/[^\d\.]/g,'')">
</div>
<div>
<label for="netmask" class="lang itemlabel" key="UISTR_SUBNET_MASK">netmask</label>
<input id="netmask" name="netmask" class="net_input" value="255.255.255.0" type="text" oninput="value=value.replace(/[^\d\.]/g,'')">
</div>
</div>
<!-- 第二列 -->
<div class="col-md-4">
<div>
<label for="netgateway" class="lang itemlabel" key="UISTR_DEFAULT_GATEWAY">netgateway</label>
<input id="netgateway" name="netgateway" class="net_input" value="192.168.1.1" type="text" oninput="value=value.replace(/[^\d\.]/g,'')">
</div>
<div>
<label for="dns_server_ip" class="lang itemlabel" key="UISTR_DNS_SERVER_IP">dns_server_ip</label>
<input id="dns_server_ip" name="dns_server_ip" class="net_input" value="8.8.8.8" type="text" oninput="value=value.replace(/[^\d\.]/g,'')">
</div>
<div>
<label for="hide_ip" class="lang itemlabel" key="UISTR_HIDE_IP">hide_ip</label>
<input id="hide_ip" class="alg_input" value="0" type="checkbox">
</div>
</div><!-- 第二列 -->
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="tag"><label class="lang" key="devinfo"><span class="lang" key="UISTR_COMMUNICATION_SETTING">Comm set</span>=&gt;<span class="lang" key="UISTR_MAINMENU_WIFI">WIFI</span></label></div>
<div class="content">
<!-- 第一列 -->
<div class="col-md-4">
<div>
<label for="use_wlan_dhcp" class="lang itemlabel" key="UISTR_MAINMENU_DHCP">use_wlan_dhcp</label>
<input id="use_wlan_dhcp" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="wlan_ip_address" class="lang itemlabel" key="UISTR_IP_ADDRESS">wlan_ip_address</label>
<input id="wlan_ip_address" name="wlan_ip_address" class="net_input" value="192.168.1.224" type="text" oninput="value=value.replace(/[^\d\.]/g,'')">
</div>
<div>
<label for="wlan_net_mask" class="lang itemlabel" key="UISTR_SUBNET_MASK">wlan_net_mask</label>
<input id="wlan_net_mask" name="wlan_net_mask" class="net_input" value="255.255.255.0" type="text" oninput="value=value.replace(/[^\d\.]/g,'')">
</div>
</div>
<!-- 第二列 -->
<div class="col-md-4">
<div>
<label for="wlan_gateway" class="lang itemlabel" key="UISTR_DEFAULT_GATEWAY">wlan_gateway</label>
<input id="wlan_gateway" name="wlan_gateway" class="net_input" value="192.168.1.1" type="text" oninput="value=value.replace(/[^\d\.]/g,'')">
</div>
</div><!-- 第二列 -->
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box" id="contentBox_appnofity">
<div class="tag"><label class="lang" key="devinfo"><span class="lang" key="UISTR_COMMUNICATION_SETTING">Comm set</span>=&gt;<span class="lang" key="UISTR_APP_NOTIFY">APP Notify</span></label></div>
<div class="content">
<!-- 第一列 -->
<div class="col-md-8">
<div>
<label for="line_notify" class="lang itemlabel" key="UISTR_APP_NOTIFY">line_notify</label>
<input id="line_notify" class="alg_input" value="1" type="checkbox">
</div>
<div>
<label for="app_token" class="lang itemlabel" key="app_token" >APP_TOKEN</label>
<textarea id="app_token" class="alg_input" rows="5" cols="40"></textarea>
</div>
<div>
<label for="line_push_type" class="lang itemlabel" key="UISTR_PUBLIC_LINE_PUSH">line_push_type</label>
<select class="alg_input" id="line_push_type">
<option class="lang" key="UISTR_ALL_PUSH" value="0">all push</option>
<option class="lang" key="UISTR_EACH_PUNCH" value="1">each punch</option>
<option class="lang" key="UISTR_SUMMARY_PUSH" value="2">summary push</option>
<option class="lang" key="UISTR_NO" value="3">no</option>
</select>
</div>
</div>
</div><!-- content-->
</div><!-- content-box-->
<div class="content-box">
<div class="content" style="margin-top: 0px;">
<div class="row">
<div class="col-md-3">
<button class="btn btn-primary waves-effect waves-float lang btn_width" key="sendseting"><span class="lang" key="UISTR_SENDTODEVICE">Send to Device</span></button>
</div>
<div class="col-md-3">
<button class="btn btn-primary waves-effect waves-float lang btn_width" key="UISTR_SAVEASJSON">Save as JSON</button>
</div>
<div class="col-md-3">
<button class="btn btn-primary waves-effect waves-float lang btn_width" key="UISTR_IMPORTFROMJSON">Import from JSON</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="resources/plugins/jquery.1.12.4.min.js"></script>
<script src="resources/plugins/bootstrap-3.3.0/js/bootstrap.min.js"></script>
<script src="resources/plugins/bootstrap-table-1.17.0/bootstrap-table.min.js"></script>
<script src="resources/plugins/waves-0.7.5/waves.min.js"></script>
<script src="resources/plugins/jquery-confirm/jquery-confirm.min.js"></script>
<script src="resources/plugins/jquery.cookie.js"></script>
<link href="resources/plugins/jquery-toastmessage/resources/css/jquery.toastmessage.css" rel="stylesheet"/>
<script src="resources/plugins/jquery-toastmessage/javascript/jquery.toastmessage.js"></script>
<script src="resources/js/notify.js"></script>
<script src="resources/js/lang.js"></script>
<script src="resources/js/common.js"></script>
<script>
let hasFpsize = $.cookie("fpsize") !== undefined && $.cookie("fpsize") !== "0";
let hasPalmsize = $.cookie("palmsize") !== undefined && $.cookie("palmsize") !== "0";
let hasFacesize = $.cookie("facesize") !== undefined && $.cookie("facesize") !== "0";
let hasElevator = $.cookie("elevator_control") !== undefined && $.cookie("elevator_control") !== "0";
let ischineseversion=false;
let DI_CARD_DISP_FORMAT = parseInt($.cookie("CARD_DISP_FORMAT")) || 0;
let DI_DATE_FORMAT = parseInt($.cookie("DATE_FORMAT")) || 0;
check_permission();
document.querySelectorAll('select.alg_input')
.forEach(select => select.selectedIndex = -1);
if (!hasFacesize) {
let fcmatch_level_Div = document.getElementById('fcmatch_level').parentNode;
let live_treshold_Div = document.getElementById('live_treshold').parentNode;
fcmatch_level_Div.remove();
live_treshold_Div.remove();
}
if (!hasFpsize) {
let fpmatch_level_Div = document.getElementById('fpmatch_level').parentNode;
let fps_peruser_Div = document.getElementById('fps_peruser').parentNode;
fpmatch_level_Div.remove();
fps_peruser_Div.remove();
}
if (!hasPalmsize) {
let palmMatchLevelDiv = document.getElementById('palm_vein_level').parentNode;
let palmDetLevelDiv = document.getElementById('palm_det_level').parentNode;
//let disablefaceDiv = document.getElementById('disable_face').parentNode;
palmMatchLevelDiv.remove();
palmDetLevelDiv.remove();
// disablefaceDiv.remove();
}
if(!hasElevator)
{
const item_elevator_control = document.getElementById('item_elevator_control');
item_elevator_control.style.display = 'none';
}
$(".btn").click(function() {
if ($(this).attr("key") === "UISTR_SAVEASJSON") {
saveAsJSON();
} else if ($(this).attr("key") === "UISTR_IMPORTFROMJSON") {
importFromJSON();
} else {
alg_set();
}
});
$("input[type=number]").css("width","120px");
var selects = document.querySelectorAll('select');
for (var i = 0; i < selects.length; i++) {
selects[i].style.width = '120px';
}
processSequence();
async function processSequence() {
try {
await lang_load();
await langoption_get();
await verifymodeSelect();
await alg_get();
} catch (error) {
console.error('Failed to load language or subsequent operations:', error);
}
}
function populateLanguageSelect(langs) {
const onlyChineseVariants = langs.every(lang => lang.ltitle === "SChinese" || lang.ltitle === "TChinese");
if (onlyChineseVariants) {
ischineseversion = true;
}
if(ischineseversion)
{
document.getElementById('date_format').parentNode.remove();
document.getElementById('use_dst').parentNode.remove();
document.getElementById('dst_start').parentNode.remove();
document.getElementById('dst_end').parentNode.remove();
}
if (!langs || langs.length <= 1) {
$("#div_language").hide();
return;
} else {
$("#div_language").show();
}
const selectElement = document.getElementById('language');
selectElement.innerHTML = '';
langs.forEach(function(lang) {
const option = document.createElement('option');
option.value = lang.lvalue;
option.textContent = lang.ltitle;
selectElement.appendChild(option);
});
selectElement.selectedIndex = -1;
}
function langoption_get() {
return new Promise((resolve, reject) => {
let send = new Object();
send["password"] = $.cookie("pwd");
send["cmd"] = 'getlangoption';
console.log(send);
$.ajax({
url: debugserver + '/api',
type: 'POST',
contentType: "application/json",
dataType: "json",
data: JSON.stringify(send),
beforeSend: function() {
},
success: function(json) {
console.log("done", json);
if (json.result) {
populateLanguageSelect(json.langs);
resolve(json.langs);
} else {
console.log("error", json);
reject(new Error('Request failed with result false.'));
}
},
error: function(error) {
console.log("error::::", error);
reject(error);
}
});
});
}
function verifymodeSelect() {
const selectElement = document.getElementById('verifymode');
const LOG_ALLVERIFY = 0;
const LOG_FPVERIFY = 1; // Fingerprint Verify
const LOG_PASSVERIFY = 2; // Password Verify
const LOG_CARDVERIFY = 3; // Card Verify
const LOG_FPPASSVERIFY = 4; // Password + Fingerprint Verify
const LOG_FPCARDVERIFY = 5; // Card + Fingerprint Verify
const LOG_PASSFPVERIFY = 6; // Password + Fingerprint Verify
const LOG_CARDFPVERIFY = 7; // Card + Fingerprint Verify
const LOG_FACEVERIFY = 8; // Face Verify
const LOG_FACEPASSVERIFY = 9; // Face + Password Verify
const LOG_CARDFACEVERIFY = 10; // Face + Card Verify
const LOG_CARDPASSVERIFY = 11; // Card + Password Verify
const LOG_FPFACEVERIFY = 12; // Fingerprint + Face Verify
const LOG_QRCODEVERIFY = 13; // QR Code Verify
const LOG_FACE_CARDORPWD_VERIFY = 14;
const LOG_SFZVERIFY = 15; // SFZ (Chinese ID Card) Verify
const LOG_PALMVERIFY = 16; // Palm Verify
const LOG_1N1VERIFY = 19;
const LOG_PERSON_ALLVERIFY = 20;
const LOG_PALMANDFACE = 21;
const LOG_FPANDPALM = 22;
const LOG_CARDANDPALM = 23;
const LOG_PALMANDPWD = 24;
selectElement.innerHTML = '';
addOption(LOG_ALLVERIFY, lang.UISTR_ANY);
addOption(LOG_CARDFACEVERIFY, lang.UISTR_VERIFY_CARD_ADD_FACE);
addOption(LOG_FACEPASSVERIFY, lang.UISTR_VERIFY_FACE_ADD_PWD);
addOption(LOG_FACE_CARDORPWD_VERIFY, lang.UISTR_VERIFY_FACE_ADD_CARD_PWD);
addOption(LOG_FACEVERIFY, lang.UISTR_FACE_ONLY);
if (hasPalmsize) {
addOption(LOG_PALMANDFACE, lang.UISTR_PALMANDFACE);
if (hasFpsize){
addOption(LOG_FPANDPALM, lang.UISTR_FPANDPALM);
}
addOption(LOG_CARDANDPALM, lang.UISTR_CARDANDPALM);
addOption(LOG_PALMANDPWD, lang.UISTR_PALMANDPWD);
addOption(LOG_PALMVERIFY, lang.UISTR_ONLYPALM);
}
if (hasFpsize) {
addOption(LOG_FPFACEVERIFY, lang.UISTR_VERIFY_FP_ADD_FACE);
addOption(LOG_FPCARDVERIFY, lang.UISTR_VERIFY_FP_ADD_CARD);
addOption(LOG_FPPASSVERIFY, lang.UISTR_SET_LIST_FP);
addOption(LOG_FPVERIFY, lang.UISTR_FINGER_ONLY);
}
addOption(LOG_CARDPASSVERIFY, lang.UISTR_SET_LIST_CP);
addOption(LOG_CARDVERIFY, lang.UISTR_CARD_ONLY);
addOption(LOG_PASSVERIFY, lang.UISTR_PASSWORD_ONLY);
function addOption(value, textContent) {
const option = document.createElement('option');
option.value = value;
option.textContent = textContent;
selectElement.appendChild(option);
}
}
window.addEventListener('DOMContentLoaded', function() {
const rebootTimeInputs = document.querySelectorAll('.alg_input.hour_minute');
rebootTimeInputs.forEach(function(input) {
input.addEventListener('blur', checkTimeFormat);
});
});
function checkTimeFormat() {
const timeInput = this;
const timeValue = timeInput.value.trim();
if (isValidTimeFormat(timeValue)) {
timeInput.classList.remove('invalid');
timeInput.classList.add('valid');
} else {
timeInput.classList.remove('valid');
timeInput.classList.add('invalid');
showInvalidTimeTooltip(timeInput);
timeInput.value = '00:00';
}
}
function isValidTimeFormat(timeString) {
const timeRegex = /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/;
return timeRegex.test(timeString);
}
function showInvalidTimeTooltip(inputElement) {
const label = document.querySelector(`label[for="${inputElement.id}"]`);
let tooltipText = '输入的时间格式不正确,请输入 hh:mm 格式的时间。';
if (label) {
tooltipText = `${label.textContent}的格式不正确,请输入 hh:mm 格式的时间。`;
}
inputElement.title = tooltipText;
}
function convertIPAddress(ipNumber) {
const part1 = (ipNumber >> 24) & 0xFF;
const part2 = (ipNumber >> 16) & 0xFF;
const part3 = (ipNumber >> 8) & 0xFF;
const part4 = ipNumber & 0xFF;
return `${part1}.${part2}.${part3}.${part4}`;
}
function convertIPToInt(ipAddress) {
let parts = ipAddress.split('.');
let ipInt = 0;
for (let i = 0; i < 4; i++) {
ipInt = (ipInt << 8) + parseInt(parts[i], 10);
}
return ipInt >>> 0;
}
function convertTimeRangeToValue(time_range) {
if (!time_range) {
return 0;
}
let parts = time_range.split('~');
if (parts.length !== 2) {
return 0;
}
let start_time = parts[0].split(':');
let end_time = parts[1].split(':');
if (start_time.length !== 2 || end_time.length !== 2) {
return 0;
}
let start_hour = parseInt(start_time[0]);
let start_min = parseInt(start_time[1]);
let end_hour = parseInt(end_time[0]);
let end_min = parseInt(end_time[1]);
if (isNaN(start_hour) || isNaN(start_min) || isNaN(end_hour) || isNaN(end_min)) {
return 0;
}
let value = ((start_hour << 24) | (start_min << 16)) | ((end_hour << 8) | end_min);
return value;
}
function convertValueToTimeRange(value) {
let start_hour = (value >> 24) & 0xFF;
let start_min = (value >> 16) & 0xFF;
let end_hour = (value >> 8) & 0xFF;
let end_min = value & 0xFF;
return `${start_hour.toString().padStart(2, '0')}:${start_min.toString().padStart(2, '0')}~${end_hour.toString().padStart(2, '0')}:${end_min.toString().padStart(2, '0')}`;
}
function formatCard(card, dispFormat) {
if (card === null || card === undefined || card === "") {
return "";
}
const dispCard = BigInt(card);
const bits = dispCard.toString(2).length;
const byteLen = Math.ceil(bits / 8);
if (dispFormat === 1) {
if (byteLen <= 3 || byteLen === 4) {
if (byteLen <3) {
const number = dispCard & 0xFFFFFn;
return `0,${number.toString().padStart(5, '0')}`;
} else {
const area = (dispCard >> 16n) & 0xFFFFn;
const number = dispCard & 0xFFFFn;
return `${area},${number.toString().padStart(5, '0')}`;
}
} else {
return dispCard.toString();
}
} else if (dispFormat === 2) {
return `0x${dispCard.toString(16).toUpperCase()}`;
} else {
return dispCard.toString();
}
}
function parseCardInput(input) {
if (!input) return 0;
const str = input.trim().toUpperCase();
if (!str) return 0; // 默认返回0Number类型
try {
let value;
if (str.includes(',')) {
const [areaStr, numberStr] = str.split(',');
const area = BigInt(areaStr);
const number = BigInt(numberStr);
value = (area << 16n) + number;
}
else if (str.startsWith('0X')) {
value = BigInt(`0x${str.slice(2)}`);
}
else {
value = BigInt(str);
}
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
if (value >= MIN_SAFE && value <= MAX_SAFE) {
return Number(value);
} else {
return value.toString();
}
} catch (e) {
return 0; // 解析失败返回0
}
}
function get_alg_input() {
let alg = new Object();
$("textarea.alg_input,input.alg_input, input.net_input").each(function(idx, e) {
if ($(e).is(":visible")){
let value;
if (e.type == "checkbox") {
value = Number($(e).prop("checked"));
} else if (e.type == "number") {
value = Number(e.value);
} else if (e.classList.contains('net_input')) {
value = convertIPToInt(e.value);
} else if (e.classList.contains('month_day')) {
let parts = e.value.split('/');
value = parseInt(parts[0]) * 32 + parseInt(parts[1]);
} else if (e.classList.contains('hour_minute')) {
let parts = e.value.split(':');
value = parseInt(parts[0]) * 60 + parseInt(parts[1]);
}else if (e.classList.contains('time_range')) {
value = convertTimeRangeToValue(e.value);
}else if (e.id === "reg_card_1" || e.id === "reg_card_2" || e.id === "reg_card_3") {
value = parseCardInput(e.value);
}else {
value = e.value;
}
alg[e.id] = value;
}
});
$("select.alg_input").each(function(idx, e) {
if ($(e).is(":visible")) {
alg[e.id] = Number($(e).val());
}
});
console.log(alg);
return alg;
}
function set_alg_input(alg) {
if (alg.notify_disable === 1||ischineseversion) {
$("#contentBox_appnofity").hide();
}
for (const v in alg) {
console.log(v)
let e = $("textarea.alg_input,input.alg_input, input.net_input, select.alg_input").filter("#" + v)[0];
if (e) {
if (e.tagName.toLowerCase() === 'select') {
$(e).val(alg[v]);
} else {
if (e.classList.contains('net_input')) {
e.value = convertIPAddress(alg[v]);
} else if (e.classList.contains('month_day')) {
$(e).val(`${Math.floor(alg[e.id] / 32)}/${alg[e.id] % 32}`);
}else if (e.classList.contains('hour_minute')) {
$(e).val(`${Math.floor(alg[e.id] / 60)}:${alg[e.id] % 60}`);
} else if (e.classList.contains('time_range')) {
$(e).val(convertValueToTimeRange(alg[e.id]));
} else {
e.value = alg[v];
if (e.type == "checkbox") {
$("#" + v).prop("checked", alg[v])
}
else if (e.id === "reg_card_1" || e.id === "reg_card_2" || e.id === "reg_card_3") {
const cardValue = Number(alg[v]) || 0; // 确保传入数字类型
e.value = formatCard(cardValue, DI_CARD_DISP_FORMAT);
}
}
}
}
}
}
function alg_get() {
let send = new Object()
send["password"] = $.cookie("pwd")
send["cmd"] = 'getdevinfo'
console.log(send)
$.ajax({
url: debugserver+'/api',
type: 'POST',
contentType:"application/json",
dataType: "json",
data: JSON.stringify(send),
beforeSend: function() {
},
success: function(json){
console.log("done", json)
set_alg_input(json);
},
error: function(error){
console.log("error::::",error);
}
});
}
function getUTCTimeInSecondsWithOffset(date = new Date(), offsetHours = 8) {
let year = date.getFullYear();
let month = date.getMonth();
let day = date.getDate();
let hours = date.getHours();
let minutes = date.getMinutes();
let seconds = date.getSeconds();
return Math.floor(Date.UTC(year, month, day, hours, minutes, seconds) / 1000) - (offsetHours * 60 * 60);
}
function format_get() {
let send = new Object()
send["password"] = $.cookie("pwd")
send["cmd"] = 'getdevinfo'
console.log(send)
$.ajax({
url: debugserver+'/api',
type: 'POST',
contentType:"application/json",
dataType: "json",
data: JSON.stringify(send),
beforeSend: function() {
},
success: function(json){
$.cookie("CARD_DISP_FORMAT", json.card_disp_format);
$.cookie("DATE_FORMAT", json.date_format);
$.cookie("USERID_FORMAT", json.userid_format);
console.log("done", json);
},
error: function(error){
console.log("error::::",error);
}
});
}
function alg_set() {
let alg = get_alg_input();
alg["password"] = $.cookie("pwd");
alg["cmd"] = 'setdevinfo';
alg["nowtime"] = getUTCTimeInSecondsWithOffset();
$.ajax({
url: debugserver+'/api',
type: 'POST',
contentType:"application/json",
dataType: "json",
data: JSON.stringify(alg),
beforeSend: function() {
},
success: function(json){
console.log("done")
let field=window.lang.UISTR_UPLOAD_OK;
notify(field);
format_get();
onUploadSuccess();
},
error: function(error){
console.log("error::::",error);
let field=window.lang.UISTR_UPLOAD_FAIL;
notify(field);
}
});
}
function saveAsJSON() {
let alg = get_alg_input();
let jsonData = JSON.stringify(alg, null, 2);
let filename = "setupinfo.json";
let element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(jsonData));
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
let field=window.lang.UISTR_DOWNLOAD_OK;
notify(field);
}
function importFromJSON() {
let fileInput = document.createElement("input");
fileInput.type = "file";
fileInput.accept = ".json";
fileInput.style.display = "none";
document.body.appendChild(fileInput);
fileInput.addEventListener("change", function() {
if (this.files.length > 0) {
let file = this.files[0];
let reader = new FileReader();
reader.onload = function(e) {
try {
let alg = JSON.parse(e.target.result);
set_alg_input(alg);
let field=window.lang.UISTR_UPLOAD_OK;
notify(field);
} catch (error) {
console.error("Error parsing JSON file:", error);
}
};
reader.readAsText(file);
}
document.body.removeChild(fileInput);
});
fileInput.click();
}
function onUploadSuccess() {
const homeChannel = new BroadcastChannel('home_refresh_channel');
homeChannel.postMessage({type: 'refresh_home'});
homeChannel.close();
}
</script>
</body>
</html>