📄 booksearchrlt.asp
字号:
<!--#include file="../conndb.asp"-->
<!--#include file="isAdmin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>报名查询结果</title>
<link href="../style.css" rel="stylesheet">
<script language="javascript">
function AreaWin(url) {
var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=200,top=200";
oth = oth+",width=620,height=430";
var AreaWin=window.open(url,"AreaWin",oth);
AreaWin.focus();
return false;
}
</script>
</head>
<body link="#000080" vlink="#080080">
<form id="form1" name="form1" method="POST">
<%
Dim SearchCnd,schDate
SearchCnd = "" '存储查询条件子句
schDate = ""
'读取线路编号
lid = Request("slt")
If Cint(lid) <> 0 Then
'表示选择线路
SearchCnd = "l.LineId=" & CInt(lid)
End If
'判断日期范围
sDate = Request("sdate")
eDate = Request("edate")
If IsDate(eDate) And eDate<>"" Then
If IsDate(sDate) And sDate<>"" Then
schDate = " b.PostDate Between '" & sDate & "' And '" & eDate &"'"
Else
schDate = " b.PostDate<' "& eDate & "'"
End If
Else
If IsDate(sDate) And sDate<>"" Then
schDate = " b.PostDate>'" & sDate & "'"
End If
End If
'读取报名人,并设置查询条件,查询条件与线路查询条件合并
sPerson = Request("Person")
If sPerson<>"" And SearchCnd="" Then
SearchCnd = " b.BookPerson Like '%" & Trim(sPerson) & "%'"
ElseIf sPerson<>"" And SearchCnd<>"" Then
SearchCnd = SearchCnd & " And b.BookPerson Like '%" & Trim(sPerson) & "%'"
End If
'综合处理查询条件,
If SearchCnd="" And schDate<>"" Then
SearchCnd = schDate
ElseIf SearchCnd<>"" And schDate<>"" Then
SearchCnd = SearchCnd & " And " & schDate
ElseIf SearchCnd<>"" And schDate="" Then
SearchCnd = SearchCnd
End If
'根据查询条件设置SELECT语句
Dim rs
Set rs = Server.CreateObject("ADODB.RecordSet")
If SearchCnd = "" Then '如果没有查询条件,则显示所有报名记录
sql = "SELECT b.*,l.LineName FROM Book b,Line l WHERE b.LineId=l.LineId Order By b.BookId Desc"
Else '根据查询条件生成SELECT语句
sql = "SELECT b.*,l.LineName FROM Book b,Line l WHERE b.LineId=l.LineId And "&SearchCnd&" Order By b.BookId Desc"
End If
rs.Open sql, Conn, 1, 1
%>
<p align=center><font style='FONT-SIZE:12pt' color="#000080"><b>符合条件的报名信息</b></font></p>
<table align=center border="1" cellspacing="0" width="100%" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF">
<tr>
<td width="12%" align="center" bgcolor="#BEDCFA"><strong>报名日期</strong></td>
<td width="40%" align="center" bgcolor="#BEDCFA"><strong>线路名称</strong></td>
<td width="18%" align="center" bgcolor="#BEDCFA"><strong>报名人</strong></td>
<td width="30%" align="center" bgcolor="#BEDCFA"><strong>联系方式</strong></td>
</tr>
<%
Do While Not rs.Eof
%>
<tr>
<td align="center"><%=rs("PostDate")%></td>
<td><a href="/travel/LineView.asp?lid=<%=rs("LineId")%>" target="_blank">
<%=rs("LineName")%></a></td>
<td align="center"><a href="BookView.asp?bid=<%=rs("BookId")%>" onclick="return AreaWin(this.href)">
<%=rs("BookPerson")%></a></td>
<td align="center"><%=rs("Telephone")%> <%=rs("Mobile")%></td>
</tr>
<%
rs.MoveNext()
Loop
rs.Close
%>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -