个人文集的首页随机调用
作者:cmscn 日期:2005-09-09
代码:
如下,放到相应的位置或做成inc文件多处调用:
<%
function inc_author()
dim id,topic,word
sql="select TOP 9 username, Count(username) AS b FROM article where hidden=True GROUP BY username ORDER BY rnd(Count(username)) DESC"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
topic=rs(0)
id=rs(1)
word=server.urlencode(topic)
inc_author= inc_author& vbcrlf&"<tr><td height='"&dim_num(6)&"' style='border-bottom:1px dotted #DDDDDD'><img src='skin/"&joekoe_cms.web_skin&"/small/h_news1.gif' border=0 align=absMiddle> <a href='article_list.asp?action=search&sea_type=username&sea_term=all&keyword="&word&"' alt='"&joekoe_cms.code_html(topic,1,0)&"'>"&joekoe_cms.code_html(topic,1,8)&"</a></td><td align=right style='border-bottom:1px dotted #DDDDDD' class=gray>"&id&" </td></tr>"
rs.movenext
loop
rs.close
end function
response.write "<table width='100%'>"&inc_author&"</table>"
%>
评论: 7 | 引用: 0 | 查看次数: 718
发表评论