📄 usertopiccontents.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ page import="com.elan.forum.model.ForumTopic"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%
String type = (String)request.getAttribute("type");
String currentUrl = request.getContextPath() + "/forum/user.do?action=userTopic&type=" + type;
Integer count = (Integer) request.getAttribute("count");
Integer myPage = (Integer) request.getAttribute("page");
Integer pageSize = (Integer) request.getAttribute("pageSize");
Integer pageCount = (Integer) request.getAttribute("pageCount");
Boolean hasNextPage = (Boolean) request.getAttribute("hasNextPage");
Boolean hasPreviousPage = (Boolean) request
.getAttribute("hasPreviousPage");
List<ForumTopic> listFt = (List<ForumTopic>)request.getAttribute("listFt");
%>
<center>
<html:errors />
</center>
<form name="myform" action="User_Message.asp" method="post"
onSubmit="SubmitOnce(this)">
<table width="100%" border="0" cellpadding="0" cellspacing="1"
class="Border">
<tr>
<td width="5%" align="center" class="top_Item">
<strong>编号</strong>
</td>
<td width="30%" align="left" class="top_Item">
<strong>主题</strong>
</td>
<td width="10%" align="center" class="top_Item">
<strong>回复|点击</strong>
</td>
<td width="25%" align="center" class="top_Item">
<strong>发表时间</strong>
</td>
<td width="20%" align="center" class="top_Item">
<strong>类型</strong>
</td>
<td width="20%" align="center" class="top_Item">
<strong>作者</strong>
</td>
</tr>
<%
if(null != listFt && 0 < listFt.size()){
for(int i = 0; i < listFt.size(); i++) {
ForumTopic ft = listFt.get(i);
String topicType = "普通帖子";
if(1 == ft.getHot()) {
topicType = "<font color='red'>热门帖子</font>";
}
if(1 == ft.getEssence()) {
topicType = "<font color='red'>精华帖子</font>";
}
%>
<tr class="td_22" onMouseOver="this.className='MouseOver_22'"
onMouseOut="this.className='td_22'">
<td align="center"><%=ft.getId() %></td>
<td align="left"><a href="<%=request.getContextPath()%>/forum/topic.do?action=showTopic&topicId=<%=ft.getId()%>" target="top"><%=ft.getTitle()%></a></td>
<td align="center"><%=ft.getReply()%>|<%=ft.getClick()%></td>
<td align="center"><%=ft.getCreateTime()%></td>
<td align="center">
<strong ><%=topicType %></strong>
</td>
<td align="center">
<strong ><%=ft.getAuthor() %></strong>
</td>
</tr>
<%
}
} else {
%>
<tr class="td_22" onMouseOver="this.className='MouseOver_22'"
onMouseOut="this.className='td_22'">
<td colspan="5" align="center">哈哈!你没有任何的帖子的呀!</td>
</tr>
<%
}
%>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td width="12%">
<span id="myselect">[<a href="javascript:CheckedAll()">分页</a>]</span>
</td>
<td width="88%" align="right" nowrap>
<table border="0" cellspacing="1" cellpadding="0">
<tr>
<td>
一共
<b style='color: red'><%=count%></b>主题
<a href="<%=currentUrl %>&page=1">首页</a>
<a href="<%=currentUrl + "&page=" + (myPage - 1) %>" <%=true == hasPreviousPage ? "" : "disabled" %>>上一页</a>
<a href="<%=currentUrl + "&page=" + (myPage + 1) %>" <%=true == hasNextPage ? "" : "disabled" %>>下一页</a>
<a href="<%=currentUrl %>&page=<%=pageCount %>">尾页</a>
<b style='color: red'><%=myPage%></b>/
<b><%=pageCount%></b>页
<b><%=pageSize%></b>条短信/页
</td>
<td>
<input type='text' id = 'pageText'
onKeyDown="if(event.keyCode==13){window.location.href='<%=currentUrl%>&page='+this.value;}"
size='3' />
<input type="button" name="go" onClick="window.location.href=('<%=currentUrl%>&page='+getElementById('pageText').value);" value="跳转">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -