% ''//应从原来一地线路列表另存出来的,现暂时使用原有变量city.... city = request.QueryString("region") if request.QueryString("region") = empty then city = "beijing" else city = Replace(SafeRequest("region",0), "-", " ") end if if request.querystring("days") <> empty then 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 end if SRMSPRovinceInfo = GetSRMSPRovinceId(city,Site_LGC,Site_ID) if isarray(SRMSPRovinceInfo) then SRMSPRI_SN = SRMSPRovinceInfo(0) PRI_Code = SRMSPRovinceInfo(1) else 'response.write "PRovince Error" 'response.End() end if ''----------------------------- wid = Site_ID eid = SRMSPRI_SN etype = "K" epagetype="t-citytour-list" def_title = days_txt & capitalize(city)&" Tours, "&capitalize(city)&" China Tours, Top "&capitalize(city)&" Tour Packages." def_keywords = days_txt & capitalize(city)&" tour, "&capitalize(city)&" china tours, " 'URL定义-3H dim urlCityTourInfo urlCityTourInfo= "/tour/{0}tour/{1}/" OrderType=saferequest("OrderType",0) select case OrderType case "price" strFileName="tours-sort-by-price" order_sql = " order by CLP_TwoToFiveAdultPrice" case "days" strFileName="tours-sort-by-length" order_sql = " order by CLI_Days" case else strFileName="tours" OrderType="OrderNum" order_sql = " order by CLI_OrderNum" end select sql="" sql=" " &_ "SELECT CItyInfo2.CII2_Name, PRovinceInfo2.PRI2_Name " &_ "FROM CItyInfo2 INNER JOIN " &_ " CItyInfo ON CItyInfo2.CII2_CII_SN = CItyInfo.CII_SN INNER JOIN " &_ " PRovinceInfo2 ON CItyInfo.CII_PRI_SN = PRovinceInfo2.PRI2_PRI_SN " &_ "WHERE (CItyInfo.DeleteFlag <> 1) AND (CItyInfo2.CII2_LGC = 1) AND " &_ " (PRovinceInfo2.PRI2_LGC = 1) AND (PRovinceInfo2.DeleteFlag <> 1) AND " &_ " (PRovinceInfo2.PRI2_Name = N'"& city &"') " 'response.write sql 'response.End() set rs_cities = server.createobject("adodb.recordset") rs_cities.open sql,conn,1,1,1 temp_cities = "" if rs_cities.eof then GotoErrPage end if k_i = 1 do while not rs_cities.eof if k_i = rs_cities.recordcount then temp_cities = temp_cities & " (CLI2_PassCity Like '%"&rs_cities("CII2_Name")&"%') " else temp_cities = temp_cities & " (CLI2_PassCity Like '%"&rs_cities("CII2_Name")&"%') Or " end if k_i = k_i + 1 rs_cities.movenext loop if temp_cities <> "" then temp_cities = " AND ( " & temp_cities & " ) " end if rs_cities.close set rs_cities = nothing sql= "" sql=" "&_ "SELECT top 100 T.CLI_SN, T.CLI_Days, T.CLI_ListImage, T.CLI_CityName, T.CLI2_Name, T.CLI_NO, "&_ " T.CLI2_PassCity, T.CLI2_AttractionList, T.CLI2_Memo, T.CLI_OrderNum, "&_ " dbo.GetFullPathByPII_SN(dbo.PictureInfo.PII_SN, 1) AS pic, T.CityName, T.CLI_CII_SN, T.CLP_TwoToFiveAdultPrice "&_ "FROM (SELECT TOP 100 dbo.CustomerLineInfo.CLI_SN, dbo.CustomerLineInfo.CLI_Days, "&_ " dbo.CustomerLineInfo.CLI_ListImage, dbo.CustomerLineInfo.CLI_CityName, "&_ " dbo.CustomerLineInfo2.CLI2_Name, dbo.CustomerLineInfo.CLI_NO, "&_ " dbo.CustomerLineInfo2.CLI2_PassCity, "&_ " dbo.CustomerLineInfo2.CLI2_AttractionList, "&_ " dbo.CustomerLineInfo2.CLI2_Memo, dbo.CustomerLineInfo.CLI_OrderNum, "&_ " dbo.getCityName(dbo.CustomerLineInfo.CLI_CII_SN, 1) AS CityName, dbo.CustomerLineInfo.CLI_CII_SN, "&_ " (SELECT TOP 1 CLP_TwoToFiveAdultPrice "&_ " FROM dbo.CustomerLinePrice "&_ " WHERE (CLP_CLI_SN = dbo.CustomerLineInfo.CLI_SN) "&_ " ORDER BY CLP_TwoToFiveAdultPrice) AS CLP_TwoToFiveAdultPrice "&_ " FROM dbo.CustomerLineInfo2 INNER JOIN "&_ " dbo.CustomerLineInfo ON "&_ " dbo.CustomerLineInfo2.CLI2_CLI_SN = dbo.CustomerLineInfo.CLI_SN INNER JOIN "&_ " dbo.CustomerLinePrice ON "&_ " dbo.CustomerLineInfo.CLI_SN = dbo.CustomerLinePrice.CLP_CLI_SN "&_ " GROUP BY dbo.CustomerLineInfo.CLI_SN, dbo.CustomerLineInfo.CLI_NO, "&_ " dbo.CustomerLineInfo.CLI_Days, dbo.CustomerLineInfo.CLI_ListImage, "&_ " dbo.CustomerLineInfo.CLI_OrderNum, dbo.CustomerLineInfo.CLI_State, "&_ " dbo.CustomerLineInfo2.CLI2_PassCity, "&_ " dbo.CustomerLinePrice.CLP_TwoToFiveAdultPrice, "&_ " dbo.CustomerLinePrice.CLP_PriceType, dbo.CustomerLineInfo2.CLI2_Name, "&_ " dbo.CustomerLineInfo.CLI_PackageClass, "&_ " dbo.CustomerLineInfo.CLI_LineType, "&_ " dbo.CustomerLineInfo2.CLI2_AttractionList, "&_ " dbo.CustomerLineInfo2.CLI2_EntranceCity, "&_ " dbo.CustomerLineInfo2.CLI2_DepartureCity, dbo.CustomerLineInfo2.CLI2_LGC, "&_ " dbo.CustomerLinePrice.CLP_TwoToFiveAdultPriceRMB, "&_ " dbo.CustomerLineInfo.CLI_CityName, dbo.CustomerLineInfo.CLI_Grade, "&_ " dbo.CustomerLineInfo.CLI_LineClass, dbo.CustomerLineInfo.CLI_PrimeGroup, "&_ " dbo.CustomerLineInfo2.CLI2_Memo, dbo.CustomerLineInfo2.CLI2_Introduction, "&_ " dbo.CustomerLineInfo.CLI_DEI_SN, "&_ " dbo.CustomerLinePrice.CLP_TwoToFiveAdultProPriceRMB, "&_ " dbo.CustomerLineInfo.CLI_Area, "&_ " dbo.getCityName(dbo.CustomerLineInfo.CLI_CII_SN, 1),dbo.CustomerLineInfo.CLI_CII_SN "&_ " HAVING (dbo.CustomerLineInfo.CLI_State = 1005004) AND "&_ " (dbo.CustomerLineInfo2.CLI2_LGC = 1) AND "&_ " (dbo.CustomerLineInfo.CLI_PackageClass IN (202003, 202005, 202007)) "&_ " "& temp_cities &" " &_ " ORDER BY dbo.CustomerLinePrice.CLP_TwoToFiveAdultPrice) T LEFT OUTER JOIN "&_ " dbo.PictureInfo ON T.CLI_ListImage = dbo.PictureInfo.PII_SN "&_ "GROUP BY T.CLI_SN, T.CLI_Days, T.CLI_ListImage, T.CLI_CityName, T.CLI2_Name, "&_ " T.CLI_NO, T.CLI2_PassCity, T.CLI2_AttractionList, T.CLI2_Memo, T.CLI_OrderNum, "&_ " dbo.GetFullPathByPII_SN(dbo.PictureInfo.PII_SN, 1), T.CityName, T.CLI_CII_SN, T.CLP_TwoToFiveAdultPrice "&_ "ORDER BY T.CLI_OrderNum " 'response.write sql 'response.End() set rs = server.createobject("adodb.recordset") rs.open sql,conn,3,1,1 tourcount = rs.recordcount if tourcount = "" Or isempty(tourcount) Or isnull(tourcount) then tourcount = 0 end if '转到city-tour-list-new.asp 'if rs.recordcount > 8 then ' server.Transfer("/single-city-tour/city-tour-list-new.asp") 'end if '转到city-tour-list-new.asp %>