<% Dim Search_tour_rs, Search_daytrip_rs, Search_addons_rs, Search_SQL Dim S_price, S_seldays, S_theme, S_City Dim S_price_SQL, S_seldays_SQL, S_theme_SQL, S_City_SQL S_City = SafeRequest("s_city",0) If S_City = "" Or IsEmpty(S_City) Or IsNull(S_City) Then S_City = "beijing" End If TitleCity = capitalize(S_City) URLCity = LCase(Replace(S_City, " ", "")) cityurl = URLCity S_City_SQL= Replace(LCase(S_City), "hong kong", "hongkong") CityId = getcityid(S_City) S_price = SafeRequest("S_price",0) If S_price = "" Or IsEmpty(S_price) Or IsNull(S_price) Or LCase(S_price) = "none" Then Else S_price = Replace(S_price, "-", " ") S_price_SQL = " AND ( dbo.CustomerLinePrice.CLP_TwoToFiveAdultPrice Between "& S_price &" ) " End If S_seldays = SafeRequest("S_seldays",0) If S_seldays = "" Or IsEmpty(S_seldays) Or IsNull(S_seldays) Then S_seldays = 0 End If S_theme = SafeRequest("S_theme",0) If S_theme = "" Or IsEmpty(S_theme) Or IsNull(S_theme) Then S_theme = "None" End If Select Case S_seldays Case "1" Search_tour_S_seldays_SQL = " AND (dbo.CustomerLineInfo.CLI_Days = 1) " Search_daytrip_S_seldays_SQL = "" Search_addons_S_seldays_SQL = "" Case "2" Search_tour_S_seldays_SQL = " AND (dbo.CustomerLineInfo.CLI_Days Between 2 And 3) " Search_daytrip_S_seldays_SQL = " AND (1 = 2) " Search_addons_S_seldays_SQL = " AND (1 = 2) " Case "3" Search_tour_S_seldays_SQL = " AND (dbo.CustomerLineInfo.CLI_Days Between 4 And 5) " Search_daytrip_S_seldays_SQL = " AND (1 = 2) " Search_addons_S_seldays_SQL = " AND (1 = 2) " Case "4" Search_tour_S_seldays_SQL = " AND (dbo.CustomerLineInfo.CLI_Days > 6) " Search_daytrip_S_seldays_SQL = " AND (1 = 2) " Search_addons_S_seldays_SQL = " AND (1 = 2) " Case Else Search_tour_S_seldays_SQL = "" End Select Dim Search_tour_totality, Search_daytrip_totality, Search_addons_totality Dim OrderPrice, OrderDay, OrderSQL Sub Ordercondition() Orderp = Request.QueryString("orderp") If LCase(Orderp) = "asc" Or LCase(Orderp) ="desc" Then If LCase(Orderp) = "asc" Then OrderPrice = " dbo.CustomerLinePrice.CLP_TwoToFiveAdultPrice Asc, " Else OrderPrice = " dbo.CustomerLinePrice.CLP_TwoToFiveAdultPrice Desc, " End If OrderSQL = OrderPrice End If Orderd = Request.QueryString("orderd") If LCase(Orderd) = "asc" Or LCase(Orderd) ="desc" Then If LCase(Orderd) = "asc" Then OrderDay = " CLI_Days Asc, " Else OrderDay = " CLI_Days Desc, " End If OrderSQL = OrderDay End If End Sub Selectcondition = "" Search_totality = 0 Select Case LCase(S_theme) Case "city tour package" Selectcondition = "1" OrderSQL = "" Ordercondition Search_tour Search_totality = Search_tour_totality Case "day trips & transfer" Selectcondition = "2" Search_daytrip Search_totality = Search_daytrip_totality Case "itinerary plus" Selectcondition = "3" Search_addons Search_totality = Search_addons_totality Case Else Selectcondition = "123" Search_tour Search_daytrip Search_addons Search_totality = Search_tour_totality + Search_daytrip_totality + Search_addons_totality End Select Sub Search_tour() Search_SQL = "" Search_SQL = " " &_ "SELECT " &_ " dbo.CustomerLineInfo.CLI_SN, " &_ " dbo.CustomerLineInfo2.CLI2_Name, " &_ " IsNull(dbo.CustomerLinePrice.CLP_TwoToFiveAdultPrice, 0) As CLP_TwoToFiveAdultPrice, dbo.CustomerLineInfo.CLI_NO, " &_ " dbo.CustomerLineInfo.CLI_Days, dbo.CustomerLineInfo2.CLI2_AttractionList, " &_ " dbo.GetFullPathByPII_SN(dbo.CustomerLineInfo.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 " &_ " 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 = 2) AND " &_ " (dbo.CustomerLineInfo.CLI_PackageClass = '202003' OR " &_ " dbo.CustomerLineInfo.CLI_PackageClass = '202007' OR " &_ " dbo.CustomerLineInfo.CLI_PackageClass = '202005') AND " &_ " (dbo.CustomerLineInfo2.CLI2_LGC = " & Site_lgc & ") AND " &_ " (dbo.CustomerLineInfo.CLI_DEI_SN = 1 OR " &_ " dbo.CustomerLineInfo.CLI_DEI_SN = 2) AND " &_ " (dbo.CustomerLineInfo.CLI_State = 1005004) AND " &_ " (dbo.CustomerLineInfo2.CLI2_PassCity LIKE '%"& S_City &"%') " &_ " " & S_price_SQL & Search_tour_S_seldays_SQL & " " &_ "ORDER BY " & OrderSQL & " dbo.CustomerLineInfo.CLI_OrderNum " 'Response.Write(Search_SQL&"

