<%
sub photo_main_list(n_num,c_num)
  dim ncid,ncname,crs,csql,sqla,n_username,n_name,n_tim,li
  li=0
  response.write "<table cellspacing=0 cellpadding=0 class=table>"
  csql="select c_id,c_name from jk_class where nsort='"&n_sort&"' order by c_order"
  set crs=joekoe_cms.exec(csql,1)
  do while not crs.eof
    if (li mod 2)=0 then response.write "<tr valign=top>"
    ncid=crs("c_id")
    ncname=crs("c_name")
    sqla=" and c_id="&ncid
    response.write vbcrlf&"<td><table>"&photo_bar_top(ncname,1)
    sql="select top "&n_num&" id,name,tim,username,counter,emoney,power from photo where hidden=1 and c_id="&ncid&" order by id desc"
    set rs=conn.execute(sql)
    do while not rs.eof
      n_username=rs("username")
      n_name=rs("name")
      n_tim=rs("tim")
      n_tim=joekoe_cms.time_type(n_tim,1)
      response.write vbcrlf&photo_name_type(c_num,rs("id"),n_username,n_name,n_tim,rs("counter"),false,2,rs("emoney"),rs("power"))
      rs.movenext
    loop
    rs.close
    response.write vbcrlf&photo_bar_end("<a href='photo_list.asp?action=more&c_id="&ncid&"'>浏览更多…</a>",1)&"</td>"
    if (li mod 2)>0 then response.write "</tr>"
    crs.movenext
    li=li+1
  loop
  crs.close
  set crs=nothing
  response.write "</table>"
end sub

sub photo_new(c_num,w_num,vvt)
  dim nid,nname,nemoney,pnum
  pnum=100\c_num
%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td0>&nbsp;<%response.write img_skin(web_img_m)&"最新图片"%></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 photo where hidden=1 order by id desc"
  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,"photo_view.asp?id="&nid)%></td></tr>
    <tr><td align=center><b><a href='photo_view.asp?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
%>