<% if SiteConfig("EnableForumsRSS")=0 then response.write "系统关闭了 RSS 订阅源功能" Response.End end if ForumID=RequestInt("ForumID") if ForumID > 0 then Rs.Open "[BBSXP_ForumPermissions] where ForumID="&ForumID&" and RoleID=0",Conn,1 if Rs.Eof then response.write "找不到指定的版块的权限表" Response.End end if PermissionRead=Rs("PermissionRead") PermissionView=Rs("PermissionView") Rs.Close if PermissionView=0 or PermissionRead=0 then response.write "该版块没有开放游客浏览和阅读权限,无法使用 RSS 订阅源!" Response.End end if ChannelTitle=Conn.Execute("select ForumName from [BBSXP_Forums] where ForumID="&ForumID&"")(0) ChannelLink=""&SiteURL&"ShowForum.asp?ForumID="&ForumID&"" end if Response.contentType="application/xml" function FormatTime(value) FormatTime=""&FormatDateTime(value, 2)&" "&FormatDateTime(value, 4)&"" FormatTime=""&Year(value)&"-"&Add0(Month(value))&"-"&Add0(Day(value))&" "&FormatDateTime(value, 4)&":"&Add0(Second(value))&"" end function function Add0(value) if Len(value)<2 then value="0"&value Add0=value end function %> <%=ChannelTitle%> <%=ChannelLink%> <%=SiteConfig("SiteName")%> <%=SiteURL%>images/logo.gif <%=SiteURL%>Default.asp <% sql="select top "&SiteConfig("RSSDefaultThreadsPerFeed")&" * from [BBSXP_Threads] where IsDel=0 and IsApproved=1 and ForumID="&ForumID&" order by ThreadID desc" Set Rs=Conn.Execute(sql) do while Not Rs.Eof %> <%=Rs("Topic")%> <%=SiteURL%>ShowPost.asp?ThreadID=<%=Rs("ThreadID")%> <%=Rs("Category")%> <%=Rs("PostAuthor")%> <%=FormatTime(Rs("PostTime"))%> ]]> <% Rs.MoveNext Loop Set Rs = Nothing %>