sdealsearch.asp

来自「家教信息管理系统的程序代码」· ASP 代码 · 共 67 行

ASP
67
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>学生信息检索结果页面</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 14px;
	color: #003399;
}
a:link {
	color: #003399;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color:  #003399;
}
a:hover {
	text-decoration: none;
	color: #003399;
}
a:active {
	text-decoration: none;
	color: #003399;
}
-->
</style></head>
<body>
<!--#include virtual="../inc/head.htm"-->
<table border="1" width="60%">
<tr><th>符合条件的学生</th>
<th>发布信息内容</th></tr>
<%
	Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open "Dbq=" & Server.Mappath("db/info.mdb") & ";Driver={Microsoft Access Driver (*.mdb)}"
	strSql="select snick from studentdetail "
	tutorship=Request.Form("tutorship")
	grade=Request.Form("select")
	sex=Request.Form("sex")
	if tutorship<>"" then 
		strSql=strSql & "where (tutorship1='%" & tutorship & "%' or tutorship2='%" & tutorship & "%')"
	End If
	if grade<>"" then 
		strSql=strSql & " and grade='" & grade & "'"
	End If
	if sex<>"" then 
		strSql=strSql & "and sex='" & sex & "'"
	End If
	strSql=strSql & " and  state='未找到'"
	Set rs=conn.Execute(strSql)
	Do While Not rs.EOF
	Response.Write("<tr><td><a href=studentdetail.asp?name=" & rs("snick") & ">" &  rs("snick") & "</a>")
	strSql1="select needcontent from studentinfo where snick='" & rs("snick") & "' order by puttime desc"
	Set rs1=conn.Execute(strSql1)
	     if Not rs1.EOF then 
		Response.Write("<td>" & rs1("needcontent"))
		End If
	rs.MoveNext
	Loop
%>
</table>
</body>
</html>

⌨️ 快捷键说明

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