<%@ page language="java" import="com.whptu.shopping.user.*" pageEncoding="GBK"%>
<%@ page import="java.util.*"%><%
//检查session,查看用户是否登陆
User u = (User)session.getAttribute("user");
if(u == null) {
response.sendRedirect("UserLogin.jsp");
return;
}
%><%
request.setCharacterEncoding("GBK");
String action = request.getParameter("action");
if(action != null && action.trim().equals("modify")) { String password = request.getParameter("password");
u.setPassword(password);
u.updatePassword();
out.println("更改成功!");
return;
} %><html>
<head>
<script type="text/javascript">
function check(){

var password1 = document.getElementById("password").value;
if(password1==null){

alert("第一次输入密码不能为空!");
return false;
}
}</script>
<title>用户修改密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="Discuz!,Board,Comsenz,forums,bulletin board,">
<meta name="description" content="专区  - Discuz! Board">
<meta name="generator" content="Discuz! 4.0.0RC4 with Templates 4.0.0">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<meta http-equiv="MSThemeCompatible" content="Yes">
<style type="text/css"><!--
a { text-decoration: none; color: #000000; }
a:hover { text-decoration: underline;color: red;}
.nav { font: 12px Verdana,Tahoma; color: #000000; font-weight: normal }
.nav a { color: #000000 }
.header { font: 15px Verdana,Tahoma; color: #000000; font-weight: bold}
.header a { color: #FFFFFF }
.tableborder { background:#54A5F2;solid #FFFFFF} 
.altbg1 { background: #F3F6FA }
.altbg2 { background: #FFFFFF }
--></style>
</head><form method="post" name="register" action="ChangeUserPassword.jsp" onSubmit="this.regsubmit.disabled=true;">
<input type="hidden" name="action" value="modify"/>
<table  class="tableborder" align="center" cellpadding="0" cellspacing="1" width="40%">
  <tr>
<img src="images/cpw.gif"/>
  </tr>
  <tr>
    <td width="50%" align="right">请输出新密码</td>
    <td width="50%"><input type="password" name="password" id="password"/></td>
  </tr>
  <tr>
    <td align="right">请再次输出密码</td>
    <td><input type="password" name="password2" id="password2"/></td>
  </tr>
  <tr>
   <td></td>
    <td align="left"><input name="regsubmit" value="提 &nbsp; 交" type="submit" onclick="on check()"></td>
  </tr>
</table>
</form>
</body>
</html>