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

📄 guonei.asp

📁 航空订票系统基于asp.net和sql2005包含数据库和图片
💻 ASP
字号:
<!--#include file="../global/inc/global.inc.asp"-->
<%
on error resume next
FlyFlag = 3
BasicType = 2
oConn_Start
FromClassIdOptions = GetOptions("Select ClassId as id,ClassName as name from sm_Class Where ClassType=1 And FatherId=0 And ValidFlag=1",0)
ToClassIdOptions = GetOptions("Select ClassId as id,ClassName as name from sm_Class Where ClassType=2 And FatherId=0 And ValidFlag=1",0)
FlyIdOptions = GetOptions("Select BasicId as id,BasicName as name from sm_BasicParam Where ValidFlag=1 And BasicType="&BasicType,0)
'本页地址
FromClassId = Request("FromClassId")
ToClassId = Request("ToClassId")
FlyId = Request("FlyId")
thisurl = "guonei.asp?FromClassId="&FromClassId&"&ToClassId="&ToClassId&"&FlyId="&FlyId&"&"

'获取时间开始
GoDateYear=request("GoDateYear")
if GoDateYear="" then
GoDateYear=Year(now)
end if
GoDateYear=int(left(GoDateYear,4))

GoDateMonth=request("GoDateMonth")
if GoDateMonth="" then
GoDateMonth=month(now)
end if
GoDateMonth=int(left(GoDateMonth,2))

'response.write GoDateMonth
'response.end

GoDateDay=request("GoDateDay")
if GoDateday="" then
GoDateday=day(now)
end if
GoDateday=int(left(GoDateday,2))
'获取时间结束
strPagedList = strPagedList +  "<table width=""100%"" align=""center"" cellpadding=""2"" cellspacing=""1"" bgcolor=""416383"">"& vbCrLf
strPagedList = strPagedList +  "                  <tr align=""center"" bgcolor=""#2580D6"" height=""20"">"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">出发地</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">目的地</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">机场</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">航空公司</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">出发时间</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">到达时间</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">航班号</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">机型</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"">每周航班</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw""><strong>全价</strong></td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw""><strong>特价</strong></td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"" width=""46"">详细</td>"& vbCrLf
strPagedList = strPagedList +  "                    <td class=""tw"" width=""72"">预订</td>"& vbCrLf
strPagedList = strPagedList +  "                  </tr>"& vbCrLf
if GoDateYear-int(Year(now))>=1 and GoDateMonthM<>1 and Int(month(now))<>12 and int(day(now))<>25 then
strPagedList = strPagedList +  "<tr><td align=center colspan=13 height=25 bgcolor=""#ffffff"">查询数据尚未更新!</td></tr>"
elseif GoDateMonth-int(month(now))<0 then
strPagedList = strPagedList +  "<tr>"
strPagedList = strPagedList +  "<td align=center colspan=13 height=25 bgcolor=""#ffffff"">查询数据已经过期!</td>"
strPagedList = strPagedList +  "</tr>"
elseif GoDateMonth-int(month(now))>=1 and int(day(now))<25 then
strPagedList = strPagedList +  "<tr>"
strPagedList = strPagedList +  "<td align=center colspan=13 height=25 bgcolor=""#ffffff"">查询数据尚未更新!</td>"
strPagedList = strPagedList +  "</tr>"
elseif GoDateMonth-int(month(now))>1 then
strPagedList = strPagedList +  " <tr>"
strPagedList = strPagedList +  "<td align=center colspan=13 height=25 bgcolor=""#ffffff"">查询数据尚未更新!</td>"
strPagedList = strPagedList +  "</tr>"
Else
'获取分页产品分类

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 I.FlyFlag="&FlyFlag
if FromClassId<>"" then strSql = strSql + " And i.FromClassId="&FromClassId
if ToClassId<>"" then strSql = strSql + " And i.ToClassId="&ToClassId
if FlyId<>"" then strSql = strSql + " And i.CompanyId="&FlyId
strSql = strSql + " Order by ToClassName asc,FromTime asc,ToTime asc"
'Response.Write(strSql)
set oRs = server.CreateObject("adodb.recordset")
oRs.Open strSql,oConn,1,1

intcount = 0
pgsz=20 '设定每页显示记录数
if oRs.Eof Then
	strPagedList = strPagedList &"<tr><td align=center height=25 bgcolor=white colspan=13><font color=red>还没有相关的机票信息!</red></td></tr>"
