<%
sub news_fpic(d_num,t_num,w_num,nft)
  dim temp1,topic,pic,tt,rs,sql,wnum,ispic,ooid,s_t
  wnum=w_num:s_t=""
  'sql="select top 1 id,topic,pic from news where hidden=1 and istop=1 and ispic=1 order by id desc"
  sql="select top 1 id,topic,pic from news where hidden=1 and ispic=1 order by id desc"
  set rs=conn.execute(sql)
  if not(rs.eof) then
    ooid=rs("id")
    tt="<a href='javascript:;' onclick=""javascript:open_view('news_view.asp?id="&ooid&"',1);"">"
    pic="<table border=0><tr><td align=center>"&tt&"<script language=javascript>pic_url('"&rs("pic")&"',1)</script></a></td></tr><tr><td align=center>"&tt&objv7.code_html(rs("topic"),1,d_num)&"</a></td></tr></table>"
  end if
  rs.close
  'sql="select top "&t_num&" id,topic,tim,ispic from news where hidden=1 and istop=1"
  sql="select top "&t_num&" id,topic,tim,ispic from news where hidden=1"
  if ooid<>0 then sql=sql&" and id<>"&ooid
  sql=sql&" order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    if rs("ispic")=true then wnum=wnum-2:ispic=sk_img
    if nft=1 then s_t=" <font class=tims>"&objv7.time_type(rs("tim"),1)&"</font>"
    temp1=temp1&"<tr><td height="&space_mod&">"&img_skins()&"<a href='javascript:;' onclick=""javascript:open_view('news_view.asp?id="&rs("id")&"',1);"">"&objv7.code_html(topic,1,wnum)&"</a>"&s_t&ispic&"</td></tr>"
    rs.movenext
  loop
  rs.close:set rs=nothing
  temp1="<table border=0 width='100%'><tr>" & _
        "<td width='30%' align=center>"&pic&"</td>" & _
        "<td width='70%'><table border=0>"&temp1&"</table></td>" & _
        "</tr></table>"
  response.write kong&main_bar(1,"头条新闻",temp1,0,"100%","")
end sub

sub main_news(n_num,c_num,et,timt)
  dim temp1,topic,n_jt
  n_jt=img_skins()
  temp1="<table border=0 width='100%' cellspacing=0 cellpadding=2>"
  sql="select top "&n_num&" id,topic,tim,counter from news where hidden=1 order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    topic=rs("topic")
    temp1=temp1&vbcrlf&"<tr><td height="&space_mod&">"&n_jt&"<a href='javascript:;' onclick=""javascript:open_view('news_view.asp?id="&rs("id")&"',1);"" title='"&objv7.code_html(topic,1,0)&"'>"&objv7.code_html(topic,1,c_num)&"</a>"
    if et>-1 then temp1=temp1&format_end(et,"<font class=gray>"&objv7.time_type(rs("tim"),timt)&"</font>,<font class=hit>"&rs("counter")&"</font>")
    temp1=temp1&"</td></tr>"
    rs.movenext
  loop
  rs.close
  temp1=temp1&"</table>"
  response.write kong&main_bar(1,format_menu("news"),temp1,1,"100%","<a href='news.asp'>"&morepic&"</a>")&"</td>"
end sub

sub news_pics(fsql,t_num,w_num,tt)
  dim temp1
  temp1="<script language=javascript src='style/news_fpic.js'></script>"
  response.write kong&main_bar(1,"今日图片新闻",temp1,0,"100%","")
end sub
%>