⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rss.asp

📁 教师评估系统
💻 ASP
字号:
<!-- #include file="Cls.asp" --><%
Response.contentType="application/xml;charset=gb2312"
ChannelTitle=Cache("SiteName")
ChannelLink=Cache("SiteUrl")
%><?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel><%
ForumID=ChkNumeric(Request("ForumID"))
if ForumID>0 then
Set Rs=Conn.Execute("select PermissionsRead,PermissionsView from [WxForumPermissions] where ForumID="&ForumID&" and RoleID=0")
PermissionsRead=Rs(0)
PermissionView=Rs(1)
Rs.Close
if PermissionsRead=0 or PermissionView=0 then
Response.write "</channel></rss>"
CloseDataBase
end if

ChannelTitle=Conn.Execute("select ForumName from [WxForums] where id="&ForumID)(0)
ChannelLink=""&Cache("SiteUrl")&"Forums.asp?Fid="&ForumID&""
ShowRss
else
ShowRss
end if
Response.write "</channel></rss>"

sub ShowRss
%>
<title><%=ChannelTitle%></title>
<link><%=ChannelLink%></link>
<%
if ChkNumeric(Request.QueryString("goodtopic"))=1 Then goodsql=" and IsGood=1"
if ChkNumeric(Request.QueryString("toptopic"))=1 Then topsql=" and IsTop>0"
if ChkNumeric(Request.QueryString("moneytopic"))=1 Then moneysql=" and icon>10"
if ChkNumeric(Request("ForumID"))>0 Then forumsql=" and ForumID="&ForumID&""
sql="select top "&Cache("RssPerPage")&" * from [WxThreads] where IsDel=0 "&forumsql&goodsql&topsql&moneysql&" order by ID desc"
Set Rs=Conn.Execute(sql)
On Error Resume Next
do while Not Rs.Eof
ID=Rs("ID")
PostsTableName=Rs("PostsTableName")
Content=Conn.Execute("select Content from [WxPosts"&PostsTableName&"] where ThreadID="&ID&" and IsTopic=1")(0)
%>
<item>
<title><%=ReplaceText(Rs("Topic"),"<[^>]*>","")%></title>
<category><%=ReplaceText(Rs("Category"),"<[^>]*>","")%></category>
<author><%=ReplaceText(Rs("UserName"),"<[^>]*>","")%></author>
<pubDate><%=Rs("PostTime")%></pubDate>
<link><%=Cache("SiteUrl")%>Threads.asp?Tid=<%=Rs("id")%></link><description><![CDATA[<%=UBBContent(Content)%>]]></description></item><%
Rs.MoveNext
Loop
Rs.Close
end sub

function UBBContent(str)
if Instr(str,"[retopic]")>0 or Instr(str,"[postjb=")>0 or Instr(str,"[postjy=")>0 or Instr(str,"[postwz]")>0 or Instr(str,"[postmoney=")>0 or Instr(str,"[postfact=")>0 or Instr(str,"[postme]")>0 or Instr(str,"[postdj]")>0 then
str="此贴为特殊帖,请根据要求登录查看"
end if
UBBContent=str
end function

CloseDataBase
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -