You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
261 lines
10 KiB
261 lines
10 KiB
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<meta http-equiv="cache-control" |
|
content="max-age=0" /> |
|
<meta http-equiv="cache-control" |
|
content="no-store" /> |
|
<meta http-equiv="expires" |
|
content="-1" /> |
|
<meta http-equiv="expires" |
|
content="Tue, 01 Jan 1980 1:00:00 GMT" /> |
|
<meta http-equiv="pragma" |
|
content="no-cache" /> |
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
|
<!--meta http-equiv="refresh" content="300" />--> <!--Refresh each 5s--> |
|
<meta charset="utf-8" /> |
|
<style> |
|
body, html { |
|
font-family: "Arial"; |
|
} |
|
|
|
.titlebox { |
|
float: left; |
|
padding: 0 5px; |
|
margin: -30px 0 0 20px; |
|
background: #fff; |
|
} |
|
</style> |
|
<title>LPR List Upload</title> |
|
|
|
|
|
<script src="./js_3_5_1.js"></script> |
|
<script src="./jquery.form.min.js"></script> |
|
|
|
<script src="./chirun_min.js"></script> |
|
<script src="./cookie.min.js"></script> |
|
<script src="./lang.js"></script> |
|
<script src="./lang_cookie.js"></script> |
|
|
|
<script> |
|
|
|
func_get_lang_cookie(); |
|
|
|
var g_UpdateLPRLISTUICount = 300; |
|
var g_RebooTime; |
|
var g_POWERON = null; |
|
|
|
|
|
function UnUIBlock() { |
|
$.blockUI({ message: 'Waiting For System Reboot ' + g_UpdateLPRLISTUICount + ' sec' }); |
|
var interval = setInterval(function () { |
|
|
|
if (g_POWERON == 200) { |
|
$.unblockUI(); |
|
clearTimeout(g_RebooTime); |
|
clearInterval(interval); |
|
if (window.location.protocol == "http:") { |
|
if (window.location.port != parseInt(myport, 10)); |
|
window.location = 'http://' + window.location.hostname + ':' + window.location.port; |
|
else |
|
window.location = 'http://' + window.location.hostname; |
|
} |
|
else { |
|
if (window.location.port != 443) |
|
window.location = 'https://' + window.location.hostname + ':' + window.location.port; |
|
else |
|
window.location = 'https://' + window.location.hostname; |
|
} |
|
} |
|
else if (--g_UpdateLPRLISTUICount <= 0) { |
|
$.unblockUI(); |
|
clearTimeout(g_RebooTime); |
|
clearInterval(interval); |
|
if (window.location.protocol == "http:") { |
|
if (window.location.port != parseInt(myport, 10)) |
|
window.location = 'http://' + window.location.hostname + ':' + window.location.port; |
|
else |
|
window.location = 'http://' + window.location.hostname; |
|
} |
|
else { |
|
if (window.location.port != 443) |
|
window.location = 'https://' + window.location.hostname + ':' + window.location.port; |
|
else |
|
window.location = 'https://' + window.location.hostname; |
|
} |
|
} |
|
else { |
|
$.blockUI({ message: 'Waiting For System Reboot ' + g_UpdateLPRLISTUICount + ' sec', fadeIn: 0 }); |
|
} |
|
}, 1000); |
|
}; |
|
|
|
function UpdateUIBlock_innerHTML() { |
|
if (g_UploadTime <= 98) { |
|
var percentVal = g_UploadTime + '%'; |
|
g_UploadTime++; |
|
bar.width(percentVal); |
|
percent.html(percentVal); |
|
|
|
clearTimeout(g_UpdateUIBlock_innerHTMLID); |
|
g_UpdateUIBlock_innerHTMLID = setTimeout(UpdateUIBlock_innerHTML, 1000); |
|
} |
|
}; |
|
|
|
function alertUnLuck() { |
|
if (g_SubmitHttpEx.readyState == 4) { |
|
if (g_SubmitHttpEx.status == 200) { |
|
g_POWERON = g_SubmitHttpEx.status; |
|
clearTimeout(g_RebooTime); |
|
$.unblockUI(); |
|
} |
|
else { |
|
GetIPCAMOnline(); |
|
} |
|
} |
|
} |
|
function CheckLoopTime() { |
|
setTimeout("GetIPCAMOnline()", 10000); |
|
} |
|
function GetIPCAMOnline() { |
|
g_RebooTime = setTimeout("GetIPCAMOnline()", 60000); |
|
//SendHttpEx('/signin',false,alertUnLuck); |
|
} |
|
|
|
function RebootTime(times, _ip, _port) { |
|
$.blockUI({ message: 'Waiting For System Reboot ' + times + ' sec' }); |
|
var interval = setInterval(function () { |
|
|
|
if (g_POWERON == 200) { |
|
$.unblockUI(); |
|
clearTimeout(g_RebooTime); |
|
clearInterval(interval); |
|
|
|
if (window.location.protocol == "http:") { |
|
if (window.location.port != parseInt(myport, 10)) |
|
window.location = 'http://' + window.location.hostname + ':' + window.location.port; |
|
else |
|
window.location = 'http://' + window.location.hostname; |
|
} |
|
else { |
|
if (window.location.port != 443) |
|
window.location = 'https://' + window.location.hostname + ':' + window.location.port; |
|
else |
|
window.location = 'https://' + window.location.hostname; |
|
} |
|
} |
|
else if (--times <= 0) { |
|
$.unblockUI(); |
|
clearTimeout(g_RebooTime); |
|
clearInterval(interval); |
|
|
|
if (window.location.protocol == "http:") { |
|
if (window.location.port != parseInt(myport, 10)) |
|
window.location = 'http://' + window.location.hostname + ':' + window.location.port; |
|
else |
|
window.location = 'http://' + window.location.hostname; |
|
} |
|
else { |
|
if (window.location.port != 443) |
|
window.location = 'https://' + window.location.hostname + ':' + window.location.port; |
|
else |
|
window.location = 'https://' + window.location.hostname; |
|
} |
|
|
|
} |
|
else { |
|
|
|
$.blockUI({ message: 'Waiting For System Reboot ' + times + ' sec', fadeIn: 0 }); |
|
} |
|
}, 1000); |
|
|
|
}; |
|
function SendReset() { |
|
//SendHttp2('/reset',false,OnSubmitNoAction); |
|
setTimeout("GetIPCAMOnline()", 10000); |
|
} |
|
function My_export() { |
|
var o = 0; |
|
document.location.href = "/get_search_info?download=ALL"; |
|
} |
|
|
|
function CreateTable3Block() { |
|
var o = ''; |
|
|
|
o += '<div style="border:1px gray solid;padding:20px;margin:15px 15px 15px 15px;">'; |
|
o += '<div class="titlebox">' + TITLEBOX_PAGE04 + '</div>'; |
|
o += '<div style = "margin-left: 35%">'; |
|
o += '<div>' + IDC_STATIC_NOTE + '</div>'; |
|
o += '<div>' + IDC_STATIC_FILE_FORMAT_LPR_UPLOAD + '</div>'; |
|
o += '<div> </div>'; |
|
o += '<div>' + IDC_STATIC_CSV_CONTENT_FORMAT + '</div>'; |
|
o += '<br>'; |
|
o += '<div> ' + IDC_STATIC_COLUMN_A_UPLOAD + '</div>'; |
|
o += '<div> ' + IDC_STATIC_COLUMN_B_UPLOAD + '</div>'; |
|
o += '<div> ' + IDC_STATIC_COLUMN_C_UPLOAD + '</div>'; |
|
o += '<div> ' + IDC_STATIC_COLUMN_D_UPLOAD + '</div>'; |
|
o += '<div> ' + IDC_STATIC_COLUMN_E_UPLOAD + '</div>'; |
|
o += '<div> ' + IDC_STATIC_COLUMN_F_UPLOAD + '</div>'; |
|
o += '<div> ' + IDC_STATIC_COLUMN_G_UPLOAD + '</div>'; |
|
o += '<div> ' + IDC_STATIC_COLUMN_H_UPLOAD + '</div>'; |
|
o += '</div>'; |
|
o += '</div>'; |
|
//o+='<td height="115">'; |
|
//o+='<img src="./images/upload_lprformat.jpg" width="300" border="0">'; |
|
//o+='</td>'; |
|
//o+='</tr><tr>'; |
|
o += '<br>'; |
|
|
|
o += '<div style = "margin-left: 35%">'; |
|
o += '<div>' + IDC_STATIC_EXPORT_LPR_LIST + '</div>'; |
|
o += '<div><input type="button" class="Content_stybtn" onClick="My_export()" value="' + IDC_STATIC_EXPORT + '"></div>'; |
|
|
|
o += '<br>'; |
|
|
|
o += '<div>' + IDC_STATIC_IMPORT_LPR_LIST + '</div>'; |
|
|
|
o += '<form name="form_import" action="/import_lpr_list" method="POST" id="form_import" enctype="multipart/form-data">'; |
|
o += '<input type="file" name="file"/>'; |
|
o += '<input type="submit" value="' + IDC_STATIC_UPLOAD + '"></form>'; |
|
o += '</div>'; |
|
|
|
return o; |
|
} |
|
|
|
$(document).ready(function () { |
|
var o = CreateTable3Block(); |
|
$("#list-content-show").html(o); |
|
(function () { |
|
|
|
$('#form_import').ajaxForm({ |
|
beforeSend: function () { |
|
//alert(document.form_import.file.value); |
|
if (document.form_import.file.value == "") { |
|
alert("File name is empty."); |
|
form.abort(); |
|
return false; |
|
} |
|
else { |
|
if (document.form_import.file.value.indexOf("listinfo.csv") == -1) |
|
// if (document.form_import.file.value.indexOf("exportnvram.bin") == -1) |
|
{ |
|
alert("File name is incorrect."); |
|
form.abort(); |
|
return false; |
|
} |
|
//RebootTime(g_UpdateLPRLISTUICount); |
|
//CheckLoopTime(); |
|
} |
|
} |
|
}); |
|
})(); |
|
}); |
|
|
|
|
|
</script> |
|
</head> |
|
<body> |
|
<div id="list-content-show" class="list-content-show" ></div> |
|
</body> |
|
</html> |