<%@ page contentType="text/html; charset=GB2312" %>
<%@page import="zr.zrpower.entity.sys.SessionUser"%>
<%@page import="zr.zrpower.entity.sys.BPIP_USER"%>
<%@page import="zr.zrpower.entity.sys.BPIP_USER_PHOTO"%>
<%@page import="zr.zrpower.common.web.Upload"%>
<%@page import="zr.zrpower.ejb.sys.UIService"%>
<%@page import="zr.zrpower.ejb.sys.UserService" %>

<%@page import="java.lang.Object"%>
<%@ page import="java.io.*,java.text.*,java.util.*" %>
<HTML>
<%
  SessionUser user = (SessionUser) session.getAttribute("userinfo");
  UserService userService=new UserService();
  UIService userUI = new UIService();

%>
<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<link REL="stylesheet" type="text/css" href="../zrsysmanage/css/<%=user.getUserCSS()%>"></HEAD>
<BODY class="BodyMain">
 <!--HTML Head表单头显示[显示内容，用户肤色的图片文件夹]-->
<%=userUI.ShowHeadHtml("修改操作【结果】",user.getUserImage())%>  <!--HTML Body Start显示表单开始部分-->
<%=userUI.ShowBodyStartHtml()%>
<DIV id="divMessage" style='padding-left:0;padding-top:0;width:100%;height:100%;overflow:auto;'>
<br />
<br>
<br />
<br>
<br />
<br>
<br />
<br>

<div align="center" style="font-size:18px;">
<font color=red>
<%
String  strType=request.getParameter("Type");
String  strOldPwd=request.getParameter("OldPwd");
String strNewPwd=request.getParameter("NewPwd1");
String  strOldRemarkPwd=request.getParameter("OldRemarkPwd");
String strNewRemarkPwd=request.getParameter("NewRemarkPwd1");

if(strType.equals("User")){
  if(!userService.CheckPw(user.getUserID(),strOldPwd))
  {
    out.println("您所输入的原密码不正确，请重新输入！");
  }
  else
  {
    try
    {
      userService.ResetPassword(user.getUserID(),strNewPwd);
      out.println("修改密码成功！");
    }
    catch (Exception ex) {
      out.println("密码修改失败，请联系系统管理员！<br>"+ex.toString());
    }
  }
}

%>
</font>
<br />
<br>
<br />
<br>
<br />
<br>
<br>
 <center><br>
                 <table cellspacing="0" cellpadding="0" border='0'><tr>
  <%=userUI.ClickButton("返 回","JavaScript:history.back();","buttonReturn.gif",user.getUserImage())%>
  </tr></table>
                 </center>
</div>
</div>
 <!--HTML Body End显示表单结束部分-->
<%=userUI.ShowBodyEndHtml()%>  <!--HTML Foot显示表单尾[显示内容，用户肤色的图片文件夹]-->
<%=userUI.ShowFootHtml("",user.getUserImage())%>

</BODY>
</HTML>
<%
user = null;
userService = null;
userUI = null;
%>
