热门新闻、推荐新闻、最新新闻调用


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

[本日志由 cmscn 于 2007-12-14 03:12 PM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 572
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