<!--#include file="conn.asp" -->
<%Response.contentType = "text/xml"%>
<?xml version="1.0" encoding="gb2312"?>
<?xml-stylesheet type="text/xsl" href="rss.xsl" version="1.0"?>
<rss version="2.0">
<%
call FTBBS_HTML_MB
url=Application("FTBBSMB")(10,0)
if right(url,1)<>"/" then
   url=url&"/"
end if
%>
<channel>
<link><%=Application("FTBBSMB")(10,0)%></link>
<description><%=Application("FTBBSMB")(11,0)%></description>
<%
layer_1=request("layer_1")
layer_2=request("layer_2")
str=""
IF layer_1<>"" then
   str=" where BBS_Cate.BBS_Cate_ID = bbstitle.BoardID_2 and bbstitle.BoardID_1='"&layer_1&"' and bbstitle.deleted=0 and BBS_Cate.BBS_Cate_Qs=0 order by bbstitle.id desc"
else
   str=" where BBS_Cate.BBS_Cate_ID = bbstitle.BoardID_2 and bbstitle.deleted=0 and BBS_Cate.BBS_Cate_Qs=0 order by bbstitle.id desc"
end if
SQL = "Select top 10 * from BBS_Cate,bbstitle"&str

set rs=conn.execute(SQL)
if rs.Eof or rs.Bof then
  response.write "<item></item>"
end if
while not rs.Eof 
    response.Write "<item>" & vbcrlf
	Response.write "<title><![CDATA["&rs("title")&"]]></title>" & vbcrlf
	response.write "<link>"&url&"ftbbs.asp?id="&rs("id")&"</link>" & vbcrlf
	response.write "<author>"&rs("name")&"</author>" & vbcrlf
	response.write "<pubDate>"&rs("dateh")&"</pubDate>" & vbcrlf
 	response.write "<description><![CDATA["&rs("menu")&"]]></description>" & vbcrlf
	response.write "</item>"
	rs.MoveNext          
wend                  
set rs=nothing
conn.Close
set conn = nothing
%>
</channel>
</rss>