<%@page contentType="text/html; charset=GBK"%>
<%@page import="zr.zrpower.entity.sys.SessionUser"%>
<%@page import="zr.zrpower.ejb.sys.UIService"%>
<%@page import="zr.zrpower.ejb.sys.UserService" %>

<%@page import="java.lang.Object"%>


<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=GBK">
<link REL="stylesheet" type="text/css" href="../../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../../zrsysmanage/script/Public.js"  type="text/jscript" ></SCRIPT>
<script src="../../../zrsysmanage/html5/script/jquery-2.0.3.min.js" type="text/jscript" ></script>
<script src="../../../zrsysmanage/html5/layer/layer.js" type="text/jscript" ></script>

<SCRIPT LANGUAGE="javascript" type="text/jscript" >
//登录密码
function Check(theForm)
{
if(trim(theForm.OldPwd.value)=="")
{

  <%if("6".equals(user.getUserWINDOWTYPE())){%>
    parent.layer.alert('旧密码不能为空，请输入！', {icon: 7});
  <%}else{%>
     alert("旧密码不能为空，请输入！");
  <%}%>
  SetFocus(theForm.OldPwd);
  return false;
}
if(trim(theForm.NewPwd1.value)=="")
{

  <%if("6".equals(user.getUserWINDOWTYPE())){%>
    parent.layer.alert('新密码不能空，请输入！', {icon: 7});
  <%}else{%>
    alert("新密码不能空，请输入！");
  <%}%>
  SetFocus(theForm.NewPwd1);
  return false;
}

if(trim(theForm.NewPwd2.value)=="")
{

  <%if("6".equals(user.getUserWINDOWTYPE())){%>
    parent.layer.alert('确认密码不能空，请输入！', {icon: 7});
  <%}else{%>
    alert("确认密码不能空，请输入！");
  <%}%>
  SetFocus(theForm.NewPwd2);
  return false;
}

if(theForm.NewPwd1.value!=theForm.NewPwd2.value)
{
  //alert("!");
  <%if("6".equals(user.getUserWINDOWTYPE())){%>
    parent.layer.alert('两次输入的密码不一致！', {icon: 7});
  <%}else{%>
    alert("两次输入的密码不一致！");
  <%}%>
   SetFocus(theForm.NewPwd2);
  return false;
}
 RegForm.Type.value="User";
 return true;
}

</SCRIPT>
</HEAD>
<BODY class="BodyMain">
<FORM name="RegForm" method="post" Action="PwdResult.jsp" onsubmit="return Check(this);">
<input type="hidden" name="ISSYSTEM" value="0">
<input type="hidden" name="USER_NO" value="<%=user.getUserID()%>">
<input type="hidden" name="Type" value="">

   <br>&nbsp;
           <fieldset style="width: 98%">
           <legend>修改密码</legend>
  <TABLE border='0' width="100%" cellspacing="0" cellpadding="0" align="center">

    <TR>
      <TD class="PutdSet" width="40%">旧密码：</TD>
      <TD class="inputTd">
        <input class="text" type="password" name="OldPwd" size="56" maxlength="32"><Font class="WriteSign">*</Font>
      </TD>
    </TR>
    <TR>
      <TD class="PutdSet" width="40%">新密码：</TD>
      <TD >
        <input class="text" type="password" name="NewPwd1" size="56" maxlength="32"><Font class="WriteSign">*</Font>
      </TD>
    </TR>
    <TR>
      <TD class="PutdSet" width="40%">确认密码：</TD>
      <TD>
        <input  class="text" type="password" name="NewPwd2" size="56" maxlength="32"><Font class="WriteSign">*</Font>
      </TD>
    </TR>

  </TABLE>
    <br>
          </fieldset>
                 <center><br>
                 <table cellspacing="0" cellpadding="0" border='0'><tr>
                 <%=userUI.ClickButton("修 改","JavaScript:if(Check(document.RegForm)){document.RegForm.submit();}","buttonSave.gif",user.getUserImage())%>
                 <%=userUI.ClickButton("重 填","JavaScript:document.RegForm.reset();","buttonReset.gif",user.getUserImage())%>
                 </tr></table>
                 </center>


</FORM>
</BODY>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
userService = null;
%>
