📄 query.asp
字号:
<!--#include file="conn.asp"-->
<%
searchwhat=trim(request.form("searchwhat"))
dim p
p=0
%>
<html>
<head>
<title>航空售票系统</title>
<link rel="stylesheet" href="ticket.css">
</head>
<body bgcolor="#F4F4FF">
<p align="center">订票号或身份证号中包含<font color=red><b><%=searchwhat%></b></font>的查询结果:</p>
<table width="50%" border="0" align="center" cellspacing="1" bgcolor="#C0C0C0">
<tr><th>日期</th><th>订票号</th><th>班次</th><th>座位号</th><th>姓名</th><th>身份证号</th></tr>
<%
counter=1
do while counter < 7
%>
<%
if counter=6 and p=0 then
response.write "对不起,没有符合条件的机票信息!"
exit do
end if
%>
<%
set rs=server.CreateObject ("ADODB.Recordset")
str="select ID,flight,num,name,idcard,flag from "&counter&" where ID =" & searchwhat & " or idcard =" & searchwhat & " and flag=1"
rs.open str,conn,3
if searchwhat="" then%>
<script language=vbscript>
MsgBox "错误:你没有填写查询内容!"
location.href = "javascript:history.back()"
</script>
<%else
%>
<%
if rs.EOF then
response.write ""
else
do while not rs.eof
p=1
for i=0 to rs.fields.count-1 step 6
%>
<tr valign="middle" bgcolor="#F4F4FF" align="center">
<td><%=counter%></td><td><%=rs(i)%></td><td> <%=rs(i+1)%></td><td><%=rs(i+2)%></td><td><%=rs(i+3)%></td><td><%=rs(i+4)%></td>
</tr>
<%next
rs.movenext
loop
end if
end if
%>
<%
counter=counter+1
Loop
%>
</table><br>
<center>
<a href="logout.asp">☆确定☆</a></center></br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -