📄 orderok.asp
字号:
<!--#include file="conn.asp"-->
<%
dim sum
sum=20
date1=trim(request.form("date1"))
flight1=trim(request.form("flight1"))
name1=trim(request.form("name1"))
idcard1=trim(request.form("idcard1"))
num1=trim(request.form("num1"))
set rs=server.CreateObject ("ADODB.Recordset")
str="select ID,flight,num,name,idcard,flag from "&date1&" where num="&num1&" and flag=0 and flight='"&flight1&"'"
rs.open str,conn,1,3
if date1="" or flight1="" or num1="" or name1="" or idcard1="" then%>
<script language=vbscript>
MsgBox "请完整填写内容!"
location.href = "javascript:history.back()"
</script>
<%
else
if rs.EOF then %>
<script language=vbscript>
MsgBox "对不起,此机票已被预订或没有符合条件的机票!"
location.href = "javascript:history.back()"
</script>
<%
else
dim k
set rs_q=server.createobject("adodb.recordset")
rs_q.open "select * from counter where ID=2",conn,3,2
rs_q("data")=rs_q("data")+1
str="update "&date1&" set ID="&rs_q("data")&", name='" & name1 &"', idcard='" & idcard1 &"', flag=1 where num="&num1&" and flag=0 and flight='"&flight1&"'"
k=rs_q("data")
conn.execute (str)
rs_q.update
rs_q.close
rs.update
rs.close
end if
end if
%>
<html>
<head>
<title>航空售票系统</title>
<link rel="stylesheet" href="ticket.css">
<meta http-equiv="refresh" content="5;URL=logout.asp">
</head>
<body bgcolor="#F4F4FF">
<center>恭喜您,订票成功!<br>
本机的载客容量为<font color=red><%=sum%></font>人<br><br>
</center>
<center>
请牢记您的订票信息:</center>
<br><table width=600 border="1" align="center" cellspacing="0" bgcolor="#C0C0C0" bordercolor=#799AE1>
<tr align=center>
<td width="100">
订票ID</td>
<td width="40">
日期</td>
<td width="40">
班次</td>
<td width="80">
座位号</td>
<td width="80">
目的地</td>
<td width="80">
姓名</td>
<td width="150">
身份证号</td>
</tr>
<tr align=center>
<td><%=k%>
<td><%=date1%></td>
<td><%=fligh
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -