📄 showpiececontents.jsp
字号:
<%@ page language="java" import="java.util.List" pageEncoding="gbk"%>
<%@ page import="com.elan.forum.model.ForumTopic"%>
<%@ page import="com.elan.forum.model.Forumpiece"%>
<%
Integer myPage = (Integer) request.getAttribute("page");
Integer pageSize = (Integer) (request.getAttribute("pageSize"));
Long kkk = (Long) request.getAttribute("topicCount");
Long maxPageSize = (Long) request.getAttribute("pageCount");
Boolean[] isNewReplyArray = (Boolean[]) request
.getAttribute("isNewReplyArray");
Forumpiece piece = null;
List<ForumTopic> listEssenceTopic = (List<ForumTopic>) request.getAttribute("listEssenceTopic");
List<String> listEssenceTopicReply = (List<String>) request.getAttribute("listEssenceTopicReply");
List<ForumTopic> listTopTopic = (List<ForumTopic>) request.getAttribute("listTopTopic");
List<String> lastTopTopicReply = (List<String>) request.getAttribute("lastTopTopicReply");
List<String> lastReply = (List<String>) request
.getAttribute("lastReply");
List<ForumTopic> list = (List<ForumTopic>) request
.getAttribute("piece");
if (list.size() > 0) {
piece = ((ForumTopic) list.get(0)).getPiece();
}
%>
<link href="/ElanNet/forum/view/skin/DefaultStyle1.css" type='text/css'
rel='stylesheet'>
<div class="bodywidth">
<table width="100%" border="0" cellpadding="0" cellspacing="2"
class="info">
<tr>
<td width="53%" align="center">
板块公告
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td height="25">
<%
if(piece != null) {
%>
<a href="<%=request.getContextPath()%>/forum/topic.do?action=newForm&pieceId=<%=piece.getId()%>"><img
src="/ElanNet/forum/view/skin/default/newtopic.gif" width="99"
height="28" border="0" /> </a>
<a href="<%=request.getContextPath()%>/forum/view/ForumError.jsp"></a>
<%
}
%>
</td>
<td height="30" colspan="2" align="right">
<div class='forum_page'>
<%
for (int i = 0; i < 10 && i < maxPageSize; i++) {
if ((1 + i) == myPage.intValue()) {
out.print("<a href='" + request.getContextPath()
+ "/forum/topic.do?action=showPiece&pieceId="
+ request.getAttribute("pieceId") + "&page="
+ (i + 1) + "'><font color='red'>" + (i + 1)
+ "</font></a>");
} else {
//out.print("<span> " + i + " </span>");
out.print("<a href='" + request.getContextPath()
+ "/forum/topic.do?action=showPiece&pieceId="
+ request.getAttribute("pieceId") + "&page="
+ (i + 1) + "'>" + (i + 1) + "</a>");
}
}
%>
<kbd>
<input type='text' size='5'
onkeydown="if(13==event.keyCode){location.href='http://localhost:8080/<%=request.getContextPath()%>/forum/topic.do?action=showPiece&pieceId=1&page='+this.value;}" />
</kbd>
<strong>总数: <%=kkk%> </strong>
</div>
</td>
</tr>
</table>
<table width='100%' border='0' cellspacing='0' cellpadding='0'
class='topic_list_tb'>
<tr class='topic_list_mt'>
<td class='topic_list_mt_status'></td>
<td class='topic_list_mt_title'>
标题
</td>
<td class='topic_list_mt_author'>
作者
</td>
<td class='topic_list_mt_reply'>
回复/查看
</td>
<td class='topic_list_mt_lastpost'>
最后发表
</td>
</tr>
<tr class='topic_list_commontitle'>
<td colspan='5'>
版块帖子列表
</td>
</tr>
<!-- 显示精华帖子 -->
<%
for(int i = 0; listEssenceTopic != null && listEssenceTopicReply != null && i < listEssenceTopic.size(); i++) {
if(i == 0) {
%>
<tr >
<td colspan="5" align="left" bgcolor="#a1a9bd" background="/ElanNet/forum/view/user/images/top_26.gif"><font color="red">精华帖</font></td>
</tr>
<%
}
ForumTopic ft = listEssenceTopic.get(i);
String lastTopTopicReplyStr = listEssenceTopicReply.get(i);
%>
<tr class='topic_list_tr'
onmouseover="this.className='topic_list_over'"
onmouseout="this.className='topic_list_tr'">
<td class='topic_list_icon'>
<img src="/ElanNet/forum/view/skin/default/folder_elite.gif"
alt="论坛帖子" border="0">
</td>
<td class='topic_list_title'>
<a
href='/ElanNet/forum/topic.do?action=showTopic&topicId=<%=ft.getId()%>'><%=ft.getTitle()%></a>
<td class='topic_list_author'>
<cite><a href='/User/ShowUser.asp?UserID=1'><%=ft.getAuthor()%></a>
</cite><em><%=ft.getCreateTime()%></em>
</td>
<td class='topic_list_reply_hits'>
<strong class='topic_list_reply'><%=ft.getReply()%></strong>/
<strong class='topic_list_hits'><%=ft.getClick() %></strong>
</td>
<td class='topic_list_lastpost'>
<em>最后回复时间:<%=lastTopTopicReplyStr%></em><cite> </cite>
</td>
</tr>
<%
}
%>
<!-- 固顶的帖子 -->
<%
for(int i = 0; listTopTopic != null && lastTopTopicReply != null && i < listTopTopic.size(); i++) {
if(i == 0) {
%>
<tr>
<td colspan="5" align="left" bgcolor="#a1a9bd" background="/ElanNet/forum/view/user/images/top_26.gif"><font color="red">固顶帖</font></td>
</tr>
<%
}
ForumTopic ft = listTopTopic.get(i);
String lastTopTopicReplyStr = lastTopTopicReply.get(i);
%>
<tr class='topic_list_tr'
onmouseover="this.className='topic_list_over'"
onmouseout="this.className='topic_list_tr'">
<td class='topic_list_icon'>
<img src="/ElanNet/forum/view/skin/default/folder_top.gif"
alt="论坛帖子" border="0">
</td>
<td class='topic_list_title'>
<a
href='/ElanNet/forum/topic.do?action=showTopic&topicId=<%=ft.getId()%>'><%=ft.getTitle()%></a>
<td class='topic_list_author'>
<cite><a href='/User/ShowUser.asp?UserID=1'><%=ft.getAuthor()%></a>
</cite><em><%=ft.getCreateTime()%></em>
</td>
<td class='topic_list_reply_hits'>
<strong class='topic_list_reply'><%=ft.getReply()%></strong>/
<strong class='topic_list_hits'><%=ft.getClick() %></strong>
</td>
<td class='topic_list_lastpost'>
<em>最后回复时间:<%=lastTopTopicReplyStr%></em><cite> </cite>
</td>
</tr>
<%
}
%>
<tr>
<td colspan="5" align="left" bgcolor="#a1a9bd" background="/ElanNet/forum/view/user/images/top_26.gif">普通帖</td>
</tr>
<%
for (int i = 0; i < list.size(); i++) {
ForumTopic fa = (ForumTopic) list.get(i);
%>
<tr class='topic_list_tr'
onmouseover="this.className='topic_list_over'"
onmouseout="this.className='topic_list_tr'">
<td class='topic_list_icon'>
<%
if (isNewReplyArray != null
&& true == isNewReplyArray[i].booleanValue()) {
//System.out.println(isNewReplyArray[i]);
%>
<img src="/ElanNet/forum/view/skin/default/folder_new.gif"
alt="论坛帖子" border="0">
<%
} else {
//System.out.println(isNewReplyArray[i]);
%>
<img src="/ElanNet/forum/view/skin/default/folder_common.gif"
alt="论坛帖子" border="0">
<%
}
%>
</td>
<td class='topic_list_title'>
<a
href='/ElanNet/forum/topic.do?action=showTopic&topicId=<%=fa.getId()%>'><%=fa.getTitle()%></a>
<td class='topic_list_author'>
<cite><a href='/User/ShowUser.asp?UserID=1'><%=fa.getAuthor()%></a>
</cite><em><%=fa.getCreateTime()%></em>
</td>
<td class='topic_list_reply_hits'>
<strong class='topic_list_reply'><%=fa.getReply()%></strong>/
<strong class='topic_list_hits'><%=fa.getClick() %></strong>
</td>
<td class='topic_list_lastpost'>
<em>最后回复时间:<%=lastReply.get(i)%></em><cite> </cite>
</td>
</tr>
<%
}
%>
</table>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="44%" height="30">
<form name="search" action="<%=request.getContextPath()%>/forum/topic.do?action=search" method="post">
<input type="hidden" name="fastSearch" value="true">
<input type="hidden" name="pieceId" value="<%=piece != null ? piece.getId() : ""%>">
论坛快速搜索:
<input name="keyword" type="text" id="keyword" />
<input type="submit" value="搜索" />
</form>
</td>
<td height="30" colspan="2" align="right">
<div class='forum_page'>
<%
for (int i = 0; i < 10 && i < maxPageSize; i++) {
if ((1 + i) == myPage.intValue()) {
out.print("<strong><a href='" + request.getContextPath()
+ "/forum/topic.do?action=showPiece&pieceId="
+ request.getAttribute("pieceId")
+ "&page="
+ (i + 1)
+ "'>" + (i + 1)
+ "</a></strong>");
} else {
//out.print("<span> " + i + " </span>");
out.print("<a href='" + request.getContextPath()
+ "/forum/topic.do?action=showPiece&pieceId="
+ request.getAttribute("pieceId")
+ "&page="
+ (i + 1)
+ "'>"
+ (i + 1)
+ "</a>");
}
}
%>
<kbd>
<input type='text' size='5'
onkeydown="if(13==event.keyCode){location.href='http://localhost:8080/<%=request.getContextPath()%>/forum/topic.do?action=showPiece&pieceId=1&page='+this.value;}" />
</kbd>
<strong>总数: <%=kkk%> </strong>
</div>
</td>
</tr>
</table>
</div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -