<!--#include file="pysjzx_conn.asp"-->
<!--#include file="../webconfig.asp"-->
<!--#include file=../md5.asp -->
<%
ServerName1=Cstr(Request.ServerVariables("HTTP_REFERER"))
ServerName2=Cstr(Request.ServerVariables("SERVER_NAME"))
If Mid(ServerName1,8,len(ServerName2))<>ServerName2 Then
    Response.Write "路径有误，禁止从网站外部提交表单！"
    response.end
End if
username=replace(trim(request("username")),"'","")
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from [pysjzx_user] where username='"&username&"'"
rs.open sql,conn,1,1
If rs.eof Then
%>
<script language="javascript">
alert("这个用户还没有注册呢，请注册！");window.close();
response.End
</script>
<%
End If
If rs("answer")<>md5(trim(request("answer"))) Then
Response.redirect"getpwderr.asp?content=答案"
End If
%>
<html>

<head>
<title><%=webname%>-取回密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="<%=keyword%>" name="keywords">
<meta content="<%=description%>" name="description">
<LINK href="../css/style.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("为了安全，您的密码应该大于6个字符！")
	  document.FrmAddLink.passwd.focus()
	  return false
	 }
else if (document.FrmAddLink.passwd.value.length > 20)
	{
	  alert("您的密码太长了吧，要小于20个字符哟！")
	  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>
<!--#include file=webhead.asp -->
<body oncontextmenu="self.event.returnValue=false">
<div align="center">
<table border="1" width="780" style="border-collapse: collapse" bordercolor="#E4E4E4">
	<tr>
		<td width=200>　</td>
		<td>
  <table border="0" cellpadding="0" width="320" cellspacing="0" height="49" align="center">
    <form method="POST" name="FrmAddLink" language="javascript" onsubmit="return FrmAddLink_onsubmit()" action="getpassword4.asp?username=<%=username%>&depid=<%=depid%>">      
<tr>
      <td width="100%" height="22" align="center"> 
        <strong>重新设置密码</strong></td>
	</tr>
	<tr> 
      <td width="100%" height="1" align="center"> 新&nbsp;密&nbsp;码： 
        <input type="password" name="passwd" size="12" maxlenght=20 class=wenbenkuang>
        <br><br>验证密码：
          <input type="password" name="passwd2" size="12" maxlenght=20 class=wenbenkuang>
        <br><br>
        <input type="submit" value=" 设置密码 " name="submit" class=go-wenbenkuang ></td>
	</tr>
	<tr>
      <td align="center"><br>
        <a href="javascript:window.close()" class="1">关闭窗口</a></td>
	</tr>
 </table>
		</td>
	</tr>
</table>
  	</div>
</center>
</div>
</form>
</body>
</html><%   
conn.close   
set conn=nothing 
%><!--#include file=webfoot.asp -->