<!--#include file=conn.asp -->
<!--#include file=md5.asp -->
<%
username=request("username")
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from [shop_user] where username='"&username&"'"
rs.open sql,conn,1,1
If rs.eof Then
%>
<script language="javascript">
alert("这个用户还没有注册呢，请到首页注册吧！")
location.href="javascript:history.back()"
</script>
<%
End If
If rs("answer")<>md5(trim(request("answer"))) Then
Response.redirect"getpwderr.asp?content=答案"
End If
%>
<html>
<head>
<title>取回密码</title>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<script LANGUAGE="javascript">
<!--
function FrmAddLink_onsubmit() {
 if (document.FrmAddLink.passwd.value=="")
	{
	  alert("对不起，请您输入密码！")
	  document.FrmAddLink.passwd.focus()
	  return false
	 }
else if (document.FrmAddLink.passwd.value.length < 6)
	{
	  alert("为了安全，您的密码应该长一点！")
	  document.FrmAddLink.passwd.focus()
	  return false
	 }
else if (document.FrmAddLink.passwd.value.length > 16)
	{
	  alert("您的密码太长了吧！")
	  document.FrmAddLink.passwd.focus()
	  return false
	 }
else if (document.FrmAddLink.passwd2.value=="")
	{
	  alert("对不起，请您输入验证密码！")
	  document.FrmAddLink.passwd2.focus()
	  return false
	 }
else if (document.FrmAddLink.passwd2.value !== document.FrmAddLink.passwd.value)
	{
	  alert("对不起，您两次输入的密码不一致！")
	  document.FrmAddLink.passwd2.focus()
	  return false
	 }
}

//-->
</script>
</head>
<body bgcolor="#FFFFFF" topmargin="11" leftmargin="0" oncontextmenu="self.event.returnValue=false">
<form method="POST" name="FrmAddLink" language="javascript" onsubmit="return FrmAddLink_onsubmit()" action="getpwd4.asp?username=<%=username%>&depid=<%=depid%>"> 
  <br><br>
  <TABLE width=500 border=0 align="center" cellPadding=0 cellSpacing=1 bgcolor="#CCCCCC">
    <TBODY>
      <TR> 
        <TD height=25 colSpan=2 bgcolor="#FFFFFF"><FONT 
                  color=#ff6600><B>&nbsp;&nbsp;<img src="images/o.gif" width="15" height="15"> 
          <strong>取回密码</strong></B></FONT></TD>
      </TR>
      <TR> 
        <TD align=left vAlign=top bgcolor="#FFFFFF"> 
          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
                  <tr> 
                    <td height="10"></td>
                  </tr>
                </table>
                <table border="0" cellpadding="0" width="98%" cellspacing="0" height="49" align="center">
                  <tr> 
                    <td width="100%" height="22"> <p>第三步：重新设置密码。 </td>
                  </tr>
                  <tr> 
                    <td width="100%" height="1"> 新&nbsp;密&nbsp;码： 
                      <input type="password" name="passwd" size="12" maxlenght=16 class="wenbenkuang"  > 
                      <br>
                      验证密码： 
                      <input type="password" name="passwd2" size="12" maxlenght=16 class="wenbenkuang"  > 
                      <br> <input name="Submit" type="submit" class="go-wenbenkuang" value="下一步设置新密码"> 
                      <a href="javascript:window.close()" class="1">关闭窗口</a> </td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" height="5">
                  <tr> 
                    <td height="10"></td>
                  </tr>
                </table></td>
            </tr>
          </table></TD>
      </TR>
    </TBODY>
  </TABLE>
</form>
</body>
</html><%   
conn.close   
set conn=nothing   
%>