") Set Search_tour_rs = Server.Createobject("adodb.recordset") Search_tour_rs.Open Search_SQL, Conn, 1, 1, 1 If Not Search_tour_rs.Eof Then Search_tour_totality = Search_tour_rs.RecordCount Else Search_tour_totality = 0 Search_tour_rs.Close Set Search_tour_rs = Nothing End If End Sub Sub Search_daytrip() Search_SQL = "" ' Search_SQL = " " &_ ' "SELECT " &_ ' " BIZ_PackageInfo.PAG_SN, BIZ_PackageInfo2.PAG2_Name, " &_ ' " BIZ_PackageInfo.PAG_NeedTime, SystemCode2.SYC2_CodeDiscribe, " &_ ' " BIZ_PackageInfo.PAG_Code, BIZ_PackageInfo2.PAG2_Attraction, " &_ ' " BIZ_PackageInfo2.PAG2_PII_SN " &_ ' "FROM dbo.BIZ_PackageInfo INNER JOIN " &_ ' " dbo.BIZ_PackageInfo2 ON " &_ ' " dbo.BIZ_PackageInfo.PAG_SN = dbo.BIZ_PackageInfo2.PAG2_PAG_SN INNER JOIN " &_ ' " dbo.SystemCode2 ON SystemCode2.SYC2_SYC_SN = LEFT(REPLACE(BIZ_PackageInfo.PAG_ExtendType, ',', ''), 5) INNER JOIN " &_ ' " dbo.BIZ_PackagePrice ON " &_ ' " dbo.BIZ_PackageInfo.PAG_SN = dbo.BIZ_PackagePrice.PKP_PAG_SN " &_ ' "WHERE (dbo.BIZ_PackageInfo2.PAG2_LGC = " & Site_lgc & ") AND (dbo.BIZ_PackageInfo2.PAG2_Check = 2) AND " &_ ' " (dbo.BIZ_PackageInfo.PAG_CII_SN = " & CityId & ") AND (dbo.BIZ_PackageInfo.PAG_Flag = 1) AND " &_ ' " (dbo.SystemCode2.SYC2_LGC = " & Site_lgc & ") AND (dbo.BIZ_PackageInfo2.PAG2_PAG_SN IN " &_ ' " (SELECT sra_resid " &_ ' " FROM SRMS.dbo.SRMS_ResourceAllot " &_ ' " WHERE sra_ssiid = " & Site_id & " AND sra_code = 'D')) AND " &_ ' " (2 BETWEEN dbo.BIZ_PackagePrice.PKP_PersonStart AND dbo.BIZ_PackagePrice.PKP_PersonStop) AND " &_ ' " (GETDATE() BETWEEN dbo.BIZ_PackagePrice.PKP_ValidDate AND dbo.BIZ_PackagePrice.PKP_InvalidDate) " &_ ' " " & Search_daytrip_S_seldays_SQL & " " &_ ' "GROUP BY BIZ_PackageInfo.PAG_SN, BIZ_PackageInfo2.PAG2_Name, " &_ ' " BIZ_PackageInfo.PAG_NeedTime, SystemCode2.SYC2_CodeDiscribe, " &_ ' " BIZ_PackageInfo.PAG_Code, BIZ_PackageInfo2.PAG2_Attraction, " &_ ' " BIZ_PackageInfo2.PAG2_PII_SN " Search_SQL = " " &_ " SELECT " & _ " P1.PAG_SN, p2.PAG2_Name, p2.PAG2_Intro, p2.PAG2_PAG_SN, P1.PAG_NeedTime, " & _ " P1.PAG_CII_SN, 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) AS Price, p2.PAG2_PII_SN, P1.PAG_Code, " & _ " p2.PAG2_Attraction, dbo.CItyInfo2.CII2_Name, P1.PAG_Code, SystemCode2.SYC2_CodeDiscribe " & _ " FROM dbo.BIZ_PackageInfo P1 INNER JOIN " & _ " dbo.BIZ_PackageInfo2 p2 ON P1.PAG_SN = p2.PAG2_PAG_SN INNER JOIN " & _ " dbo.SystemCode2 ON p2.PAG2_LGC = dbo.SystemCode2.SYC2_LGC AND " & _ " CAST(dbo.SystemCode2.SYC2_SYC_SN AS varchar) IN (Left(P1.PAG_ExtendType, 5)) " & _ " INNER JOIN " & _ " dbo.CItyInfo2 ON P1.PAG_CII_SN = dbo.CItyInfo2.CII2_CII_SN AND " & _ " p2.PAG2_LGC = dbo.CItyInfo2.CII2_LGC " & _ " WHERE (p2.PAG2_LGC = 1) " & _ " AND (REPLACE(dbo.CItyInfo2.CII2_Name, ' ', '') IN ('"&S_City_SQL&"')) 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 (Pag2_check =2) AND (P1.PAG_Flag = 1) " &_ " AND (dbo.SystemCode2.SYC2_LGC = 1) AND " &_ " (dbo.CItyInfo2.CII2_LGC = 1) " 'Response.Write("