Else
	count=oRS.recordcount '记录总数
	oRS.PageSize = Cint(PgSz)  '页面总数
	Total=INT(count / PgSz * -1)*-1  '总的页数
	PageNo=Request("pageno")
	if PageNo="" Then
		PageNo = 1
	end if 
	if PageNo < 1 Then 
		PageNo = 1
	end if
	oRS.AbsolutePage = PageNo
	While Not oRs.Eof and intcount<pgsz
	InterId = oRs("InterId")
	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")
	strPagedList = strPagedList +  "                  <tr bgcolor=""#FFFFFF"" onMouseMove=""this.style.backgroundColor='C5DBF0'"" onMouseOut=""this.style.backgroundColor=''"" height=30>				"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center"">"&FromClassName&"</td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center"">"&ToClassName&"</td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center""> "&FlyName&" </td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center""> "&CompanyName&" </td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center"">"&FromTime&"</td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center"">"&ToTime&"</td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center"">"&FlyNo&"</td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center""> "&FlyType&" </td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center""> "&FlyWeekNo&" </td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center""><font color=blue>"&FlyPrice&"</font></td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center""><span class=""style1"">"&FlyDoublePrice&"</span></td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center""><a href=""../kgTicket/"&InterId&".htm"">查看</a><img src=""../images/icon.gif"" width=""16"" height=""16"" border=""0""></td>"& vbCrLf
	strPagedList = strPagedList +  "                    <td align=""center""><a href=""guoneiorder1.asp?InterId="&InterId&""">订购<img src=""../images/basket.gif"" width=""20"" height=""14"" border=""0""></a></td>"& vbCrLf
	strPagedList = strPagedList +  "                  </tr>				  "& vbCrLf
	intcount = intcount+1
	oRs.MoveNext
	Wend
	strPageInfo = list_total(count,pageno,pgsz,total,thisurl)
End If
End If
strPagedList = strPagedList +  "              </table>"& vbCrLf
oRs.Close
Set oRs = Nothing
oConn_Close
%>
<!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>国内机票-上海神马航空特价打折飞国际机票票价查询票务中心021-51099919</title>
<link href="../style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
<script language="JavaScript">
function openremote() {
	window.open("http://www.travelsky.com/gb/Trip.jsp","查看机票订座情况","toolbar=no,scrollbars=no,resizable=no,width=750,height=500")
}
</script>
</head>

<body>
<%=GetWebTop("2")%>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="780" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td class="orgborder"><table width="100%"  border="0" cellspacing="0" cellpadding="5">
              <tr>
                <td class="txt1"><form name="form1" method="post" action="guonei.asp">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="5">
                    <tr bgcolor="f7f7f7">
                      <td width="11%">出 发 地: </td>
                      <td colspan="2">
                        <div align="left">
                          <select name="FromClassId" size="1" id="FromClassId">
                            <option value="" selected>请选择航班出发地点</option>
                            <%=FromClassIdOptions%>
                          </select>
                      </div></td>
                      <td width="38%">目 的 地:
                          <select name="ToClassId" size="1" id="ToClassId">
                            <option value="" selected>请选择航班到达地点</option>
                            <%=ToClassIdOptions%>
                        </select></td>
                      <td width="29%" > <a href="http://www.travelsky.com/travelsky/html/page21.htm" target="_blank"><img src="../images/ck.gif" width="120" height="21" border="0"></a></td>
                    </tr>
                    <tr bgcolor="f7f7f7">
                      <td width="11%">航空公司:</td>
                      <td colspan="2">
                        <select name="FlyId" size="1" id="FlyId">
                          <option value="" selected>所有航空公司</option>
                          <%=FlyIdOptions%>
                      </select></td>
                      <td>日 期:
                          <select name="GoDateYear" id="select">
                            <option value="<%
              if len(year(now))=1 then
              response.write "0"&month(now)&"年"
              else
              response.write year(now)&"年"
              end if
              %>" selected>
                            <%
              if len(year(now))=1 then
              response.write "0"&month(now)&"年"
              else
              response.write year(now)&"年"
              end if
              %>
                            </option>
                            <% 
			  for i=0 to 4
			  	SubYear =year(now) + i 
			  	SubYear=SubYear&"年"
			  %>
                            <option value="<%= SubYear %>"><%= SubYear%></option>
                            <%
			  next
			  %>
                          </select>
                          <select name="GoDateMonth">
                            <option value="<%
              if len(month(now))=1 then
              response.write "0"&month(now)&"月"
              else
              response.write month(now)&"月"
              end if
              %>" selected>
                            <%
              if len(month(now))=1 then
              response.write "0"&month(now)&"月"
              else
              response.write month(now)&"月"
              end if
              %>
                            </option>
                            <% 
			  for i=1 to 12
			  SubMonth = i
			  if len(SubMonth)=1 then
			  SubMonth="0"&SubMonth&"月"
			  else
			  SubMonth=SubMonth&"月"
			  end if
			  %>
                            <option value="<%= SubMonth %>"><%= SubMonth %></option>
                            <%
			  next
			  %>
                          </select>
                          <select name="GoDateDay">
                            <option value="<%
              if len(day(now))=1 then
              response.write "0"&day(now)&"日"
              else
              response.write day(now)&"日"
              end if              
              %>" selected>
                            <%
              if len(day(now))=1 then
              response.write "0"&day(now)&"日"
              else
              response.write day(now)&"日"
              end if              
              %>
                            </option>
                            <% 
			  for i=1 to 31
			  SubDay = i
			  if len(SubDay)=1 then 
			  SubDay="0"&SubDay&"日"
			  else
			  SubDay=SubDay&"日"
			  end if
			  %>
                            <option value="<%= SubDay %>"><%= SubDay %></option>
                            <%
			  next
			  %>
                          </select>
                      </td>
                      <td><div align="left">
                          <input name="imageField" type="image" src="../images/search.gif" width="65" height="22" border="0">
                      </div></td>
                    </tr>
                  </table>
                </form></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td><img src="../images/5.gif" width="1" height="5"></td>
        </tr>
        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><%=strPagedList%></td>
              </tr>
              <tr>
                <td><img src="../images/5.gif" width="1" height="5"></td>
              </tr>
          </table></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <%=strPageInfo%>
  <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 + -