<%
sub gallery_new(g_tit,gtype,n_num,w_num)
  dim rs,sql,pic_temp,pic,name,ut
  response.write "<table cellspacing=1 cellpadding=1 class=table0>" & _
		 "<tr><td class=td>&nbsp;"&img_small(sk_jt)&"&nbsp;<font class="&sk_class&">"&g_tit&"</font></td></tr>" & _
		 "<tr><td class=bg_1 align=center><table border=0 width='100%'><tr><td height=5></td></tr><tr align=center>"
  sql="select top "&n_num&" id,c_id,s_id,types,spic,pic,name,counter,power,emoney from gallery where hidden=1 and types='"&gtype&"' order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    if gtype="paste" then
      pic=rs("pic")
    else
      pic=rs("spic")
    end if
    name=rs("name")
    ut="gallery.asp?types=view&action="&gtype&"&c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&id="&rs("id")
    pic_temp="<table border=0>" & _
	     "<tr><td align=center><a href='javascript:;' onclick=""javascript:open_view('"&ut&"',1);""><script language=javascript>pic_url('"&pic&"',1)</script></a></td></tr>" & _
	     "<tr><td align=center><a href='javascript:;' onclick=""javascript:open_view('"&ut&"',1);"" class=blue><b>"&objv7.code_html(name,1,w_num)&"</b></a></td></tr>"
    if gtype<>"paste" then
      pic_temp=pic_temp&"<tr><td align=center>"&m_unit&"：<font class=red_3>"&rs("emoney")&"</font>&nbsp;&nbsp;人气：<font class=red>"&rs("counter")&"</font></td></tr>" & _
      "<tr><td align=center>"&power_pic(0,rs("power"),0)&"</td></tr>"
    end if
    pic_temp=pic_temp&"</table>"
    response.write "<td><script language=javascript>pic_fk(1,1)</script>"&pic_temp&"<script language=javascript>pic_fk(2,1)</script></td>"
    rs.movenext
  loop
  rs.close:set rs=nothing
  response.write "</tr><tr><td height=5></td></tr></table></td></tr></table>"
end sub

sub website_new(wtype,t_num,w_num,w_jt)
  dim rs,wtit,wname,wjt
  if w_jt<>"" then wjt=img_small(w_jt)
  sql="select top "&t_num&" id,c_id,s_id,name from website where hidden=1 "
  select case wtype
  case "hot"
    wtit="热门站点"
    sql=sql&"order by counter desc,id desc"
  case "top"
    wtit="推荐站点"
    sql=sql&"and isgood=1 order by id desc"
  case else
    wtit="最新站点"
    sql=sql&"order by id desc"
  end select
  response.write "<table cellspacing=1 cellpadding=1 class=table0>" & _
		 "<tr><td class=td>&nbsp;"&img_small(sk_jt)&"&nbsp;<font class="&sk_class&">"&wtit&"</font></td></tr>" & _
		 "<tr><td class=bg_1 align=center><table border=0 width='100%'>"
  set rs=conn.execute(sql)
  do while not rs.eof
    wname=rs("name")
    response.write "<tr><td height="&space_mod&">"&wjt&"<a href='javascript:;' onclick=""javascript:open_view('website.asp?c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&action=view&id="&rs("id")&"',1);"" title='"&wname&"'>"&objv7.code_html(wname,1,w_num)&"</a></td></tr>"
    rs.movenext
  loop
  rs.close:set rs=nothing
  response.write "</table></td></tr></table>"
end sub
%>