<!--#include file="../inc/conn.asp"-->
<HTML>
<HEAD>
<title>取回密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link href="../css/xmwuye.css" rel="stylesheet" type="text/css">
<script>
    window.resizeTo(210,160);
    window.moveTo(screen.width/2-210/2,screen.height/2-160/2);
</script>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function window_onresize() {
    window.resizeTo(210,160);
    window.moveTo(screen.width/2-210/2,screen.height/2-160/2);
}

//-->
</SCRIPT>
<%
mode=request.querystring("mode")
if mode=1 then
%>
<body style="BACKGROUND-COLOR: buttonface; BORDER: medium none; PADDING: 6px" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" LANGUAGE="javascript" onresize="return window_onresize()">
<br><br>
<form name="form1" method="post" action="getpwd.asp?mode=2">
  <table width="100%" border="0" align="center">
    <tr align="center"> 
      <td>用户名： 
        <input type="text" name="bbsuser" size="10">
        <input type="submit" name="Submit" value="提交">
      </td>
    </tr>
  </table> 
</form>
<%end if%>
<%if mode=2 then
bbsuser=trim(request.form("bbsuser"))
sql="select * from bbsusertb where bbsuser='"&bbsuser&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
if rs.eof then
%>
<div align=center>不存在该用户！<BR><BR>
<A HREF="<%=request.servervariables("http_referer")%>">[返回]</A>

</div>
<%else
session("bbsuser_pwd")=rs("bbsuser")
%>
<body style="BACKGROUND-COLOR: buttonface; BORDER: medium none; PADDING: 6px" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" LANGUAGE="javascript" onresize="return window_onresize()">
<form name="form1" method="post" action="getpwd.asp?mode=3">
<br>
  <table width="100%" border="0" align="center">
    <TR> 
      <TD width="48%"> 
        <div align="right">您的问题:</div>
      </TD>
      <TD width="52%"><FONT COLOR="red"><%=rs("question")%></FONT></TD>
    </TR>
    <TR> 
      <TD width="48%"> 
        <div align="right">问题答案:</div>
      </TD>
      <TD width="52%"> 
        <input type="text" name="answer" size="10"> </TD>
    </TR>
    <TR> 
      <TD colspan="2"> <div align="center"> 
          <input type="submit" name="Submit" value="提交">
        </div></TD>
    </TR>
  </TABLE>
</form>

<%end if%>
<%end if%>

<%if mode=3 then
answer=trim(request.form("answer"))
sql="select * from bbsusertb where bbsuser='"&session("bbsuser_pwd")&"' and answer='"&answer&"'"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
if rs.eof then
%>
<div align=center>答案错误，请重新输入！<BR><BR>
<A HREF="javascript:window.history.back()">[返回]</A>
</div>
<%else%>
<div align=center>您的密码是：<FONT COLOR="red"><%=rs("password")%></FONT><BR><BR>
<A HREF="javascript:window.close()">[关闭窗口]</A>
</div>
<%end if%>
<%end if%>
</body>
</HTML>