<!-- #include file="include/con_vouch.asp" -->
<%

index_url="vouch"
tit=tit_fir
tit_fir=""

call web_head(0,0,0,0,0)
call vouch_load(0,0,0)
'----------------------------左边 开始----------------------------
call vouch_left()
call vouch_website("最新推荐站点","new",10,12)
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------

call vouch_gallery("精彩贴图","paste","new",4,10,1)
call vouch_gallery("精彩Flash","flash","new",4,10,2)
call vouch_gallery("精彩视频","film","new",4,10,0)

'----------------------------中间 结束----------------------------
call web_end(0,0)

sub vouch_website(vname,vgen,c_num,w_num)
  dim nname,osql
  select case vgen
  case "hot"
    osql=" order by counter desc,id desc"
  case "good"
    osql=" and isgood=1 order by id desc"
  case else
    osql=" order by id desc"
  end select
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0>&nbsp;<%response.write img_skin(web_img_m)&vname%></td></tr>
<tr class=bg_td><td>
  <table border=0 cellspacing=0 cellpadding=2 width='100%'>
<%
  sql="select top "&c_num&" id,name,counter from website where hidden=1"&osql
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    nname=rs("name")
    response.write vbcrlf&"  <tr><td>"&img_skin(web_img_h)&"<a href='website_view.asp?id="&rs("id")&"' alt='"&joekoe_cms.code_html(nname,1,0)&"<br>浏览 "&rs("counter")&" 人次'>"&joekoe_cms.code_html(nname,1,w_num)&"</a></td></tr>"
    rs.movenext
  loop
  rs.close
%>
  </table>
</td></tr>
</table>
<%
  response.write ukong
end sub

sub vouch_gallery(vname,vtypes,vgen,c_num,w_num,vvt)
  dim ntypes,osql,nid,nname,nemoney,pnum
  ntypes=vtypes
  select case vgen
  case "hot"
    osql=" order by counter desc,id desc"
  case "good"
    osql=" and istop=1 order by id desc"
  case else
    osql=" order by id desc"
  end select
  pnum=100\c_num
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0>&nbsp;<%response.write img_skin(web_img_m)&vname%></td></tr>
<tr class=bg_td><td>
  <table border=0 cellspacing=0 cellpadding=0 width='100%'>
  <tr align=center>
<%
  sql="select top "&c_num&" id,name,spic,emoney,power,counter from gallery where types='"&ntypes&"' and hidden=1"&osql
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    nid=rs("id")
    nname=rs("name")
    nemoney=rs("emoney")
%>
  <td width='<%response.write pnum%>%'>
    <table border=0 cellspacing=0 cellpadding=2>
    <tr><td align=center><%response.write pic_fk(rs("spic"),1,"gallery_view.asp?types="&ntypes&"&id="&nid)%></td></tr>
    <tr><td align=center><b><a href='gallery_view.asp?types=<%response.write ntypes%>&id=<%response.write nid%>' alt='<%response.write joekoe_cms.code_html(nname,1,0)%>'><%response.write joekoe_cms.code_html(nname,1,w_num)%></a></b></td></tr>
<%if vvt>0 then%>
    <tr><td align=center><%response.write joekoe_cms.web_unit%>：<font class=red2><%response.write nemoney%></font>  人气：<font class=red><%response.write rs("counter")%></font></td></tr>
<%if vvt>1 then%>
    <tr><td align=center><%response.write format_emoney_power(nemoney,rs("power"),0)%></td></tr>
<%
    end if
  end if
%>
    </table>
  </td>
<%
    rs.movenext
  loop
  rs.close
%>
  </tr>
  </table>
</td></tr>
</table>
<%
  response.write ukong
end sub
%>