热门新闻、推荐新闻、最新新闻调用
作者:cmscn 日期:2007-11-12
sub main_news_hot(nt,cs_num)
dim id,topic,temp1
sql="select top "&cs_num&" id,topic from news where hidden=1"
select case nt
case "hot"
sql=sql&" order by counter desc,id desc"
case "good"
sql=sql&" and istop=1 order by id desc"
case else
sql=sql&" order by id desc"
end select
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
temp1=temp1&vbcrlf&"<li><a href='../news/news_view.asp?id="&id&"' target=_blank>"&joekoe_cms.code_html(topic,1,20)&"</a>"
rs.movenext
loop
rs.close
response.write temp1
end sub
sub main_shuh_hot(nt,cs_num)
dim id,topic,temp1
sql="select top "&cs_num&" id,topic from shuh where hidden=1"
select case nt
case "hot"
sql=sql&" order by counter desc,id desc"
case "good"
sql=sql&" and istop=1 order by id desc"
case else
sql=sql&" order by id desc"
end select
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
temp1=temp1&vbcrlf&"<tr><td><a href='../shuh/shuh_view.asp?id="&id&"' target=_blank>"&joekoe_cms.code_html(topic,1,20)&"</a></td></tr>"
rs.movenext
loop
rs.close
tmp1="<table border=0 cellspacing=0 cellpadding=2 width='100%'>"&tmp1&vbcrlf&"</table>"
response.write vbcrlf&"<table cellspacing=1 cellpadding=4 >" & _
vbcrlf&"<tr><td>"&tmp1&"</td></tr>" & _
vbcrlf&"</table>"
end sub
评论: 0 | 引用: 0 | 查看次数: 572
发表评论