toplist.jsp
上传用户:toby834
上传日期:2013-10-21
资源大小:2613k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK" %>
  2. <%@ page import="net.acai.forum.*,
  3.  java.util.*"%>
  4. <%@ include file="INC/const.jsp" %>
  5. <%@ include file="INC/theme.jsp"%>
  6. <%
  7. try{
  8. Vector users=SkinUtil.getTopList(request);
  9. int usersNum=users.size();
  10. String orderName;
  11. int orders=ParamUtil.getInt(request,"orders");
  12. switch(orders){
  13. case 1:
  14. orders=1;
  15. orderName="发贴总数Top10";
  16. break;
  17. case 2:
  18. orders=2;
  19. orderName="最新用户注册";
  20. break;
  21. case 7:
  22. orders=7;
  23. orderName="所有用户列表";
  24. break;
  25. default:
  26. orders=1;
  27. orderName="发贴总数Top10";
  28. break;
  29. }
  30. int Page;
  31. Page=ParamUtil.getInt(request,"Page",1);
  32. stats=orderName;
  33. out.println(headLine(forumID,forumName,forumLogo,"",1,stats));
  34. %>
  35.     <table width=95% bgcolor=<%=tableBackColor%>  cellspacing=0 border=0 bordercolor=<%=tableBackColor%> align=center>
  36.      <tr>
  37.         <td>
  38.         
  39. <table cellpadding=6 cellspacing=1 border=0 width=100%>
  40. <form method="POST" action="toplist.jsp"> 
  41. <tr bgColor="<%=aTableBodyColor%>"> 
  42. <td colspan=5 valign=top width=350>&nbsp;>> <B><%=orderName%></B> <<<BR>
  43. <BR>
  44. <font face=宋体>&nbsp;总注册用户数: <%=userNum%> 人 &nbsp; 发贴总数: <%=bbsNum%> 篇</font></td>
  45. <td colspan=6 align=right> 
  46. <select name=orders onchange='javascript:submit()'>
  47. <option value=1 <%if (orders==1) {%>selected<%}%>>发贴总数Top10</option>
  48. <option value=2 <%if (orders==2) {%>selected<%}%>>最新注册用户</option>
  49. <option value=7 <%if (orders==7) {%>selected<%}%>>所有用户列表</option>
  50. </select>
  51. </td>
  52. </tr></form>
  53. <tr bgcolor=<%=tableTitleColor%> style=color:<%=tableFontColor%>> 
  54. <td align=center><b>用户名</b></td>
  55. <td align=center><b>Email</b></td>
  56. <td align=center><b>OICQ</b></td>
  57. <td align=center><b>主页</b></td>
  58. <td align=center><b>短消息</td>
  59. <td align=center><b>注册时间</b></td>
  60. <td align=center><b>等级状态</b></td>
  61. <td align=center><b>发贴总数</b></td>
  62. <td align=center><b>
  63. <% if (orders==4)
  64. out.println("存款");
  65. else if (orders==5)
  66. out.println("百万富翁本月得分");
  67. else if (orders==6)
  68. out.println("百万富翁通关次数");
  69. else
  70. out.println("财产");
  71. %>
  72. </b></td>
  73. </tr>
  74. <%
  75. for (i=(Page-1)*20;i<Page*20;i++){
  76. if (i>=usersNum) break;
  77. User theUser=(User)users.get(i);
  78. %>
  79. <tr bgcolor=<%=tableBodyColor%>> 
  80. <td>&nbsp;<a href="javascript:openScript('dispuser.jsp?name=<%=response.encodeURL(theUser.getUserName())%>',350,300)"><%=response.encodeURL(theUser.getUserName())%></a></td>
  81. <td align=center><a href=mailto:<%=theUser.getUserEmail()%>><img border=0 src=<%=picURL%>email.gif></a></td>
  82. <td align=center> 
  83. <%if ("".equals(theUser.getOicq())|| theUser.getOicq()==null) {%>
  84. 没有 
  85. <% }else{%>
  86. <a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=theUser.getOicq()%> target=_blank><img src="<%=picURL%>oicq.gif" alt="查看 OICQ:<%=theUser.getOicq()%> 的资料" border=0 width=16 height=16></a> 
  87. <%}%>
  88. </td>
  89. <td align=center> 
  90. <%if (theUser.getHomePage()==null|| "".equals(theUser.getHomePage().trim())) {%>
  91. 没有 
  92. <%}else{%>
  93. <a href=<%=theUser.getHomePage()%> target=_blank><img border=0 src=<%=picURL%>homePage.gif></a> 
  94. <%}%>
  95. </td>
  96. <td align=center><a href=javascript:openScript('usersms.jsp?action=new&touser=<%=response.encodeURL(theUser.getUserName())%>',600,400)><img src=<%=picURL%>message.gif border=0></a></td>
  97. <td align=center><%=theUser.getAddDate()%></td>
  98. <td align=center> <%=theUser.getUserClassStr()%><br>
  99. </td>
  100. <td align=center><%=theUser.getArticle()%></td>
  101. <td align=center><%=theUser.getUserWealth()%></td>
  102. </tr>
  103. <%
  104. }
  105. %>
  106. </table>
  107. </td></tr>
  108. </table>
  109. <table width=95% align="center" >
  110. <tr><td align=right>
  111. <%
  112. int totalPages=usersNum/20+1; 
  113. if (Page==0)  Page=1;
  114. out.println("共 "+totalPages+" 页 第 "+Page+" 页 ");
  115. if (Page==1|| totalPages==1 )
  116. out.println("<font color=gray>首页 前页</font>");
  117. else
  118. out.println("<a href=?Page=1&orders="+orders+">首页</a> <a href=?Page="+(Page-1)+"&orders="+orders+">前页</a>");
  119. if (Page==totalPages|| totalPages==1)
  120. out.println(" <font color=gray>后页 尾页</font>");
  121. else
  122. out.println(" <a href=?Page="+(Page+1)+"&orders="+orders+">后页</a> <a href=?Page="+totalPages+"&orders="+orders+">尾页</a>");
  123. %>
  124. </td></tr>
  125. <% }
  126. catch(Exception e){
  127. %>
  128. <tr bgcolor=<%=tableBodyColor%>> 
  129. <td colspan=9>  还没有任何用户数据。</td>
  130. </tr>
  131. <%}
  132. %></table>
  133. <%@ include file="foot.jsp"%>
  134. <jsp:include page="INC/js.jsp"/>