<table class=a2 cellspacing=2 cellpadding=0 width=100% align=center border=0>
<tr class=a1 height=25 align=center>
<td width=33%><font color="#FFFFFF">本周发帖状元</font></td><td width=33%>
<font color="#FFFFFF">本周发帖榜眼</font></td><td width=33%>
<font color="#FFFFFF">本周发帖探花</font></td>
</tr>
<tr class=a3 align=center>
<%
Count=Conn.Execute("Select Count(ID) From [BBSXP_Posts] Where PostTime>"&SqlNowString&"-7")(0)
ReDim Usr(Count),Num(Count),TopUsr(2),TopNum(2)
Sql="Select * From [BBSXP_Posts] Where PostTime>"&SqlNowString&"-7"
Rs.Open Sql,Conn,1
ii=0:UsrAll=""
Do While Not Rs.EOF
ii=ii+1
Usr(ii)=Rs("UserName")
UsrAll=UsrAll+Usr(ii)
Rs.MoveNext
Loop
Rs.Close



For ii=1 to Count
Leng=Len(UsrAll)
UsrAll=Replace(UsrAll,Usr(ii),"")
Num(ii)=(Leng-Len(UsrAll))/Len(Usr(ii))
Next

For ii=1 to Count
If TopNum(0)<Num(ii) then
TopNum(0)=Num(ii):TopUsr(0)=Usr(ii)
end if
Next

For ii=1 to Count
If TopNum(1)<Num(ii) and Usr(ii)<>TopUsr(0) then
TopNum(1)=Num(ii):TopUsr(1)=Usr(ii)
end if
Next

For ii=1 to Count
If TopNum(2)<Num(ii) and Usr(ii)<>TopUsr(0) and Usr(ii)<>TopUsr(1) then
TopNum(2)=Num(ii):TopUsr(2)=Usr(ii)
end if
Next

For ii=0 to 2
Set Rs1=Conn.Execute("[BBSXP_Users] where UserName='"&TopUsr(ii)&"'")
On Error Resume Next 
Photo=Rs1("UserPhoto")
if Photo<>empty then
Check=Lcase(Right(Photo,3))
if Check<>"jpg" and Check<>"gif" then Photo=Rs1("Userface")
else
Photo=Rs1("Userface")
end if
ShowRank()
%>
<td>
<table width=100% cellpadding=2><tr>
<td width=45% align=center>
<a href="Profile.asp?UserName=<%=TopUsr(ii)%>"><img src='<%=Rs1("Userface")%>' width="80" height="80" border="0" onload='javascript:if(this.width>80)this.width=80;if(this.height>80)this.height=80;'></a><br>
<br>本周共发<%=TopNum(ii)%>帖</td>
<td width=55% valign=top align="left">
<font style=FONT-SIZE:8pt><b><%=TopUsr(ii)%></b></font><br>
角色：</b><%if instr("|"&Moderated&"|","|"&Rs1("UserName")&"|") > 0 then%>版主
<%
else
response.write ShowRole(RS1("UserRoleID"))
end if
%><br>
经验：<%=Rs1("Experience")%><br>
主帖：<%=Rs1("PostTopic")%><br>
回帖：<%=Rs1("PostRevert")%><br>
精华：<%=Rs1("GoodTopic")%><br>
</td></tr></table></td>
<%
Set Rs1=Nothing
Next
%>
</tr></table>

<table cellspacing="1" cellpadding="0" width="100%" align="center" border="0" class="a2">
<tr class=a3><td>
<!--#include file="inc/dd.inc"-->
<% response.write ""&mingxingtop(20)&"" %>
<!--#include file="inc/dd.asp"--></td></tr></table>