欢迎来到福编程网,本站提供各种互联网专业知识!

本站用的rss输出

发布时间:2006-11-16 作者: 来源:转载
用了getrows提高效率复制代码代码如下:
用了getrows提高效率
复制代码 代码如下:
<%
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
%>


<![CDATA[<%=thetitle%>-全福编程网-www.jb51.net]]>
http://www.jb51.net

zh-cn


jb512006
<%
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
<![CDATA[<%=FeedRows(1,i)%>]]>
<%=FeedRows(5,i)%>
<%
IFFeedRows(3,i)<>""andnotisnull(FeedRows(3,i))then
Response.Write("")
endif
%>
<%=FeedRows(4,i)%>


<%
next
endif
%>


相关推荐