") 'Response.End() Set Search_daytrip_rs = Server.Createobject("adodb.recordset") Search_daytrip_rs.Open Search_SQL, Conn, 1, 1, 1 If Not Search_daytrip_rs.Eof Then Search_daytrip_totality = Search_daytrip_rs.RecordCount Else Search_daytrip_totality = 0 Search_daytrip_rs.Close Set Search_daytrip_rs = Nothing End If End Sub Sub Search_addons() Search_SQL = "" Search_SQL = " " &_ "SELECT *, " &_ " (SELECT TOP 1 dbo.GetFullPathByPII_SN(dbo.PictureInfo.PII_SN, 1) " &_ " FROM pictureinfo " &_ " WHERE (PII_ResourceSN = dbo.EntertainmentInfo.ENI_SN) AND " &_ " (PII_ServiceType = 'e')) AS pic " &_ "FROM dbo.EntertainmentInfo INNER JOIN " &_ " dbo.EntertainmentInfo2 ON " &_ " dbo.EntertainmentInfo.ENI_SN = dbo.EntertainmentInfo2.ENI2_ENI_SN " &_ "WHERE (dbo.EntertainmentInfo2.ENI2_LGC = 1) AND (dbo.EntertainmentInfo.ENI_Type = 2) AND " &_ " (ISNULL(dbo.EntertainmentInfo.DeleteFlag, 0) <> 1) AND (dbo.EntertainmentInfo.ENI_CII_SN = " & CityId & ") " &_ " " & Search_addons_S_seldays_SQL & " " 'Response.Write(Search_SQL&"

") Set Search_addons_rs = Server.Createobject("adodb.recordset") Search_addons_rs.Open Search_SQL, Conn, 1, 1, 1 If Not Search_addons_rs.Eof Then Search_addons_totality = Search_addons_rs.RecordCount Else Search_addons_totality = 0 Search_addons_rs.Close Set Search_addons_rs = Nothing End If End Sub %> <%=TitleCity%> Tours Search Results, Search a <%=TitleCity%> Tour

<%=TitleCity%> Tour Search Results

You Searched for

