question.asp

来自「房地产管理系统 vb写的,很不错!!!!!!!!!!!」· ASP 代码 · 共 110 行

ASP
110
字号
<%'┌─  风云ASP在线  ────────────────────────┐'│                                                                 │'│  作者:赵振波.	http://www.fyasp.com	    				    │'│                                                                 │'│   Q Q:176189168  										   	    │'│                                                                 │'│ Email:fy96@163.com                                             │'│                                                                 │'│ 程序定做,系统开发,网站制作,提供高质量的网络产品、技术和服务!│'│                                                                 │'│                                                                 │'└───────────────────  http://www.fyasp.com ──┘%><!--#include file="../inc/conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>找回密码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../inc/style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="5" topmargin="5" marginwidth="0" marginheight="0">
<%
if trim(request("tijiao"))="" then
%>
<%
opendataconn
id=trim(request("id"))
if id="" then
id=0
end if
sql="select * from company where id="&id&""
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof then 
question=trim(rs("question"))
end if
rs.close
set rs=nothing
closedataconn
%>
<table width="233" height="89" border="0" cellpadding="0" cellspacing="1" bgcolor="#76AE00">
  <tr>
    <td height="27" class="black">
<div align="center"><font color="#FFFFFF"><strong><% if session("err")=true then response.write "<font color='#ffff00'>您的回答不正确!</font>" else if session("err")=false then response.write "祝贺您找到了密码!" else response.write " 请回答以下问题" end if%></strong></font></div></td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF" class="black"><div align="center">
	<% if session("youpwd")="" then%>
        <form name="form1" method="post" action="question.asp">
          <br>
          问题: 
          <input name="question" type="text" id="question" value="<%=question%>" size="20">
          <br>
          答案: 
          <input name="answer" type="text" id="answer" size="20">
          <br>
          <input name="id" type="hidden" id="id" value="<%=trim(request("id"))%>">
          <br>
          <input name="tijiao" type="submit" id="tijiao" value="确定" onclick="javascript:return checkfield()">
          <input type="reset" name="Submit2" value="重写">
          <SCRIPT language=VBScript>

function checkfield()
	if trim(form1.answer.value)="" then
		msgbox "请填写答案!"
		form1.answer.focus
		checkfield=false
		exit function
	end if

	checkfield=true
end function
</SCRIPT>
        </form>
		<%
		else
		response.write "您的密码是:" & session("youpwd")
		session("youpwd")=""
		end if
		%>
      </div></td>
  </tr>
</table>
<%
else
opendataconn
id=trim(request("id"))
answer=trim(request("answer"))
set rs=server.createobject("adodb.recordset")
sql="select * from company where id="&id&" and answer='"&answer&"'"
rs.open sql,conn,1,1
if rs.eof then
session("err")=true
response.redirect "question.asp?id=" & id & ""
else
session("youpwd")=trim(rs("pwd"))
session("err")=false
response.redirect "question.asp?id=" & id & ""
end if
rs.close
set rs=nothing
closedataconn
end if

%>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?