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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ page import="net.acai.util.*,
  3.  net.acai.forum.*,
  4.  net.acai.forum.util.*,
  5.  java.util.Vector"%>
  6. <%@ include file="INC/const.jsp"%>
  7. <%
  8. int perPage=ParamUtil.getInt(request,"perPage",25);
  9. int Page=ParamUtil.getInt(request,"Page",1);
  10. int startPage=((Page-1)/10)*10+1;
  11. int start=(Page-1)*perPage+1;
  12. try{
  13. Forum theForum=ForumFactory.getForum(request,response,session,forumID);
  14. stats=theForum.getForumType();
  15. %>
  16. <%@ include file="INC/theme.jsp"%>
  17. <script language=javascript src="INC/list.js"></script>
  18. <% out.println(headLine(forumID,forumName,forumLogo,theForum.getForumType(),1,stats));
  19. %>
  20. <TABLE cellSpacing=0 cellPadding=0 width=95% border=0 align=center>
  21. <TBODY><tr>
  22. <td align=center width=34 valign=middle> <img src='pic/gb.gif' border=0 alt=本分论坛的公告!不可不看!! width=20 height=17> 
  23. </td>
  24. <td valign=middle align=left>
  25. <%
  26. try{
  27. ForumNews forumNews=ForumNewsManager.getForumNews(forumID);
  28. out.println("<b><a href=announcements.jsp?forumID="+forumID+" target=_blank><ACRONYM TITLE="+forumNews.getTitle()+">"+forumNews.getTitle()+"</ACRONYM></a></b> ("+forumNews.getAddTime()+")" );
  29. }
  30. catch(ForumNewsNotFoundException e){
  31. out.println("<b><a href=announcements.jsp?forumID="+forumID+" target=_blank><ACRONYM TITLE=当前没有公告>当前没有公告</ACRONYM></a></b>("+NDate+")");
  32. }
  33. %>
  34. </td>
  35. <td align=right valign=middle><p>
  36. <form action=list.jsp method=get>
  37. <input type=hidden name=forumID value=<%=forumID%>>
  38. <select name=selTimeLimit onchange='javascript:submit()'>
  39. <option value=all>查看所有的主题
  40. <option value=1>查看一天内的主题
  41. <option value=2>查看两天内的主题
  42. <option value=7>查看一星期内的主题
  43. <option value=15>查看半个月内的主题
  44. <option value=30>查看一个月内的主题
  45. <option value=60>查看两个月内的主题
  46. <option value=180>查看半年内的主题
  47. </select>
  48. </form></p></td></tr></TBODY></TABLE>
  49. <table cellspacing=0 border=0 width=95% bgcolor="<%=tableBackColor%>" align=center>
  50. <tr><td height=1></td></tr></table>
  51. <TABLE border=1 cellpadding=0 cellspacing=0 width=95% align=center bordercolor=<%=tableBackColor%>>
  52.   <TBODY><TR>
  53.    <TD height=27 width="95%" bgColor=<%=tableTitleColor%>><font color=<%=tableFontColor%>>目前论坛总在线<b><%=ForumFactory.getOLUsersNum()%></b>人,其中<%=theForum.getForumType()%>上共有 <b><%=theForum.getForumOLMemberUsersNum()%></b> 位会员与 <b><%=theForum.getForumOLGuestUsersNum()%></b> 位客人.今日贴子 <font color="<%=alertFontColor%>"><b><%=theForum.getTodayNum()%></b></font>
  54. <%
  55. if(!"online".equals(ParamUtil.getString(request,"action")))
  56. out.println( "[<a href=list.jsp?action=online&forumID="+forumID+"><font color="+tableFontColor+">关闭详细列表</font></a>]");
  57. else
  58. out.println( "[<a href=list.jsp?forumID="+forumID+"><font color="+tableFontColor+">显示详细列表</font></a>]");
  59. out.println( "&nbsp;[<a href=online.jsp?forumID="+forumID+"><font color="+tableFontColor+">在线用户</font></a>]</TD><TD bgColor="+tableTitleColor+" width="5%" align=center><a href='list.jsp?forumID="+ forumID+"&Page=1&skin="+ParamUtil.getString(request,"skin","")+"'>"+
  60. "<img src='pic/refresh_1.gif' border=0 alt='刷新'></a></TD></TR>");
  61. if (!"online".equals(ParamUtil.getString(request,"action"))){
  62. out.println( "<tr><td colspan=2 bgcolor="+tableBodyColor+"><table cellpadding=6 cellspacing=1 border=0 width="100%" style="word-break:break-all;">");
  63. Vector OLUsers=ForumFactory.getOLUsers("member");
  64. for(i=0;i<OLUsers.size();i++){
  65. OLUser theUser=(OLUser)OLUsers.get(i);
  66. if(theUser.getStats().indexOf(theForum.getForumType())<0)
  67. continue;
  68. if(i%7==0) 
  69. out.println("<tr><td width="14%">");
  70. else
  71. out.println("<td width="14%">");
  72. if (theUser.getUserClass().equals("总版主"))
  73. out.println( "<img src="+picURL+picOM+" alt=总坛主 width=12 height=11>&nbsp;");
  74. else if (theUser.getUserClass().equals("版主"))
  75. out.println( "<img src="+picURL+picOB+" alt=版主 width=12 height=11>&nbsp;");
  76. else if (theUser.getUserClass().equals("贵宾"))
  77. out.println( "<img src="+picURL+picOV+" alt=贵宾 width=12 height=11>&nbsp;");
  78. else
  79. out.println( "<img src="+picURL+picOH+" width=12 height=11>&nbsp;");
  80. out.println( "<a href=dispuser.jsp?name="+response.encodeURL(theUser.getUserName())+" target=_blank>");
  81. out.println( "<ACRONYM TITLE="目前位置:"+response.encodeURL(theUser.getStats())+"<br>来访时间:"+theUser.getStartTime()+"<br>活动时间:"+theUser.getLastTimeBK()+"<br>"+theUser.getUserSystem()+"<br>"+theUser.getUserBrowser());
  82. out.println( "<br>真实IP:");
  83.     if(("0").equals(ipFlag)){
  84. if (forumMaster || master) {
  85. if (theUser.getUserIP()!=null)
  86. out.println(theUser.getUserIP());
  87. }
  88.         else
  89. out.println( "已设置保密");
  90. }
  91. else
  92. if (theUser.getUserIP()!=null)
  93. out.println(theUser.getUserIP());
  94.     out.println( "<br>来源鉴定:");
  95. if (fromFlag.equals("0")){
  96. if (forumMaster || master){ 
  97. if (theUser.getComeFrom()!=null)
  98. out.println(theUser.getComeFrom());
  99. }
  100.         else
  101. out.println( "已设置保密");
  102. }
  103. else
  104. if (theUser.getComeFrom()!=null)
  105. out.println(theUser.getComeFrom());
  106. out.println( "">");
  107. out.println(response.encodeURL(theUser.getUserName()));
  108. out.println( "</ACRONYM></a>&nbsp;");
  109. out.println( "</td>");
  110. if(i%7==0)  out.println( "</tr>");
  111. }
  112. out.println( "</TABLE></tr>");
  113. }
  114. out.println( "</TBODY></TABLE>");
  115. out.println( "<br><table cellpadding=0 cellspacing=0 border=0 width=95% align=center><tr>"+
  116. "<td align=center width=2 valign=middle> </td>"+
  117. "<td align=left valign=middle> <a href='announce.jsp?forumID="+ forumID +"'>"+
  118. "<img src='pic/post.gif' border=0 alt='发新帖'></a>"+
  119. "&nbsp;&nbsp;<a href='vote.jsp?forumID="+forumID+"'>"+
  120. "<img src='pic/newpoll.gif' border=0 alt='发起新投票'></a></td>"+
  121. "<td align=right> ");
  122. if ((forumMaster&&theForum.getForumMaster().indexOf(userName)>-1)||master)
  123. out.println( "  <b><a href='admin_boardaset.jsp?forumID="+ forumID +"'>版务管理</a>");
  124. out.println( "<b><a href='list.jsp?forumID="+forumID +"'>论坛帖子列表</a>  "+
  125. "论坛版主</b>:");
  126. String masterName=theForum.getForumMaster();
  127. if(masterName==null||"".equals(masterName))
  128. out.println("暂缺");
  129. else{
  130. String [] masterNames=theForum.getForumMaster().split("\|");
  131.  masterName="";
  132. for(int k=0;k<masterNames.length;k++)
  133. {
  134. masterName=masterName+"<a href="javascript:openScript('dispuser.jsp?name="+masterNames[k]+"',350,300)">"+masterNames[k]+"</a><br>" ;
  135. if(k>2){
  136. masterName=masterName + "<font color=#000066>More...</font>";
  137. break;
  138. }
  139. }
  140. out.println(masterName);
  141. }
  142. out.println("</td></tr></table>");
  143. try{
  144. Vector forumTopics=theForum.getForumBestTopics(forumID,start,perPage);
  145. %>
  146. <table cellspacing=0 border=0 width=95% bgcolor="<%=tableBackColor%>" align=center><tr><td height=1></td></tr></table>
  147. <TABLE style=color:"&tableFontColor&"  border=1 cellPadding=0 cellSpacing=0 width=95% align=center bordercolor="<%=tableBackColor%>">
  148.    <TBODY>
  149. <TR align=middle>
  150. <TD height=27 width=32 bgColor="<%=tableTitleColor%>"><font color="<%=tableFontColor%>">状态</TD> 
  151. <TD bgColor="<%=tableTitleColor%>" width=*><font color="<%=tableFontColor%>">主 题  (点<img src=pic/plus.gif>即可展开贴子列表)</TD>
  152. <TD bgColor="<%=tableTitleColor%>" width=80><font color="<%=tableFontColor%>">作 者</TD>
  153. <TD bgColor="<%=tableTitleColor%>" width=64><font color="<%=tableFontColor%>">回复/人气</TD>
  154. <TD bgColor="<%=tableTitleColor%>" width=195><font color="<%=tableFontColor%>">最后更新 | 回复人</TD>
  155. </TR> 
  156. </TBODY></TABLE>
  157. <%
  158. for( i=0;i<forumTopics.size();i++){
  159. ForumTopic forumTopic=(ForumTopic)forumTopics.get(i);
  160. %>
  161. <TABLE style=color:"<%=tableContentColor%>" border=1 cellPadding=0 cellSpacing=0 width=95% align=center bordercolor="<%=tableBackColor%>">
  162. <TBODY><TR align=middle>
  163. <TD bgColor="<%=aTableBodyColor%>" width=32 height=27>
  164. <%
  165. if(!forumTopic.getLockTopic()&&!forumTopic.getIsTop()&&!forumTopic.getIsVote()&&!forumTopic.getIsBest()&&!(forumTopic.getChildNum()>10))
  166. out.println( "<img src="pic//folder.gif" alt=开放主题>");
  167. else if(forumTopic.getIsVote())
  168. out.println("<img src="pic//closedb.gif" alt=投票贴子>");
  169. else if(forumTopic.getIsTop())
  170. out.println("<img src="pic//istop.gif" alt=固顶主题>");
  171. else if(forumTopic.getIsBest())
  172. out.println("<img src="pic//isbest.gif" alt=精华帖子>");
  173. else if(forumTopic.getChildNum()>10)
  174. out.println("<img src="pic//hotfolder.gif" alt=热门主题>");
  175. else if(forumTopic.getLockTopic())
  176. out.println("<img src="pic//lockfolder.gif" alt=本主题已锁定>");
  177. else
  178. out.println("<img src="pic//folder.gif" alt=开放主题>");
  179. %>
  180. </TD>
  181. <TD align=left bgcolor="<%=tableBodyColor%>" width=* onmouseover=javascript:this.bgColor='<%=aTableBodyColor%>' onmouseout=javascript:this.bgColor='<%=tableBodyColor%>'>
  182. <%
  183. if (forumTopic.getChildNum()==0)
  184. out.println("<img src='"+picURL +"nofollow.gif' id='followImg"+forumTopic.getRootID()+"'>");
  185. else
  186. out.println("<img loaded=no src='"+picURL +"plus.gif' id='followImg"+forumTopic.getRootID()+"'   style='cursor:hand;'  onclick='loadThreadFollow("+forumTopic.getRootID()+","+forumTopic.getAnnounceID()+","+forumID+")' title=展开贴子列表>");
  187. out.println("<a href="dispbbs.jsp?forumID="+forumID+"&rootID="+forumTopic.getRootID()+"&announceID="+forumTopic.getAnnounceID()+"" title="《"+ forumTopic.getNoFilterTopic()+"》<br>作者:"+forumTopic.getUserName()+"<br>发表于"+forumTopic.getDateAndTime()+"<br>最后跟贴:"+response.encodeURL(forumTopic.getFollowMSG())+"...">");
  188. out.println(forumTopic.getNoFilterTopic());
  189. out.println("</a>");
  190. %> </TD>
  191. <TD bgColor="<%=aTableBodyColor%>" width=80><a href=javascript:openUser('<%=forumTopic.getUserName()%>')><%=forumTopic.getUserName()%></a></TD>
  192. <TD bgColor="<%=tableBodyColor%>" width=64>
  193. <font color="<%=tableContentColor%>"><%=forumTopic.getChildNum()%>/<%=forumTopic.getHits()%></font>
  194. </TD>
  195. <TD align=left bgColor="<%=aTableBodyColor%>" width=195>
  196. &nbsp;<a href=dispbbs.jsp?forumID=<%=forumID%>&rootID=<%=forumTopic.getRootID()%>&id=<%=forumTopic.getTimes()%>>
  197. <%=forumTopic.getFollowDateAndTime()%>
  198. </a>&nbsp;<font color=#990000>|</font>&nbsp;
  199. <a href=javascript:openUser('<%=forumTopic.getFollowUser()%>')><%=forumTopic.getFollowUser()%></a>
  200. </TD></TR>
  201. <tr style=display:none id='follow<%=forumTopic.getAnnounceID()%>'><td colspan=5 id='followTd<%=forumTopic.getAnnounceID()%>' style=padding:0px><div style='width:240px;margin-left:18px;border:1px solid black;background-color:lightyellow;color:black;padding:2px' onclick=loadThreadFollow(<%=forumTopic.getAnnounceID()%>)>正在读取关于本主题的跟贴,请稍侯……</div></td></tr>
  202. </TBODY></TABLE>
  203. <%
  204. }
  205. }
  206. catch(ForumTopicNotFoundException e)
  207. {
  208. e.printStackTrace();
  209. out.println("没有帖子!");
  210. }
  211. int forumTopicNum=theForum.getForumTopicNum();
  212. int totalPage=forumTopicNum/perPage+1;
  213. %>
  214. <table border=0 cellpadding=0 cellspacing=3 width=95% align=center >
  215. <form method=post action=list.jsp name=frmList2 >
  216. <input type=hidden name=selTimeLimit value="">
  217. <tr>
  218. <td valign=middle><span class=smallFont >页次:<strong><%=Page%></strong>/<strong><%=totalPage%></strong>页 每页<strong><%=perPage%></strong> 主题数<strong><%=forumTopicNum%></strong></td><td valign=middle><div align=right ><p>分页:
  219. <%
  220. if (startPage>10) 
  221. out.println("<a href='list.jsp?forumID="+forumID+"&Page="+(startPage-1)+"' >[<<]</a>");
  222. for(i=startPage;i<startPage+10;i++){
  223. if (i==Page)
  224.     out.println("<font color=gray>["+i+"]</font> ");
  225.    else
  226.        out.println("<a href='list.jsp?forumID="+forumID+"&Page="+i+"' >["+i+"]</a>   ");
  227.    
  228. if(i==totalPage) break;
  229. }
  230. if(i<totalPage)
  231. out.println("<a href='list.jsp?forumID="+forumID+"&Page="+i+"'>[>>]</a>   ");
  232. out.println("<span class=smallFont >转到:<input type=text name=Page size=3 maxlength=10  value='"+ Page+"'><input type='submit' value=Go   id=button1 name=button1 ></span></p>"+     
  233. "</div></td></tr>"+
  234. "<input type=hidden name=forumID value='"+ forumID +"'>"+
  235. "</form></table>");
  236. %>
  237. <table border=0 cellpadding=0 cellspacing=3 width=95% align=center>
  238. <tr>
  239. <td valign=middle nowrap> <div align=right>
  240. <select  onchange="if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}">
  241. <option value=''>论坛跳转至...</option>
  242. <%
  243. try{
  244. Vector gateWayVector=GateWayFactory.getGateWays();
  245. for( i=0;i<gateWayVector.size();i++)
  246. {
  247.      GateWay gateWay=(GateWay)gateWayVector.get(i);
  248.      int gateWayID=gateWay.getGateWayID();
  249.      String gateWayName=gateWay.getGateWayName();
  250. out.println("<option style=BACKGROUND-COLOR:#99ccff>╋ "+gateWayName+"</option>");
  251. try{
  252. Vector forumVector=ForumFactory.getForums(gateWayID);
  253. for(int j=0;j<forumVector.size();j++){
  254. Forum theListForum=(Forum)forumVector.get(j);
  255. out.println("<option value="list.jsp?forumID="+theListForum.getForumID()+""> ├"+theListForum.getForumType()+"</option>");
  256. }
  257. }
  258. catch(Exception e){
  259. e.printStackTrace();
  260. }
  261. }
  262. }
  263. catch(Exception e){
  264. e.printStackTrace();
  265. }
  266. %>
  267. </select><div></td></tr></form></table>
  268. <table cellspacing=0 cellpadding=0 width=95% align=center bgcolor="<%=tableBackColor%>" border=0>
  269. <tr><td><table cellspacing=1 cellpadding=3 width=100% border=0><tr bgcolor="<%=tableTitleColor%>">
  270. <td width=80% ><font color="<%=tableFontColor%>"><b> -=> <%=forumName%>图例</b></font></td>
  271. <td noWrap width=20% align=right><font color="<%=tableFontColor%>">所有时间均为 - 北京时间 &nbsp;</td>
  272. </tr><tr><td colspan=3 bgcolor="<%= tableBodyColor%>">
  273. <table cellspacing=4 cellpadding=0 width=92% border=0 align=center>
  274. <tr><td><img src=pic/folder.gif> 开放的主题</td>
  275. <td><img src=pic/hotfolder.gif> 回复超过10贴</td>
  276. <td><img src=pic/lockfolder.gif> 锁定的主题</td>
  277. <td><img src=pic/istop.gif> 固定顶端的主题 </td>
  278. <td> <img src=pic/isbest.gif> 精华帖子 </td>
  279. </tr><tr><td width=100% colspan=5>
  280. <%
  281. if (theForum.getStrAllowHTML())
  282. out.println( "HTML标签:<font color=#990000>OFF</font>.");
  283. else
  284. out.println( "HTML标签:<font color=#003399>ON</font>.");
  285. if (theForum.getStrAllowForumCode())
  286. out.println( " UBB标签:<font color=#990000>ON</font>.");
  287. else
  288. out.println( " UBB标签:<font color=#003399>OFF</font>.");
  289. if (theForum.getStrIcons())
  290. out.println( " 贴图标签:<font color=#990000>OFF</font>.");
  291. else
  292. out.println( " 贴图标签:<font color=#003399>ON</font>.");
  293. if (theForum.getStrFlash())
  294. out.println( " Flash标签:<font color=#990000>OFF</font>.");
  295. else
  296. out.println( " Flash标签:<font color=#003399>ON</font>.");
  297. if (theForum.getStrIMGInPosts())
  298. out.println( " 表情字符转换:<font color=#990000>OFF</font>.");
  299. else
  300. out.println( " 表情字符转换:<font color=#003399>ON</font>.");
  301. if ("1".equals(uploadFlag)) 
  302. out.println( " 头像上传:<font color=#990000>OFF</font>.");
  303. else
  304. out.println( " 头像上传:<font color=#003399>ON</font>.");
  305. if (!"1".equals(titleFlag))
  306. out.println( " 用户头衔:<font color=#990000>OFF</font>.");
  307. else
  308. out.println( " 用户头衔:<font color=#003399>ON</font>.");
  309. %>
  310. </td></tr></table></td></tr></table></td></tr></table><BR>
  311. <%  }
  312. catch(ForumNotFoundException e){
  313. e.printStackTrace();
  314. }
  315. %>
  316. <%@ include file="foot.jsp"%>
  317. <iframe width=0 height=0 src="" id="hiddenframe"></iframe>