zioinfo-mail/workspace/zioinfo-esn/restapi_lgit/target/ROOT/index.html
DESKTOP-TKLFCPR\ython 371f77e7ab
Some checks failed
GUARDiA CI / Python Lint & Import Test (push) Has been cancelled
GUARDiA CI / Validate Install Scripts (push) Has been cancelled
GUARDiA CI / PR Validation Summary (push) Has been cancelled
fix(enhance-v4): APK QR 버그 수정 + 웹메일 라우터 수정
2026-06-02 20:23:55 +09:00

283 lines
10 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<META charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<!-- JavaScript -->
<script src="/alertify/alertify.min.js"></script>
<!-- CSS -->
<link rel="stylesheet" href="/alertify/alertify.min.css"/>
<!-- Default theme -->
<link rel="stylesheet" href="/alertify/default.min.css"/>
<!-- Semantic UI theme -->
<link rel="stylesheet" href="/alertify/semantic.min.css"/>
<!-- Bootstrap theme -->
<link rel="stylesheet" href="/alertify/bootstrap.min.css"/>
<link rel="stylesheet" href="/jui/jui.min.css" />
<script type="text/javascript" src="/jui/lib/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/jui/jui.min.js"></script>
<script type="text/javascript" src="/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript">
// var userLang = navigator.language || navigator.userLanguage;
// if(userLang.indexOf('ko') != -1) {
// fnSetCookie('language','ko');
// }else if(userLang.indexOf('en') != -1) {
// fnSetCookie('language','en');
// }else if(userLang.indexOf('ja') != -1) {
// fnSetCookie('language','ja');
// }else {
// fnSetCookie('language','ko');
// }
</script>
<script type="text/javascript" src="/js/locale/locale.js"></script>
</head>
<body class="jui ko" style="font-family:'맑은고딕', 'Malgun Gothic', Dotum, Verdana, sans-serif;">
<div class="window window-white">
<div class="head">
<div class="left" ><script>document.write(locale.esl_system);</script></div>
</div>
<div class="body">
<form name="frmLogin" method="post" action="">
<div class="h6"><script>document.write(locale.index_id);</script></div>
<input type="text" name="userid" id="userid" class="input input-mini input-rect" style="width: 160px; margin-bottom: 3px;" onKeypress="if(event.keyCode ==13){fnLogin();return;}"/><br />
<div class="h6"><script>document.write(locale.index_pw);</script></div>
<input type="password" name="pwd" id="pwd" class="input input-mini input-rect" style="width: 160px;" onKeypress="if(event.keyCode ==13){fnLogin();return;}"/><br />
<br />
<div style="text-align:center;">
<a href="#" class="btn" onclick="fnLogin(); return false;"><script>document.write(locale.index_login);</script></a>
</div>
</form>
</div>
</div>
<div id="login_passwd_window" class="window window-white">
<div class="head">
<div class="left"><label id="login_password">Password</label></div>
<div class="right">
<a class="close"><i class="icon-exit" onclick="passwordChangeWindowClose()"></i></a>
</div>
</div>
<div class="body">
<form name="frmLoginPasswd" id="frmLoginPasswd">
<input type="hidden" name="login_row_id" id="login_row_id" value="" />
<div style="padding-bottom:5px;" id="passwdHidden">
<label class="label label-small" style="width:160px;" id="login_chg_pwd_new">New Password</label>
<input type="password" name="login_new_passwd" id="login_new_passwd" value="" maxlength="20" class="input input-small input-rect" style="width:200px;" /><br />
</div>
<div style="padding-bottom:5px;" id="passwdHidden">
<label class="label label-small" style="width:160px;" id="login_chg_pwd_confirm">Confirm Password</label>
<input type="password" name="login_new_passwd2" id="login_new_passwd2" value="" maxlength="20" class="input input-small input-rect" style="width:200px;" /><br />
</div>
</form>
</div>
<div class="foot" align="center">
<a href="#" class="btn btn-gray" id="login_btn_passwd_save">Save</a>
<a href="javascript:passwordChangeWindowClose();" class="btn btn-gray" id="login_btn_passwd_close">Close</a>
</div>
</div>
<script type="text/javascript">
$( document ).ready(function() {
$(window).resize();
$('#userid').focus();
});
$(window).resize(function(){
$('.window').css({position:'absolute'}).css({
left: ($(window).width() - $('.window').outerWidth())/2,
top: ($(window).height() - $('.window').outerHeight())/2
});
$('#tot_img').css({position:'absolute'}).css({
left: ($(window).width() - $('.window').outerWidth())/2 + 3,
top: ($(window).height() - $('.window').outerHeight())/2 - 55
});
});
function fnLogin() {
var userid = $('#userid').val()
, passwd = $('#pwd').val();
if(userid.length == 0 || passwd.length == 0)
{
alertify.alert(locale.error,locale.id_pwd_empty);
return;
}
$.ajax({
url : '/restapi/user/v2_login'
, type: 'POST'
, timeout: 10000
, data : {
'user_id' : userid
, 'user_pw' : passwd
}, success : function(json) {
if (json.result == "success") {
fnSetCookie('token', json.data[0].token);
userid = json.data[0].userid;
name = json.data[0].name;
fnSetCookie('userid', userid);
fnSetCookie('name', name);
fnSetCookie('department', json.data[0].department);
fnSetCookie('t_last', json.data[0].t_last);
document.location.replace('./main.jsp');
} else if(json.result == "user_id_locked") {
alertify.alert(locale.login_fail,locale.user_id_locked);
} else if(json.result == "user_id_expired") {
alertify.alert(locale.login_fail,locale.user_id_expired);
} else if(json.result == "unauthenticated_user") {
alertify.alert(locale.login_fail,locale.password_incorrect);
} else if(json.result.indexOf("password_incorrect") != -1) {
var rText = json.result.split(",");
if(rText.length == 2) {
alertify.alert(locale.login_fail,locale.password_incorrect + "<br />" + (Number(rText[1])+1) + locale.password_incorrect_fail_count);
}else {
alertify.alert(locale.login_fail,locale.password_incorrect);
}
} else if(json.result == "password_should_be_changed") {
if(json.data[0].level_code=="0" || json.data[0].level_code=="1") {
fnSetCookie('token', json.data[0].token);
userid = json.data[0].userid;
name = json.data[0].name;
fnSetCookie('userid', userid);
fnSetCookie('name', name);
fnSetCookie('department', json.data[0].department);
fnSetCookie('t_last', json.data[0].t_last);
document.location.replace('./main.jsp');
}else {
alertify.alert(locale.confirm,locale.password_should_be_changed, function(e) {
fnSetCookie('token', json.data[0].token);
userid = json.data[0].userid;
name = json.data[0].name;
fnSetCookie('userid', userid);
fnSetCookie('name', name);
fnSetCookie('department', json.data[0].department);
fnSetCookie('t_last', json.data[0].t_last);
document.location.replace('./main.jsp');
});
}
} else if(json.result == "password_should_be_modified") {
login_passwd_window.show();
fnSetCookie('token', json.data[0].token);
userid = json.data[0].userid;
name = json.data[0].name;
fnSetCookie('userid', userid);
fnSetCookie('name', name);
fnSetCookie('department', json.data[0].department);
fnSetCookie('t_last', json.data[0].t_last);
$('#login_row_id').val(json.data[0].row_id);
$('#login_new_passwd').val('');
$('#login_new_passwd2').val('');
$('#login_new_passwd').focus();
} else {
alert(json.result);
}
}, error:function(request,status,err){
if (request.status == 0) {
alertify.error(locale.server_not_run);
} else {
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
alert(locale.service_error + "(" + request.status + ")");
}
}
});
}
var login_passwd_window;
jui.ready(['uix.window'], function(win) {
login_passwd_window = win('#login_passwd_window', {
width: 430
, height: 170
, modal: true
, move: true
, resize: false
, left: '40%'
, top: 260
});
});
$('#login_btn_passwd_save').click(function() {
if($('#frmLoginPasswd').valid()) {
if($('#login_new_passwd').val().length < 10) {
alertify.alert(locale.error,locale.invalid_password_length).set('label',locale.ok);
return;
}
if($('#login_new_passwd').val() != $('#login_new_passwd2').val()) {
alertify.alert(locale.error,locale.invalid_new_password).set('label',locale.ok);
return;
}
var password_chk = $('#login_new_passwd').val();
if(!fnCheckUserPWD(password_chk)){
alertify.alert(locale.error,locale.invalid_password_val);
return;
}
$.ajax({
url: '/restapi/user/change_user_pw'
, type: 'POST'
, data: {
'row_id': $('#login_row_id').val()
, 'old_passwd': $('#pwd').val()
, 'new_passwd': $('#login_new_passwd').val()
}, success : function(json) {
if(json.result.toLowerCase() == "invalid_token") {
document.location.replace('./index.html');
}else if(json.result.toLowerCase() == "success") {
login_passwd_window.hide();
alertify.success(locale[json.result.toLowerCase()]);
document.location.replace('./main.jsp');
}else {
alertify.error(locale[json.result.toLowerCase()]);
}
}, error:function(request,status,err){
if (request.status == 0) {
alertify.error(locale.server_not_run);
} else {
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
alert(locale.service_error + "(" + request.status + ")");
}
}
});
}
});
function passwordChangeWindowClose(){
$.ajax({
url: '/restapi/user/v2_logout'
, type: 'POST'
, data: {
}, success : function(json) {
if(json.result.toLowerCase() == 'success') {
fnSetCookie('userid', '');
fnSetCookie('name', '');
fnSetCookie('level_code', '');
}
}, error:function(request,status,err){
if (request.status == 0) {
alertify.error(locale.server_not_run);
} else {
// alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+err);
alert(locale.service_error + "(" + request.status + ")");
}
}
});
login_passwd_window.hide();
}
$('#login_chg_pwd_new').text(locale.new_password);
$('#login_chg_pwd_confirm').text(locale.confirm_password);
$('#login_password').text(locale.change_pwd);
$('#login_btn_passwd_save').text(locale.save);
$('#login_btn_passwd_close').text(locale.close);
</script>
</body>
</html>