?? forum.jsp
字號:
<!--forum.jsp-->
<%@page language="java" contentType="text/html; charset=GB2312" import="lightningboard.util.*,lightningboard.bean.*,java.util.Iterator"%>
<jsp:useBean id="forumBean" scope="request" class="lightningboard.bean.ForumBean"/>
<%@include file="inc/header.jsp" %>
<!--bar-->
<table width="95%" align="center" border="0" cellspacing="1" cellpadding="5">
<tr>
<td>
<b><IMG SRC="img/lb_icon.gif" WIDTH="16" HEIGHT="16" BORDER=0 valign="middle"> <A HREF="home.do"><%=FORUM_NAME%></A> > <%=forumBean.getF_name()%></b>
</td>
</tr>
</table>
<!--post bar -->
<table width="95%" align="center" border="0" cellspacing="1" cellpadding="5">
<tr>
<td>
Moderator: <A HREF="user.do?u_id=<%=forumBean.getF_u_id()%>"><%=forumBean.getU_name()%></A>
</td>
<td align="right">
<A HREF="post.do?f_id=<%=forumBean.getF_id()%>"><IMG SRC="img/post.gif" WIDTH="110" HEIGHT="26" BORDER=0 ALT="post"></A>
</td>
</tr>
</table>
<!--topics-->
<table width="95%" align="center" border="0" cellspacing="1" cellpadding="5" bgcolor="<%=TABLE_BGCOLOR%>">
<tr bgcolor="<%=TH_BGCOLOR%>">
<td nowrap><font color="<%=TH_TEXT_COLOR%>">::</font></td>
<td nowrap><font color="<%=TH_TEXT_COLOR%>">Topic</font></td>
<td nowrap><font color="<%=TH_TEXT_COLOR%>">Poster</font></td>
<td nowrap><font color="<%=TH_TEXT_COLOR%>">Replies</font></td>
<td nowrap><font color="<%=TH_TEXT_COLOR%>">Views</font></td>
<td nowrap><font color="<%=TH_TEXT_COLOR%>">Last Post</font></td>
</tr>
<!--loop begin-->
<%
Iterator topics=forumBean.getTopics().iterator();
while(topics.hasNext()){
Topic topic=(Topic)topics.next();
%>
<tr>
<td bgcolor="<%=TD_BGCOLOR%>">
<% if (topic.getT_order()>0&&topic.getT_locked()>0){%>
<IMG SRC="img/lockedSticky.gif" WIDTH="16" HEIGHT="16" BORDER=0 >
<% }else if (topic.getT_order()>0){%>
<IMG SRC="img/sticky.gif" WIDTH="16" HEIGHT="16" BORDER=0 >
<% }else if (topic.getT_locked()>0){%>
<IMG SRC="img/locked.gif" WIDTH="16" HEIGHT="16" BORDER=0 >
<%}else{%>
<%if (topic.getT_replies()>20){%>
<IMG SRC="img/hotTopic.gif" WIDTH="16" HEIGHT="16" BORDER=0 >
<%}else{%>
<IMG SRC="img/topic.gif" WIDTH="16" HEIGHT="16" BORDER=0 >
<%}%>
<%}%>
</td>
<td bgcolor="<%=TD_BGCOLOR2%>" width="70%">
<%if(topic.getT_iconid()>0){%><img src="img/icons/<%=topic.getT_iconid()%>.gif" width=15 height=15 border="0"><%}%>
<A HREF="topic.do?t_id=<%=topic.getT_id()%>"><%=StringUtil.escapeHTMLTags(topic.getT_name())%></A>
<% if (topic.getT_replies()>forumBean.getRange()){
%>
<IMG SRC="img/multipage.gif" WIDTH="10" HEIGHT="12" BORDER="0">
<%
int messageSum=topic.getT_replies()/forumBean.getRange() + 1;
for (int i=0;i<messageSum;i++){
%>
<A HREF="topic.do?t_id=<%=topic.getT_id()%>&start=<%=(i*forumBean.getRange()+1)%>"><%=i+1%></A>
<% }
%>
<%
}
%>
</td>
<td bgcolor="<%=TD_BGCOLOR%>" width="30%">
<A HREF="user.do?u_id=<%=topic.getT_u_id()%>"><%=StringUtil.escapeHTMLTags(topic.getU_name())%></A>
</td>
<td bgcolor="<%=TD_BGCOLOR2%>"><%=topic.getT_replies()%></td>
<td bgcolor="<%=TD_BGCOLOR%>"><%=topic.getT_views()%></td>
<td nowrap bgcolor="<%=TD_BGCOLOR2%>" align="right">
<%=DateTimeUtil.shortFmt(topic.getT_lasttime())%><BR>
by <A HREF="user.do?u_id=<%=topic.getT_u_id2()%>"><%=StringUtil.escapeHTMLTags(topic.getU_name2())%>
</td>
</tr>
<%
}
%>
<!--loop end-->
<%
String keyword=StringUtil.notNull(forumBean.getKeyword());
%>
<TR>
<TD colspan="6" bgcolor="<%=TD_BGCOLOR%>">
<!--split page-->
<%
int start=forumBean.getStart();
int range=forumBean.getRange();
int count=forumBean.getCount();
%>
<TABLE width="100%" border="0" cellpadding="0" cellspacing="0">
<TR>
<TD width="20%">
<%if(start>range){%><A HREF="forum.do?f_id=<%=forumBean.getF_id()%>&start=<%=start-range%>&keyword=<%=keyword%>">PREV</A><%}else{%>PREV<%}%>
</TD>
<TD align="center">
Topcis: <%=count%> RPP: <%=range%> Start: <%=start%>
</TD>
<TD width="20%" ALIGN="right">
<%if(start+range<=count){%><A HREF="forum.do?f_id=<%=forumBean.getF_id()%>&start=<%=start+range%>&keyword=<%=keyword%>">NEXT</A><%}else{%>NEXT<%}%>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</table>
<BR>
<table width="95%" align="center" border="0" cellspacing="1" cellpadding="5">
<form method="get" action="forum.do">
<tr>
<td>
Search:
<INPUT TYPE="text" NAME="keyword" SIZE="10" MAXLENGTH="10" VALUE="<%=keyword%>">
<INPUT TYPE="submit" VALUE="GO">
</td>
<td align="right" valign="top">
Forum jump:
<select name="f_id">
<%
java.util.Map forumMap=(java.util.Map)forumBean.getForumMap();
java.util.Set forunSet=forumMap.entrySet();
for (Iterator i = forunSet.iterator(); i.hasNext();) {
java.util.Map.Entry me = (java.util.Map.Entry)i.next();
String f_idJ=(String)me.getKey();
int f_idJump=StringUtil.parseInt(f_idJ);
String f_nameJump=(String)me.getValue();
%>
<option value="<%=f_idJump%>" <%if (f_idJump==forumBean.getF_id()){out.print("selected");}%>><%=f_nameJump%></option>
<%}%>
</select>
<input type="submit" value="GO">
</td>
</tr>
</form>
</table>
<table width="95%" align="center" border="0" cellspacing="1" cellpadding="5">
<tr>
<td>
<IMG SRC="img/topic.gif" WIDTH="16" HEIGHT="16" BORDER=0 > Topic <IMG SRC="img/hotTopic.gif" WIDTH="16" HEIGHT="16" BORDER=0 > Hot Topic (More than 20 replies)<BR>
<IMG SRC="img/sticky.gif" WIDTH="16" HEIGHT="16" BORDER=0 > Sticky Topic <IMG SRC="img/locked.gif" WIDTH="16" HEIGHT="16" BORDER=0 > Locked Topic<BR>
<IMG SRC="img/lockedSticky.gif" WIDTH="16" HEIGHT="16" BORDER=0 > Locked Sticky Topic
</td>
</tr>
</table>
<%@include file="inc/footer.jsp"%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -