⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 order3.asp

📁 航空订票系统基于asp.net和sql2005包含数据库和图片
💻 ASP
字号:
<!--#include file="../global/inc/global.inc.asp"-->
<!--#include file="SendMail.asp"-->
<%
if OrderYesNo = 0 then
Response.Redirect("InvalidOrder.asp")
Response.End()
End If
ContactName = Request.Form("ContactName")
sex = Request.Form("sex")
Mobile = Request.Form("Mobile")
PersonNum = Request.Form("PersonNum")
GoDateYear = Request.Form("GoDateYear")
GoDateMonth = Request.Form("GoDateMonth")
phone = Request.Form("phone")
GoDateDay = Request.Form("GoDateDay")
address = Request.Form("address")
BackTime = Request.Form("BackTime")
id = Request.Form("id")
email = Request.Form("email")
OrderMemo = Server.HTMLEncode(Request.Form("OrderMemo"))
qq = Request.Form("qq")
InterId = Request.Form("InterId")

oConn_Start
Set oRs = server.CreateObject("Adodb.Recordset")
oRs.open "Select * From sm_Order Order by OrderId Desc",oConn,1,3
oRs.AddNew
oRs("InterId") = InterId
'oRs("FlyTrueName") = FlyTrueName
'oRs("FlyCardNo") = FlyCartNo
oRs("ContactName") = ContactName
oRs("sex") = sex
oRs("Mobile") = Mobile
oRs("PersonNum") = PersonNum
'response.write cdate(GoDateYear&"-"&GoDateMonth&"-"&GoDateDay)
oRs("FromTime") = cdate(GoDateYear&"-"&GoDateMonth&"-"&GoDateDay)
oRs("phone") = phone
oRs("address") = address
oRs("BackTime") = BackTime
oRs("email") = email
oRs("OrderMemo") = OrderMemo
oRs("qq") = qq
oRs("Ip") = GetClientIp()
oRs("ValidFlag") = 1
oRs("DateCreated") = now()
oRs.Update
oRs.Close
Set oRs = Nothing
Set oRs = oConn.Execute("Select OrderId From sm_Order Order by OrderId Desc")
OrderId = oRs(0)
oRs.Close
Set oRs = Nothing

strCK = strCK +  "<table width=""80%""  border=""0"" cellspacing=""0"" cellpadding=""0"">"& vbCrLf
strCK = strCK +  "                            <tr>"& vbCrLf
strCK = strCK +  "                              <td><span class=""T01"">乘机人姓名</span></td>"& vbCrLf
strCK = strCK +  "                              <td><span class=""T01"">乘机人身份证号或护照号</span></td>"& vbCrLf
strCK = strCK +  "                            </tr>"& vbCrLf

for i = 1 to PersonNum
FlyTrueName = Request.Form("FlyTrueName"&i)
FlyCartNo = Request.Form("FlyCartNo"&i)
strCK = strCK +  "                            <tr>"& vbCrLf
strCK = strCK +  "                              <td><span class=""T05""><span class=""T03"">"&FlyTrueName&" </span></span> </td>"& vbCrLf
strCK = strCK +  "                              <td><span class=""T05""><span class=""T03"">"&FlyCartNo&" </span></span></td>"& vbCrLf
strCK = strCK +  "                            </tr>"& vbCrLf

'response.write "Insert into sm_OrderDetail(OrderId,FlyTrueName,FlyCardNo) values("&OrderId&",'"&FlyTrueName&"','"&FlyCartNo&"')"
oConn.Execute("Insert into sm_OrderDetail(OrderId,FlyTrueName,FlyCardNo) values("&OrderId&",'"&FlyTrueName&"','"&FlyCartNo&"')")
next

strCK = strCK +  "                          </table>"& vbCrLf

bodyContent = bodyContent +  "<table width=""98%"" border=""0""  cellpadding=""5"" cellspacing=""0"" >"& vbCrLf
bodyContent = bodyContent +  "  <tr bgcolor=""f5f5f5"">"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"" bgcolor=""f5f5f5"" >订票联系人姓名</td>"& vbCrLf
bodyContent = bodyContent +  "    <td width=""207"" bgcolor=""f5f5f5""  >"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"& vbCrLf
bodyContent = bodyContent +  ContactName + "        </div></td>"& vbCrLf
bodyContent = bodyContent +  "    <td width=""53"">"& vbCrLf
bodyContent = bodyContent +  "      <div align=""center"">性别</div></td>"& vbCrLf
bodyContent = bodyContent +  "    <td width=""329"" bgcolor=""f5f5f5"">"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"&sex&"</div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr>"& vbCrLf
bodyContent = bodyContent +  "    <td align=""center"" width=""136"">旅客人数</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"" >"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"& vbCrLf
bodyContent = bodyContent +  PersonNum+"         </div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr bgcolor=""f5f5f5"">"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"" bgcolor=""f7f7f7"">出发日期</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3""  >"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left""><FONT size=2>"&GoDateYear&"-"&GoDateMonth&"-"&GoDateDay
bodyContent = bodyContent +  "        </FONT></div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr>"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"">返回日期</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3""  class=><div align=""left""><FONT size=2>"& vbCrLf
bodyContent = bodyContent +  BackTime+"        </FONT></div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr bgcolor=""f5f5f5"">"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"" bgcolor=""f7f7f7"">手机号码</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"" class=>"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"& vbCrLf
bodyContent = bodyContent + Mobile+ "        </div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr>"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"">固定电话</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"">"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"& vbCrLf
bodyContent = bodyContent + phone+ "        </div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr bgcolor=""f5f5f5"">"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"" bgcolor=""f7f7f7"">送票地址</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"" class=>"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"& vbCrLf
bodyContent = bodyContent +  address+"        </div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr>"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"">E-mail</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"" class=>"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"& vbCrLf
bodyContent = bodyContent +  email+"        "& vbCrLf
bodyContent = bodyContent +  "    </div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr bgcolor=""f5f5f5"">"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"" bgcolor=""f7f7f7"">QQ</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"" class=>"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"& vbCrLf
bodyContent = bodyContent +  QQ+"        "& vbCrLf
bodyContent = bodyContent +  "    </div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr>"& vbCrLf
bodyContent = bodyContent +  "    <td width=""136"" align=""center"">备注</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"" class=>"& vbCrLf
bodyContent = bodyContent +  "      <div align=""left"">"& vbCrLf
bodyContent = bodyContent +  OrderMemo+"        "& vbCrLf
bodyContent = bodyContent +  "    </div></td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "  <tr>"& vbCrLf
bodyContent = bodyContent +  "    <td align=""center"">订票时间</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"" class=>"&now()&"</td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "    <td align=""center"">乘机人详细情况</td>"& vbCrLf
bodyContent = bodyContent +  "    <td colspan=""3"" class=>"&strCK&"</td>"& vbCrLf
bodyContent = bodyContent +  "  </tr>"& vbCrLf
bodyContent = bodyContent +  "</table>"& vbCrLf

