<!-- #include file=inc/BBSsetup.jsp -->
<!-- #include file=inc/Board_Popfun.jsp -->
<%
dim RssNums,NotShowBoard,HomeUrl
'订阅新贴条数
RssNums=20
'不显示的版块
NotShowBoard=""
'论坛安装目录
HomeUrl="http://www.yclife.cn/bbs/"


'''''''''以下内容无须修改'''''''''''''
''''''''''''''''''''''''''''''''''''''
dim BoardID,SQL
BoardID=Request.QueryString("BoardID")

Dim NSB,NSBnum,NSBstr,ii,Pai,vote,hotdays
IF  NotShowBoard<>"" then
NSB=split(NotShowBoard, "|")
NSBnum=ubound(NSB)

IF IsInteger(BoardID) = FALSE Then
NSBstr=" where "
ELSE
NSBstr=" and "
END IF

for ii=0 to NSBnum
NSBstr=NSBstr & "A.BoardID<>"& NSB(ii) &" and "
next
NSBstr=NSBstr & "A.BoardID<>444"
END if

Response.ContentType="application/xml"
Response.Expires=0
Response.Write("<?xml version=""1.0"" encoding=""GB2312""?>")
%>
<rss>
<channel>
<title><%=DEF_BBS_Name%> - 最新<%=RssNums%>个主题</title>
<link><%=DEF_SiteHomeUrl%></link>
<Description><%=DEF_BBS_Name%></Description>
<language>zh-cn</language>
<copyright>Copyright 2006 运城生活网</copyright>
<webMaster>web@c0359.com</webMaster>
<%
IF IsInteger(BoardID) = FALSE Then
	SQL = "select TOP "&RssNums&" A.ID,A.Title,A.TitleStyle,A.BoardID,A.UserName,A.LastTime,A.LastUser,B.BoardName from LeadBBS_Announce as A inner join LeadBBS_Boards as B on A.BoardID=B.BoardID "&NSBstr&" Order by LastTime DESC"
Else
	SQL = "select TOP "&RssNums&" A.ID,A.Title,A.TitleStyle,A.BoardID,A.UserName,A.LastTime,A.LastUser,B.BoardName from LeadBBS_Announce as A inner join LeadBBS_Boards as B on A.BoardID=B.BoardID where A.BoardID="&BoardID &NSBstr&" Order by LastTime DESC"
End IF
OpenDatabase
Dim Rs
	Set rs = Server.CreateObject("ADODB.Recordset")
    Set Rs = Con.ExeCute(SQL)
	Dim Num
	Dim GetData
	If Not rs.Eof Then
		GetData = Rs.GetRows(-1)
		Num = Ubound(GetData,2)
	Else
		Num = -1
	End If
	Rs.close
	Set Rs = Nothing
	CloseDatabase

	Dim PostTime,LastUser,BoardName,PostWholeName

IF Num = -1 Then
	Response.Write("<item></item>")
Else
	    For SQL = 0 to Num
		If GetData(2,SQL) = 1 Then GetData(1,SQL) = KillHTMLLabel(GetData(1,SQL))
		PostTime=Left(GetData(5,SQL),4)&" "& mid(GetData(5,SQL),5,2) &" "&mid(GetData(5,SQL),7,2)&" "& mid(GetData(5,SQL),9,2)&":"&mid(GetData(5,SQL),11,2)
		IF GetData(6,SQL)="" THEN GetData(6,SQL)=GetData(4,SQL)
		
		Response.Write("<item>")
		Response.Write("<link>"&HomeUrl&"a/?"&GetData(3,SQL)&"-"&GetData(0,SQL)&".html</link>")
		Response.Write("<title><![CDATA["&Replace(htmlencode(GetData(1,SQL)),"\","\\")&"]]></title>")
		Response.Write("<author>"&GetData(6,SQL)&"</author>")
		Response.Write("<category>"&GetData(7,SQL)&"</category>")
		Response.Write("<pubDate>"&PostTime&"</pubDate>")
		Response.Write("<guid>"&HomeUrl&"a/?"&GetData(3,SQL)&"-"&GetData(0,SQL)&".html</guid>")
		Response.Write("<description><![CDATA[ 请点击标题浏览此信息]]></description>")
		Response.Write("</item>")
		Next
End IF

Function IsInteger(Para) '检测是否有效的数字
	IsInteger=False
	If Not (IsNull(Para) Or Trim(Para)="" Or Not IsNumeric(Para)) Then
		IsInteger=True
	End If
End Function
%>
</channel>
</rss>
