1、 第一种样式的WapHeader.asp代码: <%If Not IsObjInstalled("QuickWAP.XML") Then Response.Redirect "NoSupport.asp"%> <% Set XML=Server.CreateObject("QuickWAP.XML") Set WAP=Server.CreateObject("QuickWAP.WAP") %> <% If Session("C
2、hineseType")<>"" Then XML.ChineseType=Session("ChineseType") WAP.ChineseType=Session("ChineseType") End If XML.XhtmlHeader CSSFile '设置是否支持IE和WAP模拟器浏览。 If Lcase(AllowIE)<>"true" And XML.Displayer="Web" Then XML.Redirect "ErrorTip.asp" '表示IE浏览器 'If Lcase(AllowIE)<>"true" And XML.Displayer="Wap"
3、 Then XML.Redirect "ErrorTip.asp" '表示WAP模拟器。 '简繁体切换 ThisFileName = "http://" & Request.ServerVariables("server_name") & Request.ServerVariables("script_name") ThisFileAllName = Lcase(ThisFileName & "?" & Request.ServerVariables("Query_String") ) 'XML.writeout ThisFileAllName '网站信息配置 Dim W_Webs
4、iteAppe,W_SuppExpl,W_WebSiteName,W_WebSiteUrl,W_StatMastName,W_StatMastEmail,W_StatMastQQ,W_WebSiteLogo Dim W_WebSiteKeyword,W_WebSiteIntr,W_WebSiteCopyInfo Dim W_ArtCataShowClose,W_ArtCataName,W_DownCataShowClose,W_DownCataName,W_CoolSiteCataShowClose,W_CoolSiteCataName Dim W_BookCataShowClose,W
5、BookCataName,W_BBsCataShowClose,W_BBsCataName,W_BBsCataUrl Dim W_BookWorryNeed,W_FrieLinkLogoUrl,W_FrieLinkCode Dim W_HomeArtRecoNum,W_HomeSoftRecoNum,W_HomeCoolSiteRecoNum,W_ArtRecoNum,W_SoftRecoNum Dim W_CoolSiteRecoNum,W_BookRecoNum,W_TopArtRecoNum,W_TopSoftRecoNum,W_TopCoolSiteRecoNum Dim W
6、PicCataName,W_PicCataShowClose,W_HomePicRecoNum,W_PicRecoNum,W_TopPicRecoNum '++++++++++++++++++++++++++++++++++++ Sub HoriNavi() '文章栏目导航 XML.WriteOut "
7、StrSql="Select ClassID,ClassName,ParentPath From NewsClass Where ClassID=" & ArtClassID XML.MdbDo If Not XML.RS.Eof Then zClassID=XML.RS("ClassID") zParentPath=XML.RS("ParentPath") zClassName=XML.RS("ClassName") End If XML.RS.Close If zParentPath<>0 Then zParentPath=Replace(zPa
8、rentPath,"0,","") XML.StrSql="Select ClassID,ClassName,ParentPath From NewsClass Where ClassID in (" & zParentPath & ")" XML.MdbDo 1 Do While Not XML.RS1.Eof XML.WriteOut " ->> " & XML.A("","News.asp?ListID=" & XML.RS1("ClassID"), XML.RS1("ClassName")) XML.RS1.MoveNext
9、 Loop XML.RS1.Close End If XML.WriteOut " ->> " & XML.A("","News.asp?ListID=" & zClassID,zClassName) & "
10、sID,zClassName,zParentPath,ParentPath1 XML.StrSql="Select ClassID,ClassName,ParentPath From SoftClass Where ClassID=" & SoftClassID XML.MdbDo If Not XML.RS.Eof Then zClassID=XML.RS("ClassID") zParentPath=XML.RS("ParentPath") zClassName=XML.RS("ClassName") End If XML.RS.Close If zPa
11、rentPath<>0 Then zParentPath=Replace(zParentPath,"0,","") XML.StrSql="Select ClassID,ClassName,ParentPath From SoftClass Where ClassID in (" & zParentPath & ")" XML.MdbDo 1 Do While Not XML.RS1.Eof XML.WriteOut " ->> " & XML.A("","SoftDown.asp?ListID=" & XML.RS1("ClassID")
12、 XML.RS1("ClassName")) XML.RS1.MoveNext Loop XML.RS1.Close End If XML.WriteRow " ->> " & XML.A("","SoftDown.asp?ListID=" & zClassID,zClassName) End If End Sub ' ============================================================== '文章栏目侧导航 ' ======================================
13、 Sub ArticleClass() XML.WriteOut "
14、ntID") End If XML.StrSql="Select ClassID,ClassName,Child From NewsClass Where ParentID="&ArtClassID XML.MdbDo If Not XML.RS.Eof Then Do While Not XML.RS.Eof XML.WriteRow XML.ImgA("Images/RedDot.gif","News.asp?ListID=" & XML.RS("ClassID"),XML.RS("ClassName")) XML.RS.MoveNext Loop E
15、lseIf ArtClassID<>0 Then XML.StrSql="Select ClassID,ClassName From NewsClass Where ParentID=" & ArtParentID XML.MdbDo 1 If Not XML.RS1.Eof Then Do While Not XML.RS1.Eof XML.WriteRow XML.ImgA("Images/RedDot.gif","News.asp?ListID=" & XML.RS1("ClassID"),XML.RS1("ClassName"))
16、 XML.RS1.MoveNext Loop End If XML.RS1.Close End If XML.RS.Close XML.WriteOut "
17、m zRs If SoftClassID="" Then SoftClassID=0 End If If SoftClassID<>0 Then XML.StrSql="Select ParentID From SoftClass Where ClassID=" & SoftClassID SoftParentID=XML.MdbShow("ParentID") End If XML.StrSql="Select ClassID,ClassName,Child From SoftClass Where ParentID="& SoftClassID XML.MdbDo If
18、 Not XML.RS.Eof Then Do While Not XML.RS.Eof XML.WriteRow XML.ImgA("Images/RedDot.gif","SoftDown.asp?ListID=" & XML.RS("ClassID"),XML.RS("ClassName")) XML.RS.MoveNext Loop ElseIf SoftClassID<>0 Then XML.StrSql="Select ClassID,ClassName From SoftClass Where ParentID=" & SoftParentID
19、XML.MdbDo 1 If Not XML.RS1.Eof Then Do While Not XML.RS1.Eof XML.WriteRow XML.ImgA("Images/RedDot.gif","SoftDown.asp?ListID=" & XML.RS1("ClassID"),XML.RS1("ClassName")) XML.RS1.MoveNext Loop End If XML.RS1.Close End If XML.RS.Close End Sub ''''''''''''''''''''''''
20、'''''''' '首页版块导航 Sub ShowNews(NewClassID) '版块导航。 XML.WriteOut "
21、 XML.Rs.MoveNext
If I 22、ath,Child From NewsClass Where ClassID=" & NewClassID
XML.MdbDo
If Not XML.RS.Eof Then
if XML.RS("ClassID")>0 then
if XML.RS("Child")>0 then
ChildID=""
XML.StrSql="select ClassID from NewsClass where ParentID=" & XML.RS("ClassID") & " or ParentPath like '" & XML.RS("ParentPath 23、") & "," & XML.RS("ClassID") & ",%'"
XML.MdbDo 1
do while not XML.RS1.eof
if ChildID="" then
ChildID=XML.RS1(0)
else
ChildID=ChildID & "," & XML.RS1(0)
end if
XML.RS1.movenext
loop
else
ChildID=NewClassID
end if
end if 24、
End If
XML.RS.Close
XML.StrSql="Select Top 6 D_ID,D_ClassID,D_Title,D_Count,D_Time From NewsData Where d_classid in ("&ChildID&") and d_recycle=false ORDER BY d_id DESC"
Else
XML.StrSql="Select Top 6 D_ID,D_ClassID,D_Title,D_Count,D_Time From NewsData Where d_recycle=false ORDER BY d_id DESC" 25、
End If
XML.EveryPageSize=10
XML.FieldShow="D_Title"
XML.FieldId="D_ID"
XML.GoFileName="NewsShow.asp"
XML.RsInfoPlace="none" '设置显示的数据集合信息的位置[top\bottom\none,默认是top]
'XML.DBOrderNumber=True '设置数据记录前是否显示自动编号数字。[新增较V1.5]
XML.ErrorPagePath=""
XML.DbListTypeMode=9 '当为9时,可以设置DbListImgPath的属性值。
X 26、ML.DbListImgPath="Images/RedDot.gif"
XML.MdbList
XML.WriteOut "
27、ype="Complex" Then Session("ChineseType")="Complex" XML.ChineseType=Session("ChineseType") WAP.ChineseType=Session("ChineseType") End If '以下为文件正文。 XML.WriteOut "
28、 XML.WriteOut "
29、pHeader.asp代码: <%If Not IsObjInstalled("QuickWAP.XML") Then Response.Redirect "NoSupport.asp"%> <% Set XML=Server.CreateObject("QuickWAP.XML") Set WAP=Server.CreateObject("QuickWAP.WAP") %> <% If Session("ChineseType")
30、<>"" Then XML.ChineseType=Session("ChineseType") WAP.ChineseType=Session("ChineseType") End If XML.XhtmlHeader CSSFile '设置是否支持IE和WAP模拟器浏览。 If Lcase(AllowIE)<>"true" And XML.Displayer="Web" Then XML.Redirect "ErrorTip.asp" '表示IE浏览器 'If Lcase(AllowIE)<>"true" And XML.Displayer="Wap" Then XML.Re
31、direct "ErrorTip.asp" '表示WAP模拟器。 '简繁体切换 ThisFileName = "http://" & Request.ServerVariables("server_name") & Request.ServerVariables("script_name") ThisFileAllName = Lcase(ThisFileName & "?" & Request.ServerVariables("Query_String") ) 'XML.writeout ThisFileAllName '网站信息配置 Dim W_WebsiteAppe,W_Su
32、ppExpl,W_WebSiteName,W_WebSiteUrl,W_StatMastName,W_StatMastEmail,W_StatMastQQ,W_WebSiteLogo Dim W_WebSiteKeyword,W_WebSiteIntr,W_WebSiteCopyInfo Dim W_ArtCataShowClose,W_ArtCataName,W_DownCataShowClose,W_DownCataName,W_CoolSiteCataShowClose,W_CoolSiteCataName Dim W_BookCataShowClose,W_BookCataNam
33、e,W_BBsCataShowClose,W_BBsCataName,W_BBsCataUrl Dim W_BookWorryNeed,W_FrieLinkLogoUrl,W_FrieLinkCode Dim W_HomeArtRecoNum,W_HomeSoftRecoNum,W_HomeCoolSiteRecoNum,W_ArtRecoNum,W_SoftRecoNum Dim W_CoolSiteRecoNum,W_BookRecoNum,W_TopArtRecoNum,W_TopSoftRecoNum,W_TopCoolSiteRecoNum Dim W_PicCataName
34、W_PicCataShowClose,W_HomePicRecoNum,W_PicRecoNum,W_TopPicRecoNum '++++++++++++++++++++++++++++++++++++ Sub HoriNavi() '文章栏目导航 XML.WriteOut "
35、ect ClassID,ClassName,ParentPath From NewsClass Where ClassID=" & ArtClassID XML.MdbDo If Not XML.RS.Eof Then zClassID=XML.RS("ClassID") zParentPath=XML.RS("ParentPath") zClassName=XML.RS("ClassName") End If XML.RS.Close If zParentPath<>0 Then zParentPath=Replace(zParentPath,"0,
36、","") XML.StrSql="Select ClassID,ClassName,ParentPath From NewsClass Where ClassID in (" & zParentPath & ")" XML.MdbDo 1 Do While Not XML.RS1.Eof XML.WriteOut " ->> " & XML.A("","News.asp?ListID=" & XML.RS1("ClassID"), XML.RS1("ClassName")) XML.RS1.MoveNext Loop X
37、ML.RS1.Close End If XML.WriteOut " ->> " & XML.A("","News.asp?ListID=" & zClassID,zClassName) & "
38、me,zParentPath,ParentPath1 XML.StrSql="Select ClassID,ClassName,ParentPath From SoftClass Where ClassID=" & SoftClassID XML.MdbDo If Not XML.RS.Eof Then zClassID=XML.RS("ClassID") zParentPath=XML.RS("ParentPath") zClassName=XML.RS("ClassName") End If XML.RS.Close If zParentPath<>0
39、Then zParentPath=Replace(zParentPath,"0,","") XML.StrSql="Select ClassID,ClassName,ParentPath From SoftClass Where ClassID in (" & zParentPath & ")" XML.MdbDo 1 Do While Not XML.RS1.Eof XML.WriteOut " ->> " & XML.A("","SoftDown.asp?ListID=" & XML.RS1("ClassID"), XML.RS1("C
40、lassName")) XML.RS1.MoveNext Loop XML.RS1.Close End If XML.WriteRow " ->> " & XML.A("","SoftDown.asp?ListID=" & zClassID,zClassName) End If End Sub ' ============================================================== '文章栏目侧导航 ' ==================================================
41、 Sub ArticleClass() XML.WriteOut "
42、If
XML.StrSql="Select ClassID,ClassName,Child From NewsClass Where ParentID="&ArtClassID
XML.MdbDo
If Not XML.RS.Eof Then
For I=0 To XML.RecordCount-1
If (I+4)Mod 4=3 Then XML.WriteOut "
" Else XML.WriteOut " "
XML.WriteOut XML.ImgA("","News.asp?ListID=" & XML.RS("ClassID"),XML.R
43、S("ClassName"))
XML.RS.MoveNext
Next
ElseIf ArtClassID<>0 Then
XML.StrSql="Select ClassID,ClassName From NewsClass Where ParentID=" & ArtParentID
XML.MdbDo 1
If Not XML.RS1.Eof Then
For I=0 To XML.RecordCount-1
If (I+4)Mod 4=3 Then XML.WriteOut "
" Else XML.WriteOut " "
44、XML.WriteOut XML.ImgA("","News.asp?ListID=" & XML.RS1("ClassID"),XML.RS1("ClassName")) XML.RS1.MoveNext Next End If XML.RS1.Close End If XML.RS.Close XML.WriteOut "
45、 Sub SoftDownClass() XML.WriteOut "
46、Select ClassID,ClassName,Child From SoftClass Where ParentID="& SoftClassID XML.MdbDo If Not XML.RS.Eof Then Do While Not XML.RS.Eof XML.WriteRow XML.ImgA("Images/RedDot.gif","SoftDown.asp?ListID=" & XML.RS("ClassID"),XML.RS("ClassName")) XML.RS.MoveNext Loop ElseIf SoftClassID<>0 T
47、hen XML.StrSql="Select ClassID,ClassName From SoftClass Where ParentID=" & SoftParentID XML.MdbDo 1 If Not XML.RS1.Eof Then Do While Not XML.RS1.Eof XML.WriteRow XML.ImgA("Images/RedDot.gif","SoftDown.asp?ListID=" & XML.RS1("ClassID"),XML.RS1("ClassName")) XML.RS1.MoveNex
48、t Loop End If XML.RS1.Close End If XML.RS.Close End Sub '''''''''''''''''''''''''''''''' '首页版块导航 Sub ShowNews(NewClassID) '版块导航。 XML.WriteOut "
49、XML.WriteOut XML.ImgA("","News.asp?ListId=" & XML.RS("ClassId"),XML.RS("ClassName"))
XML.Rs.MoveNext
If I
50、 "