首页 > 网站 > 建站经验 > 正文

3.1中修改幻灯新闻和图片新闻可以调用子栏目的方法

2024-08-30 19:06:10
字体:
来源:转载
供稿:网友

幻灯新闻修改方法,在RefreshFunction.asp文件中找到:

if ClassListStr <> "" then
FilterSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass where FS_News.Classid=FS_NewsClass.Classid and FS_News.DelTF=0 and FS_News.FilterNews=1 and FS_News.AuditTF=1 and FS_NewsClass.ClassEName='" & ClassListStr & "' order by FS_News.ID Desc"
else
FilterSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass where FS_News.Classid=FS_NewsClass.Classid and FS_News.DelTF=0 and FS_News.FilterNews=1 and FS_News.AuditTF=1 order by FS_News.ID Desc"
end if
Set RsFilterObj = Conn.Execute(FilterSql)

修改为:

dim TemppID,TemppSql,EndClassIDList
if ClassListStr <> "" then

TemppSql="select ClassID from FS_NewsClass where ClassEName='" & ClassListStr & "'"
Set TemppID=conn.execute(TemppSql)
EndClassIDList= "'" & TemppID(0) & "'" & AllChildClassIDStrList(TemppID(0))
FilterSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass where FS_News.Classid=FS_NewsClass.Classid and FS_News.DelTF=0 and FS_News.FilterNews=1 and FS_News.AuditTF=1 and FS_NewsClass.ClassID in (" & EndClassIDList & ") order by FS_News.ID Desc"

else
FilterSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass where FS_News.Classid=FS_NewsClass.Classid and FS_News.DelTF=0 and FS_News.FilterNews=1 and FS_News.AuditTF=1 order by FS_News.ID Desc"
end if
Set RsFilterObj = Conn.Execute(FilterSql)

图片新闻修改方法:

在RefreshFunction.asp文件中找到:

if ClassListStr = "" then
if RefreshType = "Index" then
PicSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass Where FS_News.ClassID=FS_NewsClass.ClassID and FS_News.DelTF=0 and FS_News.PicNewsTF=1 and FS_News.AuditTF=1 order by FS_News.ID Desc"
elseif RefreshType = "Class" then
PicSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass Where FS_News.ClassID=FS_NewsClass.ClassID and FS_News.ClassID='" & RefreshID & "' and FS_News.DelTF=0 and FS_News.PicNewsTF=1 and FS_News.AuditTF=1 order by FS_News.ID Desc"
elseif RefreshType = "News" then
TempSql = "Select ClassID from FS_News where NewsID='" & RefreshID & "' order by ID desc"
Set RsTempObj = Conn.Execute(TempSql)
if Not RsTempobj.Eof then
PicSql = "Select Top " & NewsNumberStr & " *,FS_NewsClass.FileExtName as ClassFileExtName,FS_News.FileExtName as NewsFileExtName from FS_News,FS_NewsClass Where FS_News.ClassID=FS_NewsClass.ClassID and FS_News.ClassID='" & RsTempobj("ClassID") & "' and FS_News.DelTF=0 and FS_News.PicNewsTF=1 and FS_News.AuditTF=1 order by FS_News.ID Desc"

共2页上一页12下一页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表