<% Cookiescustom = "" If S_price = "" Or IsEmpty(S_price) Or IsNull(S_price) Or LCase(S_price) = "none" Then Else tempS_price = LCase(S_price) tempS_price = Replace(tempS_price, "-", " ") If tempS_price = "0 and 100" Then tempS_price = "100" ElseIf tempS_price = "600 and 10000" Then tempS_price = "600" End If tempS_price = Replace(tempS_price, " and ", "-") Cookiescustom = Cookiescustom & tempS_price %> US$ <% = tempS_price%> , <% End If If S_seldays = "" Or IsEmpty(S_seldays) Or IsNull(S_seldays) Or S_seldays = "None" Then Else tempS_seldays = S_seldays Select Case S_seldays Case "1" : tempS_seldays = "1 day" Case "2" : tempS_seldays = "1-3 days" Case "3" : tempS_seldays = "3-6 days" Case "4" : tempS_seldays = "6 days" End Select Cookiescustom = Cookiescustom & tempS_seldays & ", " %> <% =tempS_seldays %> , <% End If %> <% = TitleCity %> City Tour Packages. <% Cookiescustom = Cookiescustom & TitleCity & " City Tour Package." Response.Cookies("Cht")("Cookiescustom") = Cookiescustom %> <% If Search_totality < 1 Then %> If these tours are not right for you, let our professional travel advisor to design the right tour to meet your needs. <% End If %>

<% If Search_totality > 0 Then %>
<% =Search_totality %> Choices <% If Selectcondition = 1 Then arrow_down_d = "" arrow_down_u = "" Orderp = Request.QueryString("orderp") If Orderp = "" Or IsEmpty(Orderp) Or IsNull(Orderp) Or Orderp = "None" Then Orderp = "asc" ad_p = arrow_down_u Else If Orderp = "asc" Then Orderp = "desc" ad_p = arrow_down_d Else Orderp = "asc" ad_p = arrow_down_u End If End If OrderpUrl = "S_price=" & S_price & "&S_seldays=" & S_seldays & "&S_theme=" & S_theme & "&s_city=" & s_city & "&orderp=" & Orderp Orderd = Request.QueryString("orderd") If Orderd = "" Or IsEmpty(Orderd) Or IsNull(Orderd) Or Orderd = "None" Then Orderd = "asc" ad_d = arrow_down_u Else If Orderd = "asc" Then Orderd = "desc" ad_d = arrow_down_d Else Orderd = "asc" ad_d = arrow_down_u End If End If OrderdUrl = "S_price=" & S_price & "&S_seldays=" & S_seldays & "&S_theme=" & S_theme & "&s_city=" & s_city & "&orderd=" & Orderd %> Price <% =ad_p %> Days <% =ad_d %> <% End If %>
<% If TypeName(Search_tour_rs) = "Recordset" Then Do While Not Search_tour_rs.Eof If IsNull(Search_tour_rs("pic")) Or Search_tour_rs("pic") = Empty Then pic = "/pic/unknown.gif" Else pic = "http://www.chinahighlights.com"& imgurl & Search_tour_rs("pic") End If If Search_tour_rs("CLI_Days") > 1 Then days = Search_tour_rs("CLI_Days") &"-"& "Days" Else days = Search_tour_rs("CLI_Days") &"-"& "Day" End If CLI_NO = Trim(Search_tour_rs("CLI_NO")) urlCityTourInfo = "/tour/{0}tour/{1}/" 'CityTourInfoUrl = strFormat(urlCityTourInfo, Array(changeStrPara(cityname), LCase(CLI_NO))) CityTourInfoUrl = "/tour/"& changeStrPara(Search_tour_rs("cityname")) &"tour/"& LCase(CLI_NO) &"/" Price = setFigure(Search_tour_rs("CLP_TwoToFiveAdultPrice")) %>
<% If Search_tour_rs("linetypeName") > "" Then %> <% =Search_tour_rs("linetypeName") %> <% End If %>
<%=Search_tour_rs("cli2_name")%> (<%=Search_tour_rs("CLI_NO")%>)

<% =days %> <%=TitleCity%> Tour

  • <% =Search_tour_rs("cli2_attractionlist") %> View Map
