%
city = request.QueryString("city")
If request.QueryString("city") = Empty Then
city = "beijing"
Else
city = changeParaStr(SafeRequest("city", 0))
End If
If city = "hongkong" Then
Response.Redirect(Replace(RewriteUrl, "/hongkongtour/", "/hong-kongtour/"))
'Response.Redirect()
city = "Hong Kong"
End If
If request.querystring("days") <> Empty Then
HideLineandold = true '隐藏长线和一地线路
days = SafeRequest("days", 1)
days_sql = " and dbo.V_SRMS_ResourceAllot_Tour_Price_CJ.CLI_Days = " & days
If days > 1 Then
days_txt = days & " Days " & capitalize(city) & " Tours, "
Else
days_txt = days & " Day " & capitalize(city) & " Tours,"
End If
Else
HideLineandold = false '显示长线和一地线路
End If
'URL定义-3H
Dim urlCityTourInfo
urlCityTourInfo = "/tour/{0}tour/{1}/"
sql = "select cli_sn,CLI2_Name,CLI2_Memo,CLP_TwoToFiveAdultPrice,CLI_NO,CLI_Days,cli2_attractionlist, dbo.GetFullPathByPII_SN(CLI_ListImage, 1) as pic, (case when charindex('6060',cli_linetype ) > 0 then 'Just the City' when charindex('6059',cli_linetype ) >0 then 'The City and Nearby' when charindex('6061',cli_linetype ) >0 then 'Trips from the City' when charindex('6062',cli_linetype ) >0 then 'Water Town Tours' when charindex('6063',cli_linetype ) >0 then 'Event Tours' when charindex('6065',cli_linetype ) >0 then 'Great Wall Tours' else '' end ) as linetypeName,dbo.GetCityName(CLI_CII_SN, "&site_lgc&") AS cityname from customerlineinfo inner join customerlineinfo2 on cli_sn=cli2_cli_sn inner join CustomerLinePrice on CLP_CLI_SN = cli_sn where clp_pricetype=2 and (CLI_PackageClass = '202003' or CLI_PackageClass='202007' or CLI_PackageClass='202005') and cli2_lgc="&site_lgc&" and (cli_dei_sn=1 or cli_dei_sn=2) and cli_state=1005004 and dbo.GetCityName(dbo.CustomerLineInfo.CLI_CII_SN, "&site_lgc&") = '"&city&"' ORDER BY CLI_OrderNum"
Set rs = server.CreateObject("adodb.recordset")
rs.Open sql, conn, 1, 1, 1
'转到city-tour-list-new.asp
Dim tmp_single_sizeof
'If rs.recordcount >= 8 Then
' 'if not instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE 6") > 0 then
' server.Transfer("/single-city-tour/city-tour-list-new.asp")
' 'end if
'Else
tmp_single_sizeof = rs.recordcount
'End If
sql = " SELECT TOP 5 vtp.CLI2_PassCity, "&_
" vtp.CLI_SN, "&_
" vtp.CLI_NO, "&_
" vtp.CLI2_Name, "&_
" vtp.CLI_Days, "&_
" vtp.CLP_TwoToFiveAdultPrice, "&_
" tourmanager.dbo.GetFullPathByPII_SN(vtp.CLI_ListImage, 1) AS pic "&_
" FROM V_SRMS_ResourceAllot_Tour_Price_CJ vtp "&_
" WHERE vtp.CLI2_LGC = 1 "&_
" AND vtp.SRA_SSIID = 14 "&_
" AND vtp.CLP_PriceType = 1 "&_
" AND srms.dbo.Find_IN_Field_CC('"&city&"',vtp.CLI2_PassCity,',')=1 "&_
" AND vtp.CLI_PackageClass = '202004' "&_
" ORDER BY "&_
" vtp.CLI_OrderNum "
'sql1 = "select top 5 *,dbo.GetFullPathByPII_SN(CLI_ListImage, 1) AS pic,CLP_TwoToFiveAdultPrice from customerlineinfo inner join customerlineinfo2 on cli_sn=cli2_cli_sn inner join CustomerLinePrice on CLP_CLI_SN = cli_sn where clp_pricetype=1 and CLI_PackageClass = '202004' and cli_state=1005004 and (cli_dei_sn=1 or cli_dei_sn=2) and CLI2_PassCity like '%"&city&"%' ORDER BY CLI_OrderNum "
sql1 = " " &_
" SELECT TOP 5 dbo.CustomerLineInfo.CLI_NO, dbo.CustomerLineInfo.CLI_Days, " &_
" dbo.CustomerLineInfo2.CLI2_PassCity, " &_
" dbo.CustomerLinePrice.CLP_TwoToFiveAdultPrice, " &_
" dbo.CustomerLineInfo2.CLI2_Name, " &_
" dbo.GetFullPathByPII_SN(dbo.CustomerLineInfo.CLI_ListImage, "&site_lgc&") AS pic " &_
" FROM dbo.CustomerLineInfo INNER JOIN " &_
" dbo.CustomerLineInfo2 ON " &_
" dbo.CustomerLineInfo.CLI_SN = dbo.CustomerLineInfo2.CLI2_CLI_SN INNER JOIN " &_
" dbo.CustomerLinePrice ON " &_
" dbo.CustomerLinePrice.CLP_CLI_SN = dbo.CustomerLineInfo.CLI_SN " &_
" WHERE (dbo.CustomerLinePrice.CLP_PriceType = 1) AND " &_
" (dbo.CustomerLineInfo.CLI_PackageClass = '202004') AND " &_
" (dbo.CustomerLineInfo.CLI_State = 1005004) AND " &_
" (dbo.CustomerLineInfo.CLI_DEI_SN = 1 OR " &_
" dbo.CustomerLineInfo.CLI_DEI_SN = 2) AND (dbo.CustomerLinePrice.DeleteFlag <> 1) " &_
" AND (dbo.CustomerLineInfo2.DeleteFlag <> 1) AND " &_
" (dbo.CustomerLineInfo.DeleteFlag <> 1) AND dbo.CustomerLineInfo2.CLI2_LGC = 1 " &_
" GROUP BY dbo.CustomerLineInfo.CLI_NO, dbo.CustomerLineInfo.CLI_Days, " &_
" dbo.CustomerLineInfo2.CLI2_PassCity, " &_
" dbo.CustomerLinePrice.CLP_TwoToFiveAdultPrice, " &_
" dbo.CustomerLineInfo2.CLI2_Name, " &_
" dbo.GetFullPathByPII_SN(dbo.CustomerLineInfo.CLI_ListImage,"&site_lgc&"), " &_
" dbo.CustomerLineInfo.CLI_OrderNum " &_
" HAVING (dbo.CustomerLineInfo2.CLI2_PassCity LIKE N'%"&city&"%') " &_
" ORDER BY dbo.CustomerLineInfo.CLI_OrderNum "
'Response.Write(sql1)
'response.end
Set rs1 = server.CreateObject("adodb.recordset")
rs1.Open sql1, conn, 1, 1
sql2 = " SELECT TOP 5 cl.CUL_SN, "&_
" cli.COLI_Name, "&_
" cli.COLI_SN, "&_
" cli.COLI_ID, "&_
" cli.COLI_Days, "&_
" cli.COLI_OPI_ID, "&_
" cli.COLI_OrderStartDate, "&_
" clie.COLE_PassCity, "&_
" clie.COLE_Attraction, "&_
" clie.COLE_Country "&_
" FROM CUstomerList cl "&_
" INNER JOIN ConfirmLineInfo cli "&_
" ON cli.COLI_SN = cl.CUL_COLI_SN "&_
" INNER JOIN ConfirmLineInfoElse clie "&_
" ON clie.COLE_COLI_SN = cli.COLI_SN "&_
" WHERE cl.CUL_IsLinkMan = 1 "&_
" AND cli.COLI_Area = 2 "&_
" AND clie.COLE_PassCity <> '' "&_
" AND srms.dbo.Find_IN_Field_CC('"&city&"',clie.COLE_PassCity,',')=1 "&_
" AND cli.COLI_Days <> 0 "&_
" AND cli.COLI_OrderStartDate < GETDATE() AND (len(clie.COLE_PassCity)-len(replace(clie.COLE_PassCity, ',',''))) <> 0 "&_
" ORDER BY "&_
" cli.COLI_OrderStartDate DESC "
'Response.Write(sql)
Set rs2 = server.CreateObject("adodb.recordset")
rs2.Open sql2, conn, 1, 1
'转到city-tour-list-new.asp
wid = Site_ID
eid = GetSRMSCityId(city)
CityID = GetCityID(city)
etype = "K"
epagetype = "t-citytour-list"
If CityID = 0 Then GotoErrPage
def_title = capitalize(city)&" Tours, Private Tours to "&capitalize(city)&" China"
def_keywords = capitalize(city)&" tour, "&capitalize(city)&" tours, "&capitalize(city)&" china tours, "&capitalize(city)&" vacations"
def_description = capitalize(city)&" Tours: "&strGetSubstring(get_city_introduction(city), 1, 150, "...")
sql="select count(ESI_GRI_SN) as Num,isnull(avg(ESI_Rate),0) as ESI_Rate from( "&_
"select ESI_GRI_SN,avg(ESI_Rate) as ESI_Rate "&_
"from Eva_ServiceItemInfo "&_
"where ESI_ServiceCity='"&CityID&"' and ESI_GRI_SN>0 "&_
"group by ESI_GRI_SN "&_
"having avg(ESI_Rate)>0 "&_
") mmm"
Set tmpRs = conn.Execute(sql)
ReviewNum = tmpRs("Num")
ReviewRate= tmpRs("ESI_Rate")
set tmpRs = nothing
%>
<%=seo_title(wid,eid,etype,epagetype,def_title)%>
"/>
<%
If Request.QueryString("RewriteUrl") <> "" Then
RewriteUrl = Request.QueryString("RewriteUrl")
End If
If RewriteUrl <> "" Then%>
<%
End If%>
"
end if%>
<%
Video_Width=175
Video_height=132
Video_Lang = Site_LGC '语种 只cht用 默认1
'\\GetSRMSPRovinceId(city,Site_LGC,Site_ID) 取得省ID
'\\GetSRMSCityId(city) 取得城市ID
if request.querystring("region") = empty then
Video_RelType = "K" '关联产品类型 城市 路线等 沿用韩特飞的数值
Video_RelSn = GetSRMSCityId(city) '线路或者文章id
else
Video_RelType = "P" '关联产品类型 城市 路线等 沿用韩特飞的数值
Video_RelSn = PRI_SN '线路或者文章id
end if
%>
<%
if Video_Sqe then
%>
Travel Video about <%=capitalize(city)%>
<%=Video_code%>
<%
end if
''//如果是省级页面使用到,将取出这个省下所有城市的小包价
if request.QueryString("region") = empty then
area_sql = " = '"&city&"'"
else
area_sql = " in ((SELECT SRMS.dbo.SRMS_Info_AreaPlacenameLGC.SIAPL_Name "&_
" FROM SRMS.dbo.SRMS_Info_AreaPlacename INNER JOIN "&_
" SRMS.dbo.SRMS_Info_AreaPlacenameLGC ON "&_
" SRMS.dbo.SRMS_Info_AreaPlacename.SIAP_Code = "&_
" SRMS.dbo.SRMS_Info_AreaPlacenameLGC.SIAPL_SIAPCode "&_
" INNER JOIN SRMS.dbo.SRMS_ResourceAllot ON "&_
" SRMS.dbo.SRMS_Info_AreaPlacename.SIAP_ID = "&_
" SRMS.dbo.SRMS_ResourceAllot.SRA_ResID "&_
" WHERE (SRMS.dbo.SRMS_Info_AreaPlacename.SIAP_ParentCode = '"&PRI_Code&"') AND "&_
" (SRMS.dbo.SRMS_Info_AreaPlacenameLGC.SIAPL_LGC = "&Site_LGC&") AND "&_
" (SRMS.dbo.SRMS_ResourceAllot.SRA_Code = 'k') AND "&_
" (SRMS.dbo.SRMS_ResourceAllot.SRA_SSIID = "&Site_ID&")))"
end if
''//
sql=" " &_
" SELECT SystemCode2.SYC2_SYC_SN, SystemCode2.SYC2_CodeDiscribe, " &_
" Count(SystemCode2.SYC2_CodeDiscribe) AS PAG_Count " &_
" FROM BIZ_PackageInfo P1 INNER JOIN " &_
" BIZ_PackageInfo2 p2 ON P1.PAG_SN = p2.PAG2_PAG_SN INNER JOIN " &_
" SystemCode2 ON p2.PAG2_LGC = SystemCode2.SYC2_LGC AND " &_
" CAST(SystemCode2.SYC2_SYC_SN AS varchar) IN (P1.PAG_ExtendType) INNER JOIN " &_
" CItyInfo2 ON P1.PAG_CII_SN = CItyInfo2.CII2_CII_SN AND " &_
" p2.PAG2_LGC = CItyInfo2.CII2_LGC " &_
" WHERE (p2.PAG2_LGC = 1) AND (REPLACE(CItyInfo2.CII2_Name, ' ', '') IN ('"&city&"')) AND " &_
" (ISNULL " &_
" ((SELECT TOP 1 bpp.PKP_AdultPrice " &_
" FROM dbo.BIZ_PackagePrice bpp " &_
" WHERE bpp.PKP_PAG_SN = p1.PAG_SN AND (2 BETWEEN PKP_PersonStart AND " &_
" PKP_PersonStop) AND (GETDATE() BETWEEN PKP_ValidDate AND " &_
" PKP_InvalidDate) " &_
" ORDER BY " &_
" (SELECT TOP 1 dav.CAV_Level " &_
" FROM DCityAndVendor dav " &_
" WHERE bpp.PKP_VEI_SN = dav.CAV_VEI_SN AND " &_
" dav.CAV_CII_SN = P1.PAG_CII_SN " &_
" ORDER BY dav.Cav_level)), 0) > 0) AND (p2.PAG2_Check = 2) " &_
" GROUP BY SystemCode2.SYC2_SYC_SN, SystemCode2.SYC2_CodeDiscribe "
sql = replace(sql,"hong kong","hongkong")
sql = replace(sql,"Hong Kong","hongkong")
rs.open sql,conn,3,1,1
if rs.recordcount > 0 or EntertainmentCount > 0 then
%>
Day Trips & Transfers
<%
if rs.eof and rs.bof then
else
do while not rs.eof
SYC2_SYC_SN = rs("SYC2_SYC_SN")
SYC2_CodeDiscribe = rs("SYC2_CodeDiscribe")
DiscribeURL = changeStrPara(rs("SYC2_CodeDiscribe"))
if rs("PAG_Count") > 1 then
PAG_Count = rs("PAG_Count") & " Trips"
else
PAG_Count = rs("PAG_Count") & " Trip"
end if
%>
<% End If %>
<%
getCityRCLiksStr = getCityRCLiks(CityID,city,"Hotel|Train|Flight")
If getCityRCLiksStr<>"" Then
allCount = 0
linkArr = split(getCityRCLiksStr, "$$")
tmpArr = split(linkArr(1),"@")
For tti=0 to ubound(tmpArr)
tmp = split(tmpArr(tti), "-")
If tmp(0)="Hotel" AND tmp(1)>0 Then linkHotels = "
"
allCount = allCount + tmp(1)
Next
If allCount>0 Then
Response.Write(linkHotels)
'Response.Write(linkTour)
Response.Write(linkTrain)
Response.Write(linkFlight)
Response.Write(linkFlights)
RightBoxShow = True
End If
End If %>