?? 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 + -