<% Dim Cts Set Cts = New CtsPublicFunction Class CtsPublicFunction Public vReg '类初始 Private Sub Class_Initialize() End Sub '结束类 Private Sub Class_Terminate() IF IsObject(Conn) Then IF conn.state<>0 then Conn.Close Set Conn = Nothing End IF 'Response.Write "
Class结束了
" End Sub Public Function Execute(sql) 'On Error Resume Next Set Execute = conn.Execute(sql) 'If Err Then ' Err.Clear ' Set conn = Nothing ' Response.Write "查询数据的时候发现错误,请检查您的查询代码是否正确。" ' Response.End 'End If End Function Public Function CloseConn(typ) IF isobject(rs) Then rs.CLose Set rs=Nothing End IF IF typ=1 Then IF isobject(Conn) Then Conn.CLose Set Conn=Nothing End IF End IF End Function 'Sql 分页查询 Function QueryPageByNotIn(ByVal selects, ByVal table, ByVal where, ByVal key, ByVal order, ByVal startRowIndex, ByVal maximumRows) Dim sql If where="" or isnull(where) Then where = " Where 1=1 " Else where = " Where (" & where & ") " '这个括号很重要,因为可能where里面有or语句,而后面用and连接,就会影响逻辑 End If If startRowIndex<=1 Then '取所有记录或者仅取第一页 If maximumRows<1 Then '所有记录 sql = "Select " & selects & " From " & table & where & " Order By " & order Else '第一页,使用Top sql = "Select Top " & maximumRows & " " & selects & " From " & table & where & " Order By " & order End If Else '取任意页 If maximumRows<1 Then '取某一行以后的所有记录 'sql = "Select " & selects & " From " & table & where & " And " & key & "Not In(Select Top " & startRowIndex-1 & " " & key & " From " & table & where & " Order By " & order & ")" & " Order By " & order sql = "Select " & selects & " From " & table & where & " And " & key & "Not In(Select Top " & startRowIndex & " " & key & " From " & table & where & " Order By " & order & ")" & " Order By " & order Else '取一定行数 'sql = "Select Top " & maximumRows & " " & selects & " From " & table & where & " And " & key & " Not In(Select Top " & startRowIndex-1 & " " & key & " From " & table & where & " Order By " & order & ") Order By " & order sql = "Select Top " & maximumRows & " " & selects & " From " & table & where & " And " & key & " Not In(Select Top " & startRowIndex & " " & key & " From " & table & where & " Order By " & order & ") Order By " & order End If End If QueryPageByNotIn = sql End Function '获取记录集 Function P_rs(sql, w) 'w表示是否允许修改记录集数据,0否1是 If w<>0 And w<>1 Then w = 0 On Error resume Next Err.clear Set P_rs = Server.CreateObject("ADODB.RecordSet") P_rs.open sql, Conn, 1, w * 2 + 1 If Err.Number <> 0 Then Response.write "错误的SQL字符串:" & sql & "
" & Err.Description P_rs.Close Set P_rs=Close Response.End Exit Function End If If P_rs.State = 0 Then Response.write("没有打开记录集"):Response.End '调试输出是否EOF,是否BOF,以及记录数 '"EOF = " & P_rs.Eof & " BOF = " & P_rs.Bof & " RecordCount = " & P_rs.RecordCount End Function '示例 'Public Function getCompanyInfo(f) ' dim rs,body ' body = "" ' set rs = server.CreateObject("adodb.recordset") ' rs.LockType = 3'adLockOptimistic 只在调用 Update 方法时锁定记录。 ' rs.CursorType = 3'AdOpenDynamic 动态游标。可以看见其他用户所作的添加、更改和删除 ' on error resume next ' rs.open "select "&f&" from CompanyInfo",con ' call checkConError(con,rs) ' if rs.recordcount > 0 then ' rs.movefirst ' body = rs(f) ' end if ' rs.close ' set rs = nothing ' getCompanyInfo = body 'End function '函数 检查connection对象是否出错,输出错误信息并终止页面执行 Public Sub checkConnError(cn,r) dim E set E = server.CreateObject("adodb.error") if IsObject(cn) = true then if cn.Errors.count > 0 then for each E in con.Errors response.Write(E.Description&"
") next set E = nothing if isObject(r) = true then set r = nothing end if response.End() end if end if set E = nothing End Sub '//////////////////////读文件/////////////////////////////// Function ReadFile(Path) On Error Resume Next Set MyFile=Server.CreateObject("Scripting.FileSystemObject") Set CountFile=MyFile.OpenTextFile(server.MapPath(Path)) If Err Then err.Clear Set MeyFile=Nothing Response.Write "读取文件路径错误!!!" Response.End End If ReadFile=CountFile.ReadAll Set MeyFile=Nothing End Function Function DelFile(Path) On Error Resume Next ASPArr=Split(Path,".") IF instr(1,ASPArr(ubound(ASPArr)),"asp",1)>0 Then 'Response.Write("动态文件,禁止删除!!!") DelFile="动态文件,禁止删除!!!" Exit Function End IF Set MyFile=Server.CreateObject("Scripting.FileSystemObject") IF MyFile.FileExists(Server.MapPath(Path)) then MyFile.DeleteFile(Server.MapPath(Path)) 'Response.Write("删除成功") DelFile="删除成功" Else 'Response.Write("没有找到该文件") DelFile="没有找到该文件" End IF Set MeyFile=Nothing End Function Function WriteFile(Path,Content) 'On Error Resume Next Set MyFile=Server.CreateObject("Scripting.FileSystemObject") '/////////////////////////创建目录/////////////////////////////////////////// PathArr=split(Path,"/") Arrubound=ubound(PathArr) IF Arrubound=0 Then PathArr=split(Path,"\") Arrubound=ubound(PathArr) End IF IF Arrubound>0 Then IF PathArr(0)="" Then Pathyuan=Server.MapPath("/") Else Pathyuan=Server.MapPath(PathArr(0)) IF MyFile.FolderExists(Pathyuan)=false then MyFile.CreateFolder(Pathyuan) End IF End IF For i=1 to ubound(PathArr)-1 Pathyuan=Pathyuan&"\"&PathArr(i) IF MyFile.FolderExists(Pathyuan)=false then MyFile.CreateFolder(Pathyuan) Next '/////////////////////////创建目录结束/////////////////////////////////////////// '/////////////////////////禁止写入格式/////////////////////////////////////////// ASPArr=Split(Path,".") IF instr(1,ASPArr(ubound(ASPArr)),"asp",1)>0 Then Response.Write(Path&"格式错误!!!") Exit Function End IF '/////////////////////////禁止写入格式结束/////////////////////////////////////////// Set WriteFile=MyFile.CreateTextFile(Server.MapPath(Path)) If Err Then err.Clear Set MeyFile=Nothing Response.Write "创建文件路径错误!!!" Response.End End If WriteFile.Write(Content) If Err Then err.Clear Set MeyFile=Nothing Response.Write "写入文件错误!!!" Response.End End If Set MeyFile=Nothing End Function '////////////////////////////////////////////////////////////// '新闻调用 '1省2市3类4记录数5字符数6样式 Public Function News(Prov,City,NewClass,TopNum,ChrNum,Style,Showdate) Dim Sql,Title IF Prov<>"" and Prov<>0 Then Sql="Prov="&Prov End IF IF City<>"" and City<>0 Then IF Sql="" Then Sql="City="&City Else Sql=Sql&" and City="&City End IF End IF IF NewClass<>"" and NewClass<>0 Then IF Sql="" Then Sql="F_Class="&NewClass Else Sql=Sql&" and F_Class="&NewClass End IF End IF IF Sql<>"" Then Sql="Select Top "&TopNum&" id,Title,STitle,Path,FileName,BiaotiNews,UBiaotiNews,AddDate From News Where Del=0 and NewsCheck=0 and "&Sql&" order by DGNews desc,id desc" Else Sql="Select Top "&TopNum&" id,Title,STitle,Path,FileName,BiaotiNews,UBiaotiNews,AddDate From News Where Del=0 and NewsCheck=0 order by DGNews desc,id desc" End IF News="" End Function '////////////////////////////////////////////////////////////// '文章调用 '1省2市3一级类4二级类5记录数6字符数7样式 Public Function Art(Prov,City,Fu_Colum,Colum_ID,TopNum,ChrNum,Style) Dim Sql,Title IF Prov<>"" and Prov<>0 Then Sql="Prov="&Prov End IF IF City<>"" and City<>0 Then IF Sql="" Then Sql="City="&City Else Sql=Sql&" and City="&City End IF End IF IF Fu_Colum<>"" and Fu_Colum<>0 Then IF Sql="" Then Sql="Fu_Colum="&Fu_Colum Else Sql=Sql&" and Fu_Colum="&Fu_Colum End IF End IF IF Colum_ID<>"" and Colum_ID<>0 Then IF Sql="" Then Sql="Colum_ID="&Colum_ID Else Sql=Sql&" and Colum_ID="&Colum_ID End IF End IF IF Sql<>"" Then Sql="Select Top "&TopNum&" id,Title,Stitle,FileName,Path,BiaotiArt,UBiaotiArt From Art Where del=0 and ArtCheck=0 and "&Sql&" order by DGArt desc,id desc" Else Sql="Select Top "&TopNum&" id,Title,Stitle,FileName,Path,BiaotiArt,UBiaotiArt From Art Where del=0 and ArtCheck=0 order by DGArt desc,id desc" End IF Set Rs=conn.Execute(Sql) Art="" End Function Public Function Art2(Prov,City,Fu_Colum,Colum_ID,TopNum,ChrNum,Style) '为生成地区文章而修改,两个colum_ID Dim Sql,Title IF Prov<>"" and Prov<>0 Then Sql="Prov="&Prov End IF IF City<>"" and City<>0 Then IF Sql="" Then Sql="City="&City Else Sql=Sql&" and City="&City End IF End IF IF Sql="" Then Sql="and (Colum_ID=203 or Colum_ID=320)" Else Sql=Sql&" and (Colum_ID=203 or Colum_ID=320)" End IF IF Sql<>"" Then Sql="Select Top "&TopNum&" id,Title,Stitle,FileName,Path,BiaotiArt,UBiaotiArt From Art Where del=0 and ArtCheck=0 and "&Sql&" order by DGArt desc,id desc" Else Sql="Select Top "&TopNum&" id,Title,Stitle,FileName,Path,BiaotiArt,UBiaotiArt From Art Where del=0 and ArtCheck=0 order by DGArt desc,id desc" End IF Set Rs=conn.Execute(Sql) Art2="" End Function Public Function Art3(Prov,City,Fu_Colum,Colum_ID,TopNum,ChrNum,Style) '输出所属国[prov] Dim Sql,Title IF Prov<>"" and Prov<>0 Then Sql="Prov="&Prov End IF IF City<>"" and City<>0 Then IF Sql="" Then Sql="City="&City Else Sql=Sql&" and City="&City End IF End IF IF Fu_Colum<>"" and Fu_Colum<>0 Then IF Sql="" Then Sql="Fu_Colum="&Fu_Colum Else Sql=Sql&" and Fu_Colum="&Fu_Colum End IF End IF IF Colum_ID<>"" and Colum_ID<>0 Then IF Sql="" Then Sql="Colum_ID="&Colum_ID Else Sql=Sql&" and Colum_ID="&Colum_ID End IF End IF IF Sql<>"" Then Sql="Select Top "&TopNum&" id,Title,Stitle,FileName,Path,BiaotiArt,UBiaotiArt,City From Art Where del=0 and ArtCheck=0 and "&Sql&" order by DGArt desc,id desc" Else Sql="Select Top "&TopNum&" id,Title,Stitle,FileName,Path,BiaotiArt,UBiaotiArt,City From Art Where del=0 and ArtCheck=0 order by DGArt desc,id desc" End IF Set Rs=conn.Execute(Sql) Do While Not(Rs.Eof or Rs.Bof) IF Rs("Stitle")="" Then Title=Rs("Title") Else Title=Rs("STitle") End IF IF Rs("BiaotiArt")=true Then Art3=Art3&"·["& ProvCityCN(2,Rs("City"))&"] "&Left(Title,ChrNum)&"
" Else Art3=Art3&"·["& ProvCityCN(2,Rs("City"))&"] "&Left(Title,ChrNum)&"
" End IF Rs.movenext Loop Rs.close End Function Public Function ChuJingJD(Prov,City,Fu_Colum,Colum_ID,h,l,ChrNum,Style) '输出所属国景点 Dim Sql,Title IF Prov<>"" and Prov<>0 Then Sql="Prov="&Prov End IF IF City<>"" and City<>0 Then IF Sql="" Then Sql="City="&City Else Sql=Sql&" and City="&City End IF End IF IF Fu_Colum<>"" and Fu_Colum<>0 Then IF Sql="" Then Sql="Fu_Colum="&Fu_Colum Else Sql=Sql&" and Fu_Colum="&Fu_Colum End IF End IF IF Colum_ID<>"" and Colum_ID<>0 Then IF Sql="" Then Sql="Colum_ID="&Colum_ID Else Sql=Sql&" and Colum_ID="&Colum_ID End IF End IF IF Sql<>"" Then Sql="Select Top "&h*l&" id,Title,Stitle,FileName,Path,BiaotiArt,UBiaotiArt,City,BiaoTi_pic From Art Where del=0 and ArtCheck=0 and IntopPic=1 and "&Sql&" order by DGArt desc,id desc" Else Exit Function End IF Set Rs=conn.Execute(Sql) ChuJingJD="" For i=1 to h ChuJingJD=ChuJingJD&"" For b=1 to l IF Not(Rs.Eof or rs.Bof) Then IF Rs("Stitle")="" Then Title=Rs("Title") Else Title=Rs("STitle") End IF IF Rs("BiaotiArt")=true Then ArtLikn=Rs("BiaotiArt") Else ArtLikn="/Art/"&Rs("Path")&"/"&Rs("FileName")&".html" End IF ChuJingJD=ChuJingJD&"" Else ChuJingJD=ChuJingJD&"" End IF Rs.movenext Next ChuJingJD=ChuJingJD&"" Next Rs.close ChuJingJD=ChuJingJD&"
"&_ ""&_ ""&_ ""&_ ""&_ "
["&ProvCityCN(2,Rs("City"))&"] "&Left(Title,ChrNum)&"
"&_ ""&_ ""&_ ""&_ ""&_ "
 
 
" End Function Public Function GJProvCity(Prov) IF FL(Prov,"Number")=0 Then Exit Function Set rs=Conn.Execute("Select * From Prov_Class Where Prov="&Prov&"") Do while Not (rs.Eof or rs.Bof) Response.Write(rs("Prov_CN")) 'Set CRS=Conn.Execute("Select id,Title,Stitle,FileName,Path,BiaotiArt,UBiaotiArt,City,BiaoTi_pic From Art Where del=0 and ArtCheck=0 order by DGArt desc,id asc") ' Do while Not(CRS.Eof or CRS.Bof) ' Response.Write(Crs("Title")&" ") ' CRS.Movenext ' Loop ' CRS.Close ' Set CRS=Nothing Response.Write("
") rs.Movenext Loop rs.Close Set rs=Nothing End Function '////////////////////////////////////////////////////////////// '线路调用 '1省2市3一级类4二级类5记录数6关键字7字符数8样式 Public Sub XL(CFProv,CFCity,MJDProv,MJDCity,XLType,NameKeyWord,TopNum,ChrNum,Account,Style) Dim Sql IF CFProv<>0 Then Sql=" and ChuFD_provid1="&CFProv End IF IF CFCity<>0 Then IF Sql="" Then Sql=" and ChuFD_cityid1="&CFCity Else Sql=Sql&" and ChuFD_cityid1="&CFCity End IF End IF IF MJDProv<>0 Then IF Sql="" Then Sql=" and MuJD_provid2="&MJDProv Else Sql=Sql&" and MuJD_provid2="&MJDProv End IF End IF IF MJDCity<>0 Then IF Sql="" Then Sql=" and MuJD_cityid2 like "&MJDCity Else Sql=Sql&" and MuJD_cityid2 like "&MJDCity End IF End IF IF XLType<>0 Then IF Sql="" Then Sql=" and XL_Type="&XLType Else Sql=Sql&" and XL_Type="&XLType End IF End IF IF NameKeyWord<>"" Then IF Sql="" Then Sql=" and XL_Name like '%"&NameKeyWord&"%'" Else Sql=Sql&" and XL_Name like '%"&NameKeyWord&"%'" End IF End IF IF Account<>"" Then IF Sql="" Then 'Sql="Member_Account='"&Account&"'" Sql=Account Else 'Sql=Sql&" and Member_Account='"&Account&"'" Sql=Sql&Account End IF End IF IF Sql<>"" Then Sql="Select Top "&TopNum&" ID,XL_Name,XL_Type,Member_Account,XLFileName,YouHui_Price,ShiChang_Price from XianLu Where del=0 and XL_Check=0 "&Sql&" order by AddDate desc" Else Sql="Select Top "&TopNum&" ID,XL_Name,XL_Type,Member_Account,XLFileName,YouHui_Price,ShiChang_Price from XianLu Where del=0 and XL_Check=0 order by AddDate desc" End IF Set Rs=conn.Execute(Sql) Response.Write("") Do While Not(Rs.Eof or Rs.Bof) IF Rs("XL_Type")=5 Then Response.Write("") Else Response.Write("") End IF Rs.movenext Loop Response.Write("
·"&left(rs("XL_Name"),ChrNum)&"¥电询¥电询
·"&left(rs("XL_Name"),ChrNum)&"¥"&rs("ShiChang_Price")&"¥"&rs("YouHui_Price")&"
") End Sub Public Sub Hotel(Prov,City,KeyWord,TopNum,ChrNum,Style,PC,St,PR) Dim Sql IF Prov<>0 Then Sql=" and h.hotelsheng="&Prov End IF IF City<>0 Then IF Sql="" Then Sql=" and h.hotelcity="&City Else Sql=Sql&" and h.hotelcity="&City End IF End IF IF KeyWord="" Then IF Sql="" Then Sql=" and h.jdname like '%"&KeyWord&"%'" Else Sql=Sql&" and h.jdname like '%"&KeyWord&"%'" End IF End IF Set rs=Conn.Execute("Select Top "&TopNum&" j.*,member.Account,member.MemberType From (select h.id,h.jdname,h.hotelsheng,h.Account,h.jibie,h.show,r.price from hotel as h inner join (select hotelid,min(zhou1) as price from Hotelroom where show=0 group by hotelid) r on h.id=r.hotelid where h.show=0"&Sql&") as j inner join Member on member.Account=j.Account where member.Expires>getdate() order by j.id desc") Response.Write("") Do while not (rs.Eof or rs.Bof) Response.Write("") IF PC=1 Then Response.Write("") Response.Write("") IF St=1 Then Response.Write("") IF Pr=1 Then Response.Write("") Response.Write("") rs.Movenext Loop Response.Write("
[] "&Left(rs("JDName"),ChrNum)&""&rs("jibie")&"星¥"&rs("Price")&"
") rs.Close Set rs=Nothing End Sub Public Sub JDList(Prov,City) Dim ProvCityArr(),ProvCityArrCN(),p IF Prov<>"" and City="" Then Set Prs=Conn.Execute("Select * From Prov_Class Where Prov='"&Prov&"' order by id asc") p=0 Do while not (Prs.Eof or Prs.Bof) Redim Preserve ProvCityArr(p) Redim Preserve ProvCityArrCN(p) ProvCityArr(p)=Prs("Prov_EN") ProvCityArrCN(p)=""&Prs("Prov_CN")&"
" p=p+1 Prs.Movenext Loop Else Set Prs=Conn.Execute("Select * From Prov_Class Where Prov_En='"&City&"' and Prov<>0 order by id asc") IF Prs.Eof or Prs.Bof Then Exit Sub Else Redim Preserve ProvCityArr(0) Redim Preserve ProvCityArrCN(0) ProvCityArr(0)=Prs("Prov_EN") ProvCityArrCN(0)=""&Prs("Prov_CN")&"
" End IF End IF Prs.Close For i=0 to ubound(ProvCityArr) Response.Write(ProvCityArrCN(i)) Set rs=Conn.Execute("Select * From Member Where City='"&ProvCityArr(i)&"' and MemberType='Sight' order by id asc") Do while not (rs.Eof or rs.Bof) Response.Write(" "&rs("UserName")&"
") rs.movenext Loop rs.CLose Set rs=Nothing Response.Write("
") Next End Sub Public Sub JiuDianList(Prov,City,TopNum,Style) Dim Sql IF Prov<>"" Then Sql="shengfen="&Prov End IF IF City<>"" Then IF Sql="" Then Sql="diqu="&City Else Sql=Sql&" and diqu="&City End IF End IF IF Sql<>"" Then Sql="select Top "&TopNum&" * from hotelroom where show='1' and shenhe='0' "&Sql&" order by inputtime desc" Else Sql="select Top "&TopNum&" * from hotelroom where show='1' and shenhe='0' order by inputtime desc" ENd IF Set rs=Conn.Execute(Sql) Response.Write("") Do while not (rs.Eof or rs.Bof) Response.Write("") Response.Write("") Response.Write("") Response.Write("") rs.movenext Loop rs.CLose Response.Write("
·["&left(rs("hotelname"),10)&""&rs("roomclass")&"¥"&rs("youhuiprice")&"
") End Sub Function ArtMore(ColumID,PageName,PagePath,MoreSql,KeyWord) 'yuliu预留选项 Dim ArtList,ColumTitle,ArtListMoBan,YeiMa,CtsHeadTop Dim i:i=1 ColumID=Fl(ColumID,"Number") 'PagePath&Replace(PageName,"[Page]",1)&Kuozm '检查是不是有旧文件 whc 2008-3-23 21:34 Do while (DelFile(PagePath&Replace(PageName,"[Page]",i)&Kuozm)="删除成功") i=i+1 Loop '检查完成 CtsHeadTop=ReadFile("/NewStyle/CtsHtmlMoBan/xwList.asp") ArtListMoBan=Load.SubReplace("$TopReplace",CtsHeadTop) ArtListMoBan=Load.SubReplace("$KeyWordList",ArtListMoBan) ArtListMoBan=Load.SubReplace("$RMNews",ArtListMoBan) 'IF ColumID=0 Then ' ColumTitle="没有找到结果!!!" ' ArtList="没有找到结果!!!" ' ArtList=Replace(ArtListMoBan,"$ArtList$",ArtList) ' ArtList=Replace(ArtList,"$ColumTitle$",ColumTitle) ' ArtList=Replace(ArtList,"$YeiMa$","") ' Call WriteFile(PagePath&Replace(PageName,"[Page]",1)&Kuozm,ArtList) 'Else Set rs=Conn.Execute("Select * From Colum Where ID='"&ColumID&"' and Fu_Class<>1") IF rs.Eof or rs.Bof Then ColumTitle="没有找到结果!!!" ArtList="没有找到结果!!!" ArtList=Replace(ArtListMoBan,"$ArtList$",ArtList) ArtList=Replace(ArtList,"$ColumTitle$",ColumTitle) ArtList=Replace(ArtList,"$YeiMa$","") Call WriteFile(PagePath&Replace(PageName,"[Page]",1)&Kuozm,ArtList) Else ColumTitle=rs("Colum") IF rs("Fu_Class")=0 Then '验证调用大类还是小类 Sql=" and Fu_Colum='"&rs("ID")&"'" Else Sql=" and Colum_ID='"&rs("ID")&"'" End IF IF MoreSql<>"" Then IF Sql="" Then Sql=MoreSql Else Sql=Sql&MoreSql End IF End IF End IF IF Sql<>"" Then '取记录数,记录数为0写空页 Set rs=Conn.Execute("Select count(id) From Art Where BiaotiArt=0 and Del=0 and ArtCheck=0 "&Sql) ArtNum=rs(0) PageSize=30 IF (ArtNum mod PageSize)=0 Then ArtPagecount=Cint(ArtNum\PageSize) Else ArtPagecount=Cint(ArtNum\PageSize)+1 End IF IF ArtNum=0 Then '如果为0条记录,写空页,退出函数 ColumTitle="没有找到结果!!!" ArtList="没有找到结果!!!" ArtList=Replace(ArtListMoBan,"$ArtList$",ArtList) ArtList=Replace(ArtList,"$ColumTitle$",ColumTitle) ArtList=Replace(ArtList,"$YeiMa$","") Call WriteFile(PagePath&Replace(PageName,"[Page]",1)&Kuozm,ArtList) Exit Function End IF rs.Close Set rs=Nothing Set rs=Conn.Execute("Select Title,Path,FileName,AddDate,Content From Art Where BiaotiArt=0 and Del=0 and ArtCheck=0 "&Sql&" Order by id desc") For P=1 to ArtPagecount ArtList="" & vbcrlf ArtList=Replace(ArtListMoBan,"$ArtList$",ArtList) ArtList=Replace(ArtList,"$ColumTitle$",ColumTitle) IF P=1 Then IF ArtPagecount>1 Then YeiMa="共"&ArtNum&"条信息 首页 上一页 下一页 末页 第"&P&"页/共"&ArtPagecount&"页" Else YeiMa="共"&ArtNum&"条信息 首页 上一页 下一页 末页 第"&P&"页/共"&ArtPagecount&"页" End IF Else IF P=ArtPagecount Then YeiMa="共"&ArtNum&"条信息 首页 上一页 下一页 末页 第"&P&"页/共"&ArtPagecount&"页" Else YeiMa="共"&ArtNum&"条信息 首页 上一页 下一页 末页 第"&P&"页/共"&ArtPagecount&"页" End IF End IF ArtList=Replace(ArtList,"$YeiMa$",YeiMa) Call WriteFile(PagePath&Replace(PageName,"[Page]",P)&Kuozm,ArtList) 'Response.Write(ArtList&"
") Next Else End IF 'End IF '2007-11-27日修改,直接输出地址 '2008-5-27 加上"http://www.cts2008.com" 因为二级域名的原因, IF KeyWord<>"" Then '根据返回的KEY输出地址 ArtMore=""&KeyWord&"" Else ArtMore="http://www.cts2008.com"&PagePath&Replace(PageName,"[Page]",1)&Kuozm End IF End Function '-----------------------------------分类调用查询------------------------------------------------ Function XL_TYPES2(ID) Set C2rs=Conn.Execute("Select *,(select count(x.ID) From XianLu as x inner join Member as m on x.Member_Account=m.Account where m.Expires>getdate() and x.XL_TypeS=T.ID and del=0 and XL_Check=0) as coun From Member_TraveType as T where T.Fu_Class='"&ID&"' order by T.OrderID asc") Do while not (C2rs.Eof or C2rs.Bof) Response.Write(""&C2rs("Title")&"("&C2rs("coun")&")"&" ") C2rs.Movenext Loop '临时添加图季滑雪专题 IF ID=4 Then Response.write("温泉滑雪专题 ") C2rs.CLose Set C2rs=Nothing End Function Function XL_TypeS1() Set rs=Conn.Execute("Select z.* From Member_TraveType as z Where (z.Fu_Class is null) and (Select count(ID) From Member_TraveType Where Fu_Class=z.ID)>0 order by z.OrderID asc") Do while not (rs.Eof or rs.Bof) Response.Write(""&rs("Title")&"
") XL_TYPES2(rs("ID")) Response.Write("
") rs.Movenext Loop Rs.CLose Set rs=Nothing End Function '-----------------------------------分类调用查询结束------------------------------------------------ '-----------------------------------线路调用[下方]----------------------------------------------- Function XLTypeList(ID,ChrNum,ViewType) 'ViewType0,1 ID=FL(ID,"Number") ChrNum=FL(ChrNum,"Number") ViewType=FL(ViewType,"Number") XLTypeList="" End Function Function XLTypeList2(Top,XLType,ChrNum,ViewType) Set rs=conn.Execute("Select Top "&Top&" x.*,m.UserName From XianLu as x inner join Member as m on x.Member_Account=m.Account Where Member_Account='bqxd' and del=0 and XL_Check=0 and XL_TypeS='"&XLType&"' order by x.AddDate desc") Do While Not (rs.Eof or rs.Bof) IF rs("YouHui_Price")="" Then YouHui_Price="详细" Else YouHui_Price=rs("YouHui_Price") End IF IF rs("ShiChang_Price")="" Then ShiChang_Price="详细" Else ShiChang_Price=rs("ShiChang_Price") End IF IF Len(rs("XL_Name"))>ChrNum Then XL_Name=Left(rs("XL_Name"),ChrNum-2)&"..." Else XL_Name=rs("XL_Name") End IF IF ViewType=0 Then XLTypeList2=XLTypeList2&"
  • " XLTypeList2=XLTypeList2&"

    "&XL_Name&"

    " XLTypeList2=XLTypeList2&"¥"&ShiChang_Price&"" XLTypeList2=XLTypeList2&"
    ¥"&YouHui_Price&"
  • " ElseIF ViewType=1 Then XLTypeList2=XLTypeList2&"
  • " XLTypeList2=XLTypeList2&"

    "&XL_Name&"

    " XLTypeList2=XLTypeList2&"
    "&rs("UserName")&"
    " XLTypeList2=XLTypeList2&"
    "&YouHui_Price&"
  • " XLTypeList2=XLTypeList2&"¥"&ShiChang_Price&"" End IF rs.Movenext Loop rs.Close Set rs=Nothing End Function '-----------------------------------线路调用[下方]----------------------------------------------- 'Function ProvCityArtMore(如果为0则跳过该务件,生成页名称须加[page],路径,特殊SQL,例表名称) Function ProvCityArtMore(FColumID,ColumID,Prov,City,PageName,PagePath,MoreSql,ColumTitle) 'be(1为省2为市)与ArtMore相比,内容有所增加 Dim ArtList,ArtListMoBan,YeiMa,CtsHeadTop,ProvORCityName Dim CSProvName,CSCityName 'ProvORCityName=ProvCityCN(3,FL(ProvORCity,"Number")) 'IF ProvORCityName="" Then ' Exit Function '如果没有找到返回城市则退出!!! 'End IF CSProvName=ProvCityCN(3,FL(Prov,"Number")) CSCityName=ProvCityCN(3,FL(City,"Number")) IF CSCityName<>"" Then ProvORCityName=CSCityName Prov=City Sql="and City='"&City&"'" ArtListMoBan=ReadFile("\NewStyle\CtsHtmlMoBan\prov\citymore.html") ArtListMoBan=Replace(ArtListMoBan,"$F_ProvID{}$",CP.F_PCID) ArtListMoBan=Replace(ArtListMoBan,"$F_ProvCN{}$",CP.F_PCCN) ElseIF CSProvName<>"" and CSCityName="" Then ProvORCityName=CSProvName Sql="and Prov='"&Prov&"'" ArtListMoBan=ReadFile("\NewStyle\CtsHtmlMoBan\prov\provmore.html") Else Exit Function '如果没有找到返回城市则退出!!! End IF 'CtsHeadTop=ReadFile("/Ctshead4.htm") 'ArtListMoBan=Replace(ArtListMoBan,"$CtsHeadTop$",CtsHeadTop) IF FColumID<>0 Then Sql=Sql&" and Fu_Colum='"&ColumID&"'" End IF IF ColumID<>0 Then Sql=Sql&" and Colum_ID='"&ColumID&"'" End IF IF MoreSql<>"" Then Sql=Sql&MoreSql End IF 'IF Prov<>0 Then ' IF Sql="" Then ' Sql="and Prov='"&Prov&"'" 'Else ' Sql=Sql&"and Prov='"&Prov&"'" 'End IF 'ArtListMoBan=Replace(ArtListMoBan,"$News$",News(Prov,0,0,20,13,"blank",0)) 'End IF 'IF City<>0 Then ' IF Sql="" Then ' Sql="and City='"&City&"'" 'Else ' Sql=Sql&"and City='"&City&"'" 'End IF 'ArtListMoBan=Replace(ArtListMoBan,"$News$",News(0,City,0,20,13,"blank",0)) 'End IF IF Sql<>"" Then Set rs=Conn.Execute("Select count(id) From Art Where BiaotiArt=0 and Del=0 and ArtCheck=0 "&Sql) ArtNum=rs(0) IF (ArtNum mod 25)=0 Then ArtPagecount=Cint(ArtNum\25) Else ArtPagecount=Cint(ArtNum\25)+1 End IF IF ArtNum=0 Then '如果为0条记录,写空页,退出函数 ArtList=Replace(ArtListMoBan,"[$ArtList]","