关于WAP20新闻文章系统Newsasp页面导航的修改_第1页
关于WAP20新闻文章系统Newsasp页面导航的修改_第2页
关于WAP20新闻文章系统Newsasp页面导航的修改_第3页
关于WAP20新闻文章系统Newsasp页面导航的修改_第4页
关于WAP20新闻文章系统Newsasp页面导航的修改_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、.:.;第一种款式的WapHeader.asp代码:%If Session(ChineseType) ThenXML.ChineseType=Session(ChineseType)WAP.ChineseType=Session(ChineseType)End IfXML.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

2、Then XML.Redirect ErrorTip.asp 表示WAP模拟器。简繁体切换ThisFileName = & Request.ServerVariables(server_name) & Request.ServerVariables(script_name)ThisFileAllName = Lcase(ThisFileName & ? & Request.ServerVariables(Query_String) )XML.writeout ThisFileAllName网站信息配置Dim W_WebsiteAppe,W_SuppExpl,W_WebSiteName,W_We

3、bSiteUrl,W_StatMastName,W_StatMastEmail,W_StatMastQQ,W_WebSiteLogoDim W_WebSiteKeyword,W_WebSiteIntr,W_WebSiteCopyInfoDim W_ArtCataShowClose,W_ArtCataName,W_DownCataShowClose,W_DownCataName,W_CoolSiteCataShowClose,W_CoolSiteCataNameDim W_BookCataShowClose,W_BookCataName,W_BBsCataShowClose,W_BBsCataN

4、ame,W_BBsCataUrlDim W_BookWorryNeed,W_FrieLinkLogoUrl,W_FrieLinkCodeDim W_HomeArtRecoNum,W_HomeSoftRecoNum,W_HomeCoolSiteRecoNum,W_ArtRecoNum,W_SoftRecoNumDim W_CoolSiteRecoNum,W_BookRecoNum,W_TopArtRecoNum,W_TopSoftRecoNum,W_TopCoolSiteRecoNumDim W_PicCataName,W_PicCataShowClose,W_HomePicRecoNum,W_

5、PicRecoNum,W_TopPicRecoNum+Sub HoriNavi() 文章栏目导航XML.WriteOut XML.WriteOut 导航: & XML.A(,Index.asp,首页)If ArtClassID0 Thendim zClassID,zClassName,zParentPath,ParentPath1XML.StrSql=Select ClassID,ClassName,ParentPath From NewsClass Where ClassID= & ArtClassIDXML.MdbDoIf Not XML.RS.Eof Then zClassID=XML.

6、RS(ClassID) zParentPath=XML.RS(ParentPath) zClassName=XML.RS(ClassName)End IfXML.RS.CloseIf zParentPath0 Then zParentPath=Replace(zParentPath,0,) XML.StrSql=Select ClassID,ClassName,ParentPath From NewsClass Where ClassID in ( & zParentPath & ) XML.MdbDo 1 Do While Not XML.RS1.Eof XML.WriteOut - & X

