复制代码 代码如下:
<%
Response.Charset="GB2312"
Response.ContentType="text/xml"
Response.Expires=60
Response.Write("")
response.write("")
dimRssId,sql,rs,tid,rs_type,sql_type,sqqq,rsshow,thetitle,themon,theday,thedate,theyear
RssId=CheckStr(Request.QueryString("RSSID"))
ifnotIsInteger(RssId)thenRssId=1
'得到子类别的所有id
setrsshow=conn.execute("selecttname,counts,tidfrominfotypewhereid="&RSSID&"")
ifnot(rsshow.eofandrsshow.bof)then
thetitle=split(rsshow("tname"),"|")(rsshow("counts")-1)
tid=rsshow("tid")
endif
rsshow.close
setrsshow=nothing
setrs_type=server.CreateObject("ADODB.RecordSet")
sql_type="selectidfrominfotypewheretidlike'"&tid&"%'"
rs_type.opensql_type,conn,1,1
dowhilenotrs_type.EOF
sqqq=sqqq&rs_type("id")&","
rs_type.MoveNext
loop
rs_type.close
setrs_type=nothing
ifsqqq=""thensqqq=tid
sql="selecttop20type_id,title,id,content,datetime,authorfromnewswheretype_idin("&sqqq&")andisshow=trueorderbydatetimedesc,iddesc"
setrs=conn.execute(sql)
ifrs.eoforrs.bofthen
redimfeedcat(0,0)
else
feedrows=rs.getrows()
endif
rs.close
setrs=nothing
conn.close
setconn=nothing
%>
http://www.jb51.net
<%
ifubound(FeedRows,1)=0then
Response.Write("
else
fori=0toubound(FeedRows,2)
thedate=feedrows(4,i)
theyear=year(thedate)
themon=month(thedate)
iflen(themon)<2thenthemon="0"&themon
theday=theyear&themon
%>
<%=siteurl%>/html/<%=theday%>/<%=FeedRows(2,i)%>.htm
<%
IFFeedRows(3,i)<>""andnotisnull(FeedRows(3,i))then
Response.Write("
endif
%>
<%
next
endif
%>