strSql = strSql + "Select C.ClassName,(Select ClassName From Sm_Class Where ClassId=I.ToClassId) as ToClassName,"&_
"(Select BasicName From Sm_BasicParam Where BasicId=I.FlyId) as FlyName,"&_
"(Select BasicName From Sm_BasicParam Where BasicId=I.CompanyId) as CompanyName,"&_
"I.* From Sm_Class c Inner Join Sm_InterFly I on c.ClassId=i.FromClassId Where InterId="&InterId
'response.write strSql
Set oRs = oConn.Execute(strSql)
if Not oRs.Eof Then
	FromClassName = oRs("ClassName")
	ToClassName = oRs("ToClassName")
	FlyName = oRs("FlyName")
	CompanyName = oRs("CompanyName")
	FromTime = GetFlyTime(oRs("FromTime"))
	ToTime = GetFlyTime(oRs("ToTime"))
	FlyPrice = oRs("FlyPrice")
	FlyDoublePrice = oRs("FlyDoublePrice")
	FlyNo = oRs("FlyNo")
	FlyType = oRs("FlyType")
	FlyWeekNo = oRs("FlyWeekNo")
	FlyFlag = oRs("FlyFlag")
	FlyMemo = ReplaceContent(oRs("FlyMemo"))
	bodyContent = bodyContent +  "<table width=""100%"" cellpadding=""5"" cellspacing=""0"">"& vbCrLf
	bodyContent = bodyContent +  "                  <tr>"& vbCrLf
	bodyContent = bodyContent +  "                    <td width=""13%"">航程:</td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td width=""87%"">"&FromClassName&"-"&ToClassName&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                  <tr bgcolor=""f7f7f7"">"& vbCrLf
	bodyContent = bodyContent +  "                    <td>始发地:</td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>"&FromClassName&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                  <tr>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>目的地:</td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>"&ToClassName&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                  <tr bgcolor=""f7f7f7"">"& vbCrLf
	bodyContent = bodyContent +  "                    <td>航空公司: </td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>"&CompanyName&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                  <tr>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>出发时间 : </td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>"&FromTime&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                  <tr bgcolor=""f7f7f7"">"& vbCrLf
	bodyContent = bodyContent +  "                    <td>到达时间:</td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>"&ToTime&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                  <tr>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>单程:</td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>"&FlyPrice&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                  <tr bgcolor=""f7f7f7"">"& vbCrLf
	bodyContent = bodyContent +  "                    <td>往返: </td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>"&FlyDoublePrice&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                  <tr>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>备注: </td>"& vbCrLf
	bodyContent = bodyContent +  "                    <td>"&FlyMemo&" </td>"& vbCrLf
	bodyContent = bodyContent +  "                  </tr>"& vbCrLf
	bodyContent = bodyContent +  "                </table>"& vbCrLf
End If
oRs.Close
Set oRs = nothing
oConn_Close

Call SendMail("zgc8886@163.com","神马机票订购信息",bodyContent)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>国际机票-上海神马航空特价打折飞国际机票票价查询票务中心021-51099919</title>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>

<body>
<!--#include file="../include/top.asp"-->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td valign="top" class="orgborder"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="25" background="../images/org_bk.gif">&nbsp;<img src="../images/arrow.gif" width="13" height="9"> <span class="tw"><strong>订购成功</strong></span></td>
      </tr>
      <tr>
        <td><table width="98%" align="center" cellpadding="5" cellspacing="0">
            <tr>
      <td width="100%" height="10">
      <form method="POST"  action="../buy_people.asp" name="regform">
        <div align="center">
            <table width="98%" border="0"  cellpadding="5" cellspacing="0">
               <tr>
        <td width="100%"> 
          <p align="center">感谢您到上海神马航空票务中心订票
          <p align="center">我们会尽快与您联系。        
        <p align="center">联系人: <%=WebContactName%></p>
        <p align="center" class="l15">订购成功</p>
        </td>
    </tr>
              <tr  bgcolor="f5f5f5"> 
                <td colspan="2"> 
                  <p align="center"><a href="guoji.asp"><img src="../images/goback.gif" border="0"></a></p>                </td>
              </tr>
            </table>
        </div>
        <input type="hidden" name="id" value="359">
		<SCRIPT language=JavaScript>
<!--
var today=new Date;
document.regform.GoDateYear.selectedIndex = today.getYear()-2003;
document.regform.GoDateMonth.selectedIndex = today.getMonth();
document.regform.GoDateDay.selectedIndex = today.getDate()-1;
//document.regform.BackDateYear.selectedIndex = today.getYear()-2003;
//document.regform.BackDateMonth.selectedIndex = today.getMonth();
//document.regform.BackDateDay.selectedIndex = today.getDate()-1;
//-->
</SCRIPT>
      </form>
      </td>
    </tr>
          
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
</table>
<div align=center>
<!--#include file="../include/bottom.asp"-->
</body>
</html>

⌨️ 快捷键说明

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