Full price from:
$<%=Price%> p/p
<% Search_tour_rs.MoveNext Loop End If If TypeName(Search_daytrip_rs) = "Recordset" Then Do While Not Search_daytrip_rs.Eof sn = Search_daytrip_rs("PAG_SN") title = Search_daytrip_rs("PAG2_Name") hours = Search_daytrip_rs("PAG_NeedTime") ttype = Search_daytrip_rs("SYC2_CodeDiscribe") hrstr = "hr" hours = FormatNumber(hours, 1, TristateTrue) If CInt(hours)>= 2 Then hrstr = "hrs" If InStr(hours, ".") >0 And Right(hours, 1)<>0 Then If CInt(hours)<= 1 Then tmphours = 0 tmpmins = hours * 60 Else tmphours = (hours * 10 ) Mod 10 tmpmins = ((tmphours * 6) \ 10) * 10 End If If tmphours>0 Then hours = Int(hours)&hrstr& tmpmins &"mins" Else hours = tmpmins &"mins" End If Else hours = CInt(hours) &hrstr End If PAG_Code = Search_daytrip_rs("PAG_Code") content = Search_daytrip_rs("PAG2_Attraction") Price = setFigure(GetAdultPricePAG_SN(Search_daytrip_rs("PAG_SN"), 2)) If IsNull(Search_daytrip_rs("PAG2_PII_SN")) Or Search_daytrip_rs("PAG2_PII_SN") = Empty Then ListImage = -1 Else ListImage = Search_daytrip_rs("PAG2_PII_SN") End If daytripshtml = LCase(Replace(title, " ", "-")) daytripshtml = daytripshtml&".htm" cityurl = Replace(cityurl, " ", "-") %>
<%=title%> (<%=PAG_Code%>)

Duration: <%=hours%>

  • Attractions: <%=content%>
Full price from:
$<%=Price%> p/p
<% Search_daytrip_rs.MoveNext Loop End If If TypeName(Search_addons_rs) = "Recordset" Then Do While Not Search_addons_rs.Eof sn = Search_addons_rs("ENI_SN") title = Search_addons_rs("ENI2_Name") tmpcityid = Search_addons_rs("eni_cii_sn") content = Left(Search_addons_rs("ENI2_Introduction"), 126)&"..." ENI_ConsumeTime = Search_addons_rs("ENI_ConsumeTime") If Not IsNull(ENI_ConsumeTime) And IsNumeric(ENI_ConsumeTime) Then If ENI_ConsumeTime < 1 Then ENI_ConsumeTime = ENI_ConsumeTime * 60 &" Min" Else ENI_ConsumeTime = ENI_ConsumeTime &" Hours" End If End If If IsNull(Search_addons_rs("pic")) Or Search_addons_rs("pic") = Empty Then ListImage = "/pic/unknown.gif" Else ListImage = "http://www.chinahighlights.com" & imgurl & Search_addons_rs("pic") End If price = 0 netprice = 0 Set rs_tmp = server.CreateObject("adodb.recordset") rs_tmp.Open "SELECT top 1 cav_vei_sn FROM [dbo].[DCityAndVendor] where cav_cii_sn="&tmpcityid&" order by cav_level", conn, 1, 1, 1 If Not rs_tmp.EOF Then veisn = rs_tmp("cav_vei_sn") End If rs_tmp.Close sql = "SELECT TOP 1 ENP_Agreement "&_ " FROM dbo.EnterTainmentPrice WHERE "&_ " (ENP_ENI_SN = "&sn&") AND (GETDATE() "&_ " BETWEEN ENP_Start AND ENP_Stop) and (enp_pgi_sn=8 or enp_pgi_sn=11 or enp_pgi_sn=13 or enp_pgi_sn=25) and enp_vei_sn= "&veisn rs_tmp.Open sql, conn, 3, 1, 1 If Not rs_tmp.EOF Then Price = setFigure(getUSDByRMB(CInt(rs_tmp(0)) * 1.2)) netprice = setFigure(getUSDByRMB(CInt(rs_tmp(0)) * 1.2 * 1.2)) End If addonshtml = LCase(Replace(title, " ", "-")) addonshtml = addonshtml&".htm" If netprice = "" Or netprice = 0 Then Else %>
<%=title%>
  • Duration: <%=ENI_ConsumeTime%>
  • Attractions: <%=content%>
Booking Options Price Per Person Next Step
A) Enquiry this tour Now $<%=netprice%>
B) Combine it with a package $<%=price%> (save 20%) ',638,450,'bottom');">Choose it and continue»
<% End If Search_addons_rs.MoveNext Loop End If End If %>
Custom Tailoring: Design your own tour with our help to meet your unique interests. You don't have to compromise. Do exactly what you want to do! Let us assist you to tailor-make your own China experience. Tell us what you need now!