geoinfo_admin/src/main/webapp/WEB-INF/views/admins/manager/00.jsp

122 lines
4.4 KiB
Plaintext

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="${pageContext.request.contextPath}/js/jquery/jquery-1.10.2.min.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery/jquery.form.js"></script>
<script src="${pageContext.request.contextPath}/js/admins/adlogin.js"></script>
<link rel="stylesheet" HREF="${pageContext.request.contextPath}/css/admins/style.css" type="text/css">
</head>
<script>
function pass_change(){
if ($("#id").val() == "") {
alert("아이디를 입력해주세요.");
$("#id").focus();
return;
}
if ($("#old_pass").val() == "") {
alert("현재 비밀번호를 입력해주세요.");
$("#old_pass").focus();
return;
}
if ($("#new_pass").val() == "") {
alert("새 비밀번호를 입력해주세요.");
$("#new_pass").focus();
return;
}
$("#old_pass").val(hex_sha256($("#old_pass").val()).substring(0,20));
$("#new_pass").val(hex_sha256($("#new_pass").val()).substring(0,20));
var options = {
url : "${pageContext.request.contextPath}/admins/user/updatePwd.json",
contentType : "application/x-www-form-urlencoded;charset=UTF-8",
type : "post",
dataType : "json",
async : false,
success : function(json){
if (json.flag) {
if (json.affectRow == -1) {
alert("아이디가 존재하지 않습니다");
$("#old_pass").val("");
// $("#new_pass").val("");
}else if (json.affectRow == 0) {
alert("현재 비밀번호가 맞지않습니다");
$("#old_pass").val("");
// $("#new_pass").val("");
} else if (json.affectRow == 1) {
alert("변경되었습니다");
window.location.href = "${pageContext.request.contextPath}/admins/manager/00.do";
} else {
alert("비밀번호 변경 중에 오류가 발생하였습니다. 다시 시도해주세요");
}
} else {
if(json.session){
alert("비밀번호 변경 중에 오류가 발생하였습니다. 다시 시도해주세요");
} else {
alert("비밀번호 변경 중에 세션이 종료되었습니다. 다시 시도해주세요");
}
}
},
error : function(response){
alert("비밀번호 변경 중에 오류가 발생하였습니다. 다시 시도해주세요");
}
};
try{
$("#writeForm").ajaxSubmit(options);
}catch(e){
// alert("error= " + e);
alert("비밀번호 변경 중에 오류가 발생하였습니다. 다시 시도해주세요");
}
}
</script>
<body>
<form id="writeForm" name="writeForm" method="post" onsubmit="return false;">
<table id="Table_Main" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td colspan=2><img src="${pageContext.request.contextPath}/images/admins/manager/6_toptit_01.gif"></td></tr>
<tr height=20 colspan=2><td>&nbsp;</td></tr>
<tr height=25>
<td>&nbsp;</td>
<td align="right" class="search">&nbsp;</td>
</tr>
<tr height=12><td colspan=2><img src="${pageContext.request.contextPath}/images/admins/spacer.gif" width="1" height="12"></td></tr>
<tr>
<td colspan=2 align=center>
<table id="Table_01" width=557 height=200 border=0 cellpadding=0 cellspacing=0 background="${pageContext.request.contextPath}/images/admins/manager/login_img.jpg">
<tr>
<td height=50 colspan=3></td>
</tr>
<tr>
<td width=254 height=11 align=right><font size=2 color="black" face="굴림체"><b>아이디</b></font></td>
<td width=174 height=11><input type="text" id="id" name="id" size=25></td>
<td width=89 height=33 rowspan=3>
<input type="image" src="${pageContext.request.contextPath}/images/admins/manager/6_btn_ok.gif" onclick="javascript:pass_change()">
</td>
</tr>
<tr>
<td width=254 height=11 align=right><font size=2 color="black" face="굴림체"><b>현재 비밀번호</b></font></td>
<td width=174 height=11><input type="password" id="old_pass" name="old_pass" size=25></td>
</tr>
<tr>
<td width=254 height=11 align=right><font size=2 color="black" face="굴림체"><b>새 비밀번호</b></font></td>
<td><input type="password" id="new_pass" name="new_pass" size=25></td>
</tr>
<tr>
<td height=50 colspan=3></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>