<!-- #include file="include/config.asp" -->
<%
tit="精彩推荐"

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

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

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

sub vouch_website(vname,vgen,c_num,w_num)
  dim tmp1,body,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
  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")
    tmp1=tmp1&vbcrlf&"<tr><td>"&img_skin(web_img_h)&"<a href='website_view.asp?id="&rs("id")&"' target='_blank' 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
  call vouch_left_table(vname,tmp1,1,"") 
end sub

sub vouch_gallery(vname,vtypes,vgen,c_num,w_num,vvt)
  dim tmp1,body,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
      tmp1=tmp1&vbcrlf&"<tr><td>" & _
           vbcrlf&"  <table border=0 cellspacing=0 cellpadding=0 width='100%'>" & _
           vbcrlf&"  <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")
    tmp1=tmp1&vbcrlf&"<td width='"&pnum&"%'>" & _
         vbcrlf&"  <table border=0 cellspacing=0 cellpadding=2>" & _
         vbcrlf&"  <tr><td align=center>"&pic_fk(rs("spic"),1,"gallery_view.asp?types="&types&"&id="&nid)&"</td></tr>" & _
         vbcrlf&"  <tr><td align=center><b><a href='gallery_view.asp?types="&types&"&id="&nid&"' alt='"&joekoe_cms.code_html(nname,1,0)&"'>"&joekoe_cms.code_html(nname,1,w_num)&"</a></b></td></tr>"
 if vvt>0 then
    tmp1=tmp1&vbcrlf&"  <tr><td align=center>"&joekoe_cms.web_unit&"：<font class=red2>"&nemoney&"</font>  人气：<font class=red>"&rs("counter")&"</font></td></tr>"
 'if vvt>1 then
    'tmp1=tmp1&vbcrlf&"  <tr><td align=center>"&format_emoney_power(nemoney,rs("power"),0)&"</td></tr>"
    'end if
  end if
    tmp1=tmp1&vbcrlf&"  </table>" & _
         vbcrlf&"</td>"
    rs.movenext
  loop
  rs.close
      tmp1=tmp1&vbcrlf&"  </tr>" & _
           vbcrlf&"  </table>" & _
           vbcrlf&"</td></tr>" 
call vouch_center_table(vname,tmp1,1,"") 
end sub
%>