<!--#include file="connection.asp"-->

<!--#include file="inc/const.asp" -->
<!--#include file="z_Visual_const.asp"-->

<%
dvbbs.nav()
        dvbbs.head_var 2,0,"",""

dim prs,vpid,srs,totalrec,PageCount,curcount,CurPage,lst,cougif,mypid,curcount2,a,curcount3
curPage=request("page") '页数
if curpage="" or not isInteger(curpage) then
	curpage=1
	
else
	curpage=clng(curpage)
	
end if
'数码修改-增加脚部皮肤
		%><%
		'数码修改-增加脚部皮肤结束

response.write "<table cellpadding=3 cellspacing=1 align=center class=tableborder1 width=""100%"">" 
response.write "<tr height=25 valign=middle>"

response.write "<th valign=middle width=""100%"">"
response.write "[<a href=z_top_photo.asp>社区形象秀TOP20排名</a>]&nbsp;&nbsp;&nbsp;[<a href=z_top_photo.asp?act=3&lst=1>最新加入</a>]"

response.write "</th></tr>"
response.write "<td class=tablebody1 width=""100%"">"

set srs=server.createobject("ADODB.Recordset")
		sql="select top 20 id,book,date,cou,photoname from [Visual_photo3] where pok=1 and vopen=0 and lb=1 order by cou desc"
		'sql="select id,book,date,cou,photoname from [Visual_photo3] where pok=1 and id="&vpid
		srs.open sql,conn,1,1
                        if srs.eof and srs.bof then
		               response.write "<br>暂时还没有任何用户数据</td>"
                        else

totalrec=srs.recordcount
                                        if totalrec mod 12=0 then
						pagecount=totalrec \ 12
						
					else
						pagecount=totalrec \ 12+1
						
					end if
					curcount=0
					dim iic
					iic=0
					if curpage > pagecount then curpage = pagecount
						if curpage < 1 then curpage=1
						srs.PageSize=12
						srs.AbsolutePage=CurPage
					do while not srs.eof and curcount<12
					mypid=srs("id")
					
					curcount3=curPage*12
					curcount2=curcount3+curcount+1-12
				   
                    


					cougif=srs("cou")*4
					response.write "<table width=100% border=1 cellspacing=0 cellpadding=0 >"
					response.write "<tr valign=middle>"
					response.write "<td align=""left"" width=""10%"" rowspan=""2"">"
					call photosee(mypid,"")
					response.write "</td>"
					response.write "<td align=""left"" width=""90%"" height=""1"">"
                    response.write "<font color=#008000>得票数</font><br>"
					response.write "<img src=pic/bar1.gif  width="&srs("cou")&" height=8> <b>"&srs("cou")&"票</b>"
					response.write "</td></tr><tr>"
                    response.write "<td align=""left"" width=""90%"">"
                    response.write "暂时排名：第<font color=blue>"&curcount2&"</font>"
                    response.write "</td></tr></table>"

					curcount=curcount+1
                                        iic=iic+1
                                        if iic mod 1=0 then
                                        iic=0
end if
srs.movenext
loop
end if
srs.close
set srs=nothing

                                        %>


					<tr><td width=100%>
			<table width=100% border=0 cellspacing=0 cellpadding=0>
					<tr height=25 valign=middle>
						<td valign=middle class=tablebody1>&nbsp;&nbsp;页次：<b><%=curPage%></b> / <b><%=pagecount%></b> 页 每页：<b>12</b> 共计：<b><%=totalrec%></b> 人参加评比&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=z_top_photo.asp?act=0&app=3&lst=2><b></font color=red>我要参赛</font></b></a></td>
						<td valign=middle class=tablebody1><div align=right>分页：<%
							call DispPageNum(curpage,pagecount,"?act=3&lst="&lst&"&page=","#VisualTop")
						%>&nbsp;&nbsp;</td>
					</tr>
			</table>
			</td></tr>
	
			<!--#include file="top_photo2_top.asp" -->