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.

97 lines
4.1 KiB

This file contains ambiguous Unicode 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.

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <!-- 修改密码模块 -->
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
<meta http-equiv="description" content="This is my page" />
<link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
<script type='text/javascript' src='<%=path %>/dwr/interface/loginService.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
<script language="javascript">
function check()
{
var userPwReal="${sessionScope.admin.userPw}"; //从session范围里取得管理员的密码赋值给userPwReal
if(document.formPw.userPw.value !=userPwReal) //如果取得的输入密码与原密码不同,提示原密码不正确
{
alert("原密码不正确");
return ;
}
if(document.formPw.userPw1.value =="") //如果新密码设置为空,提示新密码不能为空
{
alert("新密码不能空");
return ;
}
document.getElementById("indicator").style.display="block"; //将每一栏设置成块级,自动换行
loginService.adminPwEdit(document.formPw.userPw1.value,callback);
//调用loginService.adminPwEdit函数来对用户的账号密码是否正确做判断
}
function callback(data)//callback函数原密码与新密码通过后执行callback提示修改成功
{
document.getElementById("indicator").style.display="none";
alert("修改成功");
}
</script>
</head>
<body leftmargin="2" topmargin="9" background='<%=path %>/img/allbg.gif'>
<form method="post" action="<%=path %>/userPwEdit.action" name="formPw">
<table width="98%" align="center" border="0" cellpadding="4" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px">
<tr bgcolor="#EEF4EA">
<td colspan="2" background="<%=path %>/img/wbg.gif" class='title'><span>密码修改</span></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="25%" bgcolor="#FFFFFF" align="right">
登录名:
</td>
<td width="75%" bgcolor="#FFFFFF">
<input type="text" value="${sessionScope.admin.userName }" name="userName" size="20" disabled="disabled"/>
<!--登录名取得是session范围里取得管理员的用户名disabled="disabled"为禁止输入-->
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="25%" bgcolor="#FFFFFF" align="right">
原密码:
</td>
<td width="75%" bgcolor="#FFFFFF">
<input type="password" name="userPw" id="userPw" size="22"/>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="25%" bgcolor="#FFFFFF" align="right">
新密码:
</td>
<td width="75%" bgcolor="#FFFFFF">
<input type="password" id="userPw1" name="userPw1" size="22"/>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="25%" bgcolor="#FFFFFF" align="right">
&nbsp;
</td>
<td width="75%" bgcolor="#FFFFFF">
<input type="button" value="修改" onclick="check()"/>
&nbsp;&nbsp;&nbsp;
<input type="reset" value="重置"/>
<img id="indicator" src="<%=path %>/images/loading.gif" alt="Loading..." style="display:none"/> <!-- 插入载入动画 -->
</td>
</tr>
</table>
</form>
</body>
</html>