- <%@page contentType="text/html; charset=utf-8" %>
<%@ page import="java.util.Enumeration"%>
<html>
<head>
<title>CMCnU 비밀번호 초기화</title>
<link href="../css/hismain.css" rel="stylesheet" type="text/css">
<script type="text/javascript" language="javascript">
<!--
function onBodyLoad() {
<%
String code = (String)request.getAttribute("code");
String msg = (String)request.getAttribute("msg");
String text = "";
if ("10".equals(msg)) {
text = "비밀번호가 초기화 되었습니다.</br>초기비밀번호는 주민등록번호 뒷자리입니다.";
} else if ("11".equals(msg)) {
text = "이미 비밀번호가 초기화되어 있습니다.";
} else if ("12".equals(msg)) {
text = "입력하신 사용자정보가 올바르지 않습니다.</br>사용자명과 주민번호가 유효한지 확인해주세요.";
}
%>
var alertMsg = document.all.msg.innerText;
var msg = "<%=msg%>";
if (alertMsg != null && alertMsg != "") {
alert(alertMsg);
if (msg == "0") {
closePopup();
} else {
resetForm();
}
} else {
document.all.msg.innerText = "초기화시 주민등록번호 뒷자리(7)로 변경됩니다.";
document.all.msg.style.color = "blue";
document.all.msg.style.fontWeight = "bold";
}
resetPwdForm.userid.focus();
}
function resetForm() {
resetPwdForm.userid.value = "";
resetPwdForm.usernm.value = "";
resetPwdForm.rrgstno1.value = "";
resetPwdForm.rrgstno2.value = "";
resetPwdForm.userid.focus();
}
function enter() {
if (event.keyCode == 13) {
var tgt = event.srcElement.name;
if (tgt == "userid") {
resetPwdForm.usernm.focus();
} else if (tgt == "usernm") {
resetPwdForm.rrgstno1.focus();
} else if (tgt == "rrgstno1") {
resetPwdForm.rrgstno2.focus();
} else if (tgt == "rrgstno2") {
resetPwd();
}
}
}
function checkAll() {
var ret = false;
if (isNull(resetPwdForm.userid.value)) {
alert("사용자아이디를 입력하세요");
resetPwdForm.userid.focus();
} else if (isNull(resetPwdForm.usernm.value)) {
alert("사용자명을 입력하세요");
resetPwdForm.usernm.focus();
} else if (isNull(resetPwdForm.rrgstno1.value)) {
alert("주민번호 앞자리를 입력하세요");
resetPwdForm.rrgstno1.focus();
} else if (isNull(resetPwdForm.rrgstno2.value)) {
alert("주민번호 뒷자리를 입력하세요");
resetPwdForm.rrgstno2.focus();
} else {
ret = true;
}
return ret;
}
function resetPwd() {
if (checkAll()) {
//resetPwdForm.action = "resetpwd.live";
//resetPwdForm.usernm.value = encodeURI(resetPwdForm.usernm.value);
resetPwdForm.submit();
}
}
function isNull(str){
return ((str == null || str == "" || str == "undefined") ? true : false);
}
function closePopup() {
window.close();
}
//-->
</script>
</head>
<body onLoad="onBodyLoad();">
<br/>
<div align="center">
<form method="post" name="resetPwdForm" action="resetpwd.live">
<table id="formtbl">
<tr>
<td width="70px"><img src="../images/bullet_1.gif" width="7" height="7" border="0"> 사용자ID :</td>
<td width="120px"><input type="text" name="userid" tabIndex="1" onkeydown="enter()" style="width:120px" /></td>
<td width="90px" align="right"><a href="javascript:resetPwd()" style="padding-top:10px" onfocus="this.blur()">
<img src="../../../com/hismainweb/images/btn_reset_submit.gif" width="67" height="22" border="0" style="cursor:hand"></a></td>
</tr>
<tr>
<td width="70px"><img src="../images/bullet_1.gif" width="7" height="7" border="0"> 사용자명 :</td>
<td width="120px"><input type="text" name="usernm" tabIndex="2" onkeydown="enter()" style="width:120px" /></td>
<td width="90px" align="right"><a href="javascript:closePopup()" style="padding-top:10px" onfocus="this.blur()">
<img src="../../../com/hismainweb/images/btn_reset_close.gif" width="56" height="22" border="0" style="cursor:hand"></a></td>
</tr>
<tr>
<td width="70px"><img src="../images/bullet_1.gif" width="7" height="7" border="0"> 주민번호 :</td>
<td widht="180px" colspan="2"><input type="text" name="rrgstno1" maxlength="6" style="width:95px" tabIndex="3" onkeydown="enter()" /> -
<input type="password" name="rrgstno2" maxlength="7" style="width:105px" tabIndex="3" onkeydown="enter()" /></td>
</tr>
</table>
</form>
</div>
<br/>
<div id="msg" align="center" style="font-color:red">
<font color="red"><strong><%=text %></strong></font>
</div>
</body>
|