3.1中修改幻灯新闻和图片新闻可以调用子栏目的方法_风讯Cms教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

幻灯新闻修改方法,在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"

查看更多 风讯cms教程  风讯cms模板

共2页上一页12下一页
来源:模板无忧//所属分类:风讯Cms教程/更新时间:2006-06-16
相关风讯Cms教程