7、ML.A(,News.asp?ListID= & XML.RS1(ClassID), XML.RS1(ClassName) XML.RS1.MoveNext Loop XML.RS1.CloseEnd IfXML.WriteOut - & XML.A(,News.asp?ListID= & zClassID,zClassName) & End IfEnd SubSub SoftDownNavi() 下载栏目导航XML.WriteOut & W_DownCataName & XML.WriteOut 导航: - & W_DownCataNameIf SoftClassID0 Thendim zC

8、lassID,zClassName,zParentPath,ParentPath1XML.StrSql=Select ClassID,ClassName,ParentPath From SoftClass Where ClassID= & SoftClassIDXML.MdbDoIf Not XML.RS.Eof Then zClassID=XML.RS(ClassID) zParentPath=XML.RS(ParentPath) zClassName=XML.RS(ClassName)End IfXML.RS.CloseIf zParentPath0 Then zParentPath=Re

9、place(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(ClassName) XML.RS1.MoveNext Loop XML.RS1.CloseEnd IfXML.WriteRow - &

10、XML.A(,SoftDown.asp?ListID= & zClassID,zClassName)End IfEnd Sub =文章栏目侧导航 =Sub ArticleClass()XML.WriteOut 栏目导航XML.WriteOut Dim zRsIf ArtClassID= ThenArtClassID=0End IfIf ArtClassID0 ThenXML.StrSql=Select ParentID From NewsClass Where ClassID=&ArtClassIDArtParentID=XML.MdbShow(ParentID)End IfXML.StrSq

11、l=Select ClassID,ClassName,Child From NewsClass Where ParentID=&ArtClassIDXML.MdbDoIf Not XML.RS.Eof ThenDo While Not XML.RS.Eof XML.WriteRow XML.ImgA(Images/RedDot.gif,News.asp?ListID= & XML.RS(ClassID),XML.RS(ClassName)XML.RS.MoveNextLoopElseIf ArtClassID0 ThenXML.StrSql=Select ClassID,ClassName F

12、rom NewsClass Where ParentID= & ArtParentIDXML.MdbDo 1If 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) XML.RS1.MoveNext LoopEnd IfXML.RS1.CloseEnd IfXML.RS.CloseXML.WriteOut End Sub =下载栏目侧导航 =Sub SoftDownC

13、lass()XML.WriteOut 栏目导航Dim zRsIf SoftClassID= ThenSoftClassID=0End IfIf SoftClassID0 ThenXML.StrSql=Select ParentID From SoftClass Where ClassID= & SoftClassIDSoftParentID=XML.MdbShow(ParentID)End IfXML.StrSql=Select ClassID,ClassName,Child From SoftClass Where ParentID=& SoftClassIDXML.MdbDoIf Not

14、XML.RS.Eof ThenDo While Not XML.RS.Eof XML.WriteRow XML.ImgA(Images/RedDot.gif,SoftDown.asp?ListID= & XML.RS(ClassID),XML.RS(ClassName)XML.RS.MoveNextLoopElseIf SoftClassID0 ThenXML.StrSql=Select ClassID,ClassName From SoftClass Where ParentID= & SoftParentIDXML.MdbDo 1If Not XML.RS1.Eof Then Do Whi

15、le Not XML.RS1.Eof XML.WriteRow XML.ImgA(Images/RedDot.gif,SoftDown.asp?ListID= & XML.RS1(ClassID),XML.RS1(ClassName) XML.RS1.MoveNext LoopEnd IfXML.RS1.CloseEnd IfXML.RS.CloseEnd Sub首页版块导航Sub ShowNews(NewClassID)版块导航。XML.WriteOut XML.StrSql=Select * From NewsClass Where ParentID= & NewClassIDXML.Md

16、bDo执行SQL语句。For I=0 To XML.Rs.RecordCount-1 XML.WriteOut XML.ImgA(,News.asp?ListId= & XML.RS(ClassId),XML.RS(ClassName) XML.Rs.MoveNext If IXML.Rs.RecordCount-1 Then If I=4 Or I=8 Or I=12 Then XML.WriteRow Else XML.WriteOut End IfNextXML.WriteOut XML.WriteOut If NewClassID 0 ThenXML.StrSql=Select Cla

17、ssID,ClassName,ParentPath,Child From NewsClass Where ClassID= & NewClassIDXML.MdbDoIf 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) & , & XML.RS(ClassID

18、) & ,% 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 ifEnd IfXML.RS.Close XML.StrSql=Select Top 6 D_ID,D_ClassID,D_Title,D_Count,D_Time From NewsData Where d_classid in (&

19、ChildID&) and d_recycle=false ORDER BY d_id DESCElseXML.StrSql=Select Top 6 D_ID,D_ClassID,D_Title,D_Count,D_Time From NewsData Where d_recycle=false ORDER BY d_id DESCEnd IfXML.EveryPageSize=10XML.FieldShow=D_TitleXML.FieldId=D_IDXML.GoFileName=NewsShow.aspXML.RsInfoPlace=none 设置显示的数据集合信息的位置topbott

20、omnone,默许是topXML.DBOrderNumber=True 设置数据记录前能否显示自动编号数字。新增较V1.5XML.ErrorPagePath=XML.DbListTypeMode=9 当为9时,可以设置DbListImgPath的属性值。XML.DbListImgPath=Images/RedDot.gifXML.MdbListXML.WriteOut End Sub以下设置简繁体。FontType=Request.QueryString(FontType)If FontType=Simple Then Session(ChineseType)=Simple XML.Chine

21、seType=Session(ChineseType) WAP.ChineseType=Session(ChineseType)ElseIf FontType=Complex Then Session(ChineseType)=Complex XML.ChineseType=Session(ChineseType) WAP.ChineseType=Session(ChineseType)End If以下为文件正文。XML.WriteOut XML.WriteOut XML.WriteOut XML.Img(images/NewLogo.gif,)XML.WriteOut XML.WriteOu

22、t XML.WriteOut XML.IA(images/home.gif,Index.asp)XML.WriteOut XML.IA(images/SimpleFont.gif,?FontType=Simple)XML.WriteOut XML.IA(images/ComplexFont.gif,?FontType=Complex)XML.WriteOut XML.WriteOut XML.WriteOut %第二种款式的WapHeader.asp代码:%If Session(ChineseType) ThenXML.ChineseType=Session(ChineseType)WAP.C

23、hineseType=Session(ChineseType)End IfXML.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.Redirect ErrorTip.asp 表示WAP模拟器。简繁体切换ThisFileName = & Request.ServerVariables(server_nam

24、e) & Request.ServerVariables(script_name)ThisFileAllName = Lcase(ThisFileName & ? & Request.ServerVariables(Query_String) )XML.writeout ThisFileAllName网站信息配置Dim W_WebsiteAppe,W_SuppExpl,W_WebSiteName,W_WebSiteUrl,W_StatMastName,W_StatMastEmail,W_StatMastQQ,W_WebSiteLogoDim W_WebSiteKeyword,W_WebSite

25、Intr,W_WebSiteCopyInfoDim W_ArtCataShowClose,W_ArtCataName,W_DownCataShowClose,W_DownCataName,W_CoolSiteCataShowClose,W_CoolSiteCataNameDim W_BookCataShowClose,W_BookCataName,W_BBsCataShowClose,W_BBsCataName,W_BBsCataUrlDim W_BookWorryNeed,W_FrieLinkLogoUrl,W_FrieLinkCodeDim W_HomeArtRecoNum,W_HomeS

26、oftRecoNum,W_HomeCoolSiteRecoNum,W_ArtRecoNum,W_SoftRecoNumDim W_CoolSiteRecoNum,W_BookRecoNum,W_TopArtRecoNum,W_TopSoftRecoNum,W_TopCoolSiteRecoNumDim W_PicCataName,W_PicCataShowClose,W_HomePicRecoNum,W_PicRecoNum,W_TopPicRecoNum+Sub HoriNavi() 文章栏目导航XML.WriteOut XML.WriteOut 导航: & XML.A(,Index.asp

27、,首页)If ArtClassID0 Thendim zClassID,zClassName,zParentPath,ParentPath1XML.StrSql=Select ClassID,ClassName,ParentPath From NewsClass Where ClassID= & ArtClassIDXML.MdbDoIf Not XML.RS.Eof Then zClassID=XML.RS(ClassID) zParentPath=XML.RS(ParentPath) zClassName=XML.RS(ClassName)End IfXML.RS.CloseIf zPar

28、entPath0 Then zParentPath=Replace(zParentPath,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 Loop XML.RS1.Clos

29、eEnd IfXML.WriteOut - & XML.A(,News.asp?ListID= & zClassID,zClassName) & End IfEnd SubSub SoftDownNavi() 下载栏目导航XML.WriteOut & W_DownCataName & XML.WriteOut 导航: - & W_DownCataNameIf SoftClassID0 Thendim zClassID,zClassName,zParentPath,ParentPath1XML.StrSql=Select ClassID,ClassName,ParentPath From Sof

30、tClass Where ClassID= & SoftClassIDXML.MdbDoIf Not XML.RS.Eof Then zClassID=XML.RS(ClassID) zParentPath=XML.RS(ParentPath) zClassName=XML.RS(ClassName)End IfXML.RS.CloseIf zParentPath0 Then zParentPath=Replace(zParentPath,0,) XML.StrSql=Select ClassID,ClassName,ParentPath From SoftClass Where ClassI

31、D in ( & zParentPath & ) XML.MdbDo 1 Do While Not XML.RS1.Eof XML.WriteOut - & XML.A(,SoftDown.asp?ListID= & XML.RS1(ClassID), XML.RS1(ClassName) XML.RS1.MoveNext Loop XML.RS1.CloseEnd IfXML.WriteRow - & XML.A(,SoftDown.asp?ListID= & zClassID,zClassName)End IfEnd Sub =文章栏目侧导航 =Sub ArticleClass()XML.

32、WriteOut 栏目导航XML.WriteOut Dim zRsIf ArtClassID= ThenArtClassID=0End IfIf ArtClassID0 ThenXML.StrSql=Select ParentID From NewsClass Where ClassID=&ArtClassIDArtParentID=XML.MdbShow(ParentID)End IfXML.StrSql=Select ClassID,ClassName,Child From NewsClass Where ParentID=&ArtClassIDXML.MdbDoIf Not XML.RS

33、.Eof ThenFor I=0 To XML.RecordCount-1If (I+4)Mod 4=3 Then XML.WriteOut Else XML.WriteOut XML.WriteOut XML.ImgA(,News.asp?ListID= & XML.RS(ClassID),XML.RS(ClassName)XML.RS.MoveNextNextElseIf ArtClassID0 ThenXML.StrSql=Select ClassID,ClassName From NewsClass Where ParentID= & ArtParentIDXML.MdbDo 1If

34、Not XML.RS1.Eof ThenFor I=0 To XML.RecordCount-1If (I+4)Mod 4=3 Then XML.WriteOut Else XML.WriteOut XML.WriteOut XML.ImgA(,News.asp?ListID= & XML.RS1(ClassID),XML.RS1(ClassName) XML.RS1.MoveNext NextEnd IfXML.RS1.CloseEnd IfXML.RS.CloseXML.WriteOut End Sub =下载栏目侧导航 =Sub SoftDownClass()XML.WriteOut 栏

35、目导航Dim zRsIf SoftClassID= ThenSoftClassID=0End IfIf SoftClassID0 ThenXML.StrSql=Select ParentID From SoftClass Where ClassID= & SoftClassIDSoftParentID=XML.MdbShow(ParentID)End IfXML.StrSql=Select ClassID,ClassName,Child From SoftClass Where ParentID=& SoftClassIDXML.MdbDoIf Not XML.RS.Eof ThenDo Wh

36、ile Not XML.RS.Eof XML.WriteRow XML.ImgA(Images/RedDot.gif,SoftDown.asp?ListID= & XML.RS(ClassID),XML.RS(ClassName)XML.RS.MoveNextLoopElseIf SoftClassID0 ThenXML.StrSql=Select ClassID,ClassName From SoftClass Where ParentID= & SoftParentIDXML.MdbDo 1If Not XML.RS1.Eof Then Do While Not XML.RS1.Eof X

37、ML.WriteRow XML.ImgA(Images/RedDot.gif,SoftDown.asp?ListID= & XML.RS1(ClassID),XML.RS1(ClassName) XML.RS1.MoveNext LoopEnd IfXML.RS1.CloseEnd IfXML.RS.CloseEnd Sub首页版块导航Sub ShowNews(NewClassID)版块导航。XML.WriteOut XML.StrSql=Select * From NewsClass Where ParentID= & NewClassIDXML.MdbDo执行SQL语句。For I=0 T

38、o XML.Rs.RecordCount-1 XML.WriteOut XML.ImgA(,News.asp?ListId= & XML.RS(ClassId),XML.RS(ClassName) XML.Rs.MoveNext If IXML.Rs.RecordCount-1 Then If I=4 Or I=8 Or I=12 Then XML.WriteRow Else XML.WriteOut End IfNextXML.WriteOut XML.WriteOut If NewClassID 0 ThenXML.StrSql=Select ClassID,ClassName,Paren

39、tPath,Child From NewsClass Where ClassID= & NewClassIDXML.MdbDoIf 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) & , & XML.RS(ClassID) & ,% XML.MdbDo 1 do while not XML.RS1.eof if ChildID= then ChildID=XML.RS1(0) else ChildID=ChildID

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论