?? showtopiccontents.jsp
字號:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ page import="com.elan.forum.model.ForumTopic"%>
<%@ page import="com.elan.forum.model.Forumtopicreply"%>
<%@ page import="com.elan.forum.model.ForumUser"%>
<%
//分頁處理
Integer myPage = (Integer) request.getAttribute("page");
Integer pageSize = (Integer) (request.getAttribute("pageSize"));
Long kkk = (Long) request.getAttribute("topicCount");
Long maxPageSize = (Long) request.getAttribute("pageCount");
//顯示 對應的 回復用戶的信息
List<ForumUser> replyUserList = (List<ForumUser>)request.getAttribute("replyUserList");
//處理一些引用
ForumUser topicAuthor = (ForumUser) request
.getAttribute("topicAuthor");
String quoteStr = "<div id='content_5' class='view_content'><TABLE style='BORDER-BOTTOM: #cccccc 1px dotted;BORDER-LEFT: #cccccc 1px dotted; TABLE-LAYOUT: fixed;BORDER-TOP: #cccccc 1px dotted;BORDER-RIGHT: #cccccc 1px dotted' border=0 cellSpacing=0 cellPadding=6 width='95%' align=center><TBODY><TR><TD style='WORD-WRAP: break-word' bgColor=#f3f3f3><FONT style='COLOR: #990000; FONT-WEIGHT: bold'>{$text$}</FONT></TD></TR></TBODY></TABLE></div>";
String quoteReply = (String) request.getAttribute("quoteReply");
if (quoteReply == null || quoteReply.trim().length() == 0) {
quoteStr = "";
} else {
quoteStr = quoteStr.replace("{$text$}", quoteReply);
}
ForumUser user = (ForumUser) session.getAttribute("user");
ForumTopic fa = (ForumTopic) request.getAttribute("topic");
List<Forumtopicreply> falist = (List<Forumtopicreply>) request
.getAttribute("replyList");
%>
<div class="bodywidth">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="23%" height="25">
<a
href="<%=request.getContextPath()%>/forum/topic.do?action=newForm&pieceId=<%=request.getAttribute("pieceId")%>"><img
src="<%=request.getContextPath()%>/forum/view/skin/default/newtopic.gif"
width="99" height="28" border="0" /> </a>
<a
href="<%=request.getContextPath()%>/forum/topic.do?action=replyForm&pieceId=<%=request.getAttribute("pieceId")%>&topicId=<%=fa.getId()%>"><img
src="<%=request.getContextPath()%>/forum/view/skin/default/reply.gif"
width="99" height="28" border="0" /> </a>
</td>
<td width="77%" align="right">
<div class='view_prevandnext'>
上一主題 | 下一主題
</div>
<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=showTopic&topicId="
+ request.getAttribute("topicId") + "&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=showTopic&topicId="
+ request.getAttribute("topicId") + "&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=showTopic&topicId=<%=request.getAttribute("topicId")%>&page='+this.value;}" />
</kbd>
<strong>總數: <%=kkk%> </strong>
</div>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1"
class="view_tb">
<tr>
<td colspan="2" class="view_mt">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="65%" class="view_topic_title">
主題:<%=fa.getTitle()%>
</td>
<td width="35%" class="view_viewnum">
共有0人關注過本帖
<a href="Print.asp?BoardID=3&Topic=2">打印</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="20%" rowspan="2" valign="top" class="view_left">
<div id="user_2" class="view_left_username">
<a name="2" id="2"></a><%=topicAuthor.getUsername()%>
</div>
<div class="view_left_face">
<img
src="<%=request.getContextPath()%>/forum/view/user/images/userface/<%=topicAuthor.getUserFace()%>"
border='0' />
</div>
<div class="view_left_levelimg">
<img
src="<%=request.getContextPath()%>/forum/view/level/<%=topicAuthor.getForumLevelPic()%>"
border='0' />
</div>
<div class="view_left_info">
<ul>
<li>
等級:
</li>
<li>
積分:<%=topicAuthor.getForumPoints()%>等待編寫
</li>
<li>
帖子:<%=topicAuthor.getTopicCount()%>
</li>
<li>
精華:還沒有寫數據庫
</li>
<li>
狀態:沒有寫數據庫
</li>
<li>
注冊時間:<%=topicAuthor.getRegLateTime()%>
</li>
</ul>
</div>
</td>
<td width="80%" valign="top" class="view_right">
<div class="view_right_info">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="43%">
<a href="/User/ShowUser.asp?UserID=1" target="_blank">資料</a> |
<a href="/Forum/Search.asp?ModuleType=7&Keyword=test">搜索</a>
|
<a href="mailto:fdaas@sina.com">郵箱</a> |
<a href="/User/User_Index.asp?t=writemsg&UserName=test"
target="_blank">短信</a>
</td>
<td width="57%" align="right">
0樓
</td>
</tr>
</table>
</div>
<div id="<%="leadReply" + fa.getId()%>">
<div class="view_title">
<img
src='<%=request.getContextPath()%>/forum/view/images/face/<%=fa.getIcon()%>'
border='0' /><%=fa.getTitle()%>
<em id="postdatetime_2" class="view_postdatetime">POST:2008-10-16
22:20:10</em>
</div>
<div id="content_2" class="view_content">
<p><%=fa.getText()%></p>
</div>
<div class="view_sign"></div>
</div>
</td>
</tr>
<tr>
<td valign="bottom">
<div class="view_right_bottom">
帖子選項:
<a
href="<%=request.getContextPath()%>/forum/topic.do?action=quote&topicId=<%=fa.getId()%>"e=<%=fa.getId()%>">引用</href> | <a href='/Forum/TopicSetting.asp?Action=Lock&BoardID=3&TopicID=2'>屏蔽</a> |
</div>
</td>
</tr>
</table>
<!-- show reply -->
<%
for (int i = 0; falist != null && i < falist.size(); i++) {
Forumtopicreply far = (Forumtopicreply) falist.get(i);
ForumUser fu = replyUserList.get(i);
%>
<table width="100%" border="0" cellpadding="0" cellspacing="1"
class="view_tb">
<tr>
<td width="20%" rowspan="2" valign="top" class="view_left">
<div id="user_5" class="view_left_username">
<a name="5" id="5"></a><%=fu.getUsername() %>
</div>
<div class="view_left_face">
<img
src="<%=request.getContextPath()%>/forum/view/user/images/userface/<%=topicAuthor.getUserFace()%>"
border='0' />
</div>
<div class="view_left_levelimg">
<img
src="<%=request.getContextPath()%>/forum/view/level/<%=topicAuthor.getForumLevelPic()%>"
border='0' />
</div>
<div class="view_left_info">
<ul>
<li>
等級:<%=fu.getForumLevel() %>
</li>
<li>
:<%=fu.getForumPoints() %>
</li>
<li>
帖子:<%=fu.getTopicCount() %>
</li>
<li>
精華:等待編寫
</li>
<li>
狀態:等待編寫
</li>
<li>
注冊時間:<%=fu.getRegLateTime() %>
</li>
</ul>
</div>
</td>
<td width="80%" valign="top" class="view_right">
<div class="view_right_info">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="43%">
<a href="/User/ShowUser.asp?UserID=1" target="_blank">資料</a> |
<a href="/Forum/Search.asp?ModuleType=7&Keyword=test">搜索</a>
|
<a href="mailto:fdaas@sina.com">郵箱</a> |
<a href="/User/User_Index.asp?t=writemsg&UserName=test"
target="_blank">短信</a>
</td>
<td width="57%" align="right">
1樓
</td>
</tr>
</table>
</div>
<div class="view_title">
<img
src="<%=request.getContextPath()%>/forum/view/images/face/<%=far.getIcon()%>"
border='0' />
回復:<%=fa.getTitle()%>
<em id="postdatetime_5" class="view_postdatetime">POST:<%=far.getReplyTime()%></em>
</div>
<div id="content_5" class="view_content"><%=far.getText()%><p></p>
</div>
<div class="view_sign"></div>
</td>
</tr>
<tr>
<td valign="bottom">
<div class="view_right_bottom">
帖子選項:
<a
href="<%=request.getContextPath()%>/forum/topic.do?action=quote&topicId=<%=fa.getId()%>"eId=<%=far.getId()%>">引用</a> | <a href='/Forum/TopicSetting.asp?Action=Lock&BoardID=3&TopicID=5'>屏蔽</a>
</div>
</td>
</tr>
</table>
<%
}
%>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="81%" align="right">
<div class='view_prevandnext'>
上一主題 | 下一主題
</div>
<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=showTopic&topicId="
+ request.getAttribute("topicId") + "&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=showTopic&topicId="
+ request.getAttribute("topicId") + "&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=showTopic&topicId=<%=request.getAttribute("topicId")%>&page='+this.value;}" />
</kbd>
<strong>總數: <%=kkk%> </strong>
</div>
</td>
</tr>
</table>
</div>
<div class="bodywidth">
<center>
<html:errors />
</center>
<form name="myform"
action="<%=request.getContextPath()%>/forum/topic.do?action=replyTopic"
method="post" onsubmit="return Check(this)" focus="CheckCode">
<input type="hidden" name="topicId" value="<%=fa.getId()%>" />
<a name="#reply"></a>
<table width="100%" border="0" cellpadding="0" cellspacing="1"
class="forum_border">
<tr>
<td height="30" colspan="2" class="forum_title">
快速回復
</td>
</tr>
<%
if (session.getAttribute("user") != null
|| session.getAttribute("admin") != null) {
String username = ((ForumUser) session.getAttribute("user"))
.getUsername();
%>
<tr>
<td class="forum_td_item">
<strong>普通用戶:</strong>
</td>
<input type="hidden" name="authorId" value="<%=user.getId()%>" />
<td class="forum_td_input">
<input type='text' name="author" readonly value="<%=username%>" />
</td>
</tr>
<%
} else {
String username = "admin";
%>
<tr>
<td class="forum_td_item">
<strong>管理員:</strong>
</td>
<td class="forum_td_input">
<input type='text' name="author" readonly value="<%=username%>" />
</td>
</tr>
<%
}
%>
<tr>
<td width="17%" class="forum_td_item">
<strong>回復主題:</strong>
</td>
<td width="83%" class="forum_td_input">
<strong><%=fa.getTitle()%></strong>
</td>
</tr>
<tr>
<td class="forum_td_item">
<strong>心情圖標:</strong>
</td>
<td class="forum_td_input">
<%@ include file="/forum/view/inc/Face.jsp"%></td>
</tr>
<tr>
<td class="forum_td_item">
<strong>主題內容:</strong>
</td>
<td class="forum_td_input">
<textarea name='text' style='display: none;' id='text'><%=quoteStr%></textarea>
<iframe ID='Editor'
src="/ElanNet/ditor/ewebeditor.htm?id=text&style=coolblue"
frameborder='1' scrolling='no' width='700' height='400'></iframe>
</td>
</tr>
<tr>
<td class="forum_td_item">
<strong>驗證碼:</strong>
</td>
<td class="forum_td_input">
<input type='text' name='checkCode' id='checkCode' size='10' />
<img style='border: 1px solid #ffffff; cursor: hand;' src="<%=request.getContextPath()%>/forum/view/inc/CheckCode.jsp"
onClick="this.src='<%=request.getContextPath()%>/forum/view/inc/CheckCode.jsp'" />
</td>
</tr>
<tr>
<td class="forum_td_item">
</td>
<td class="forum_td_input">
<input type="submit" name="Submit" value="發表主題" />
<input type="button" name="Submit2" value=" 取 消 "
onclick="history.back()" />
<input type='hidden' id='Action' name='Action' value='SaveNew' />
<input type='hidden' id='BoardID' name='BoardID' value='3' />
<input type='hidden' id='TopicType' name='TopicType' value='0' />
<input type='hidden' id='Uploadfiles' name='Uploadfiles' value='' />
</td>
</tr>
</table>
</form>
</div>
<div class="bodywidth">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td align="right">
管理選項:
<a href='/Forum/TopicSetting.asp?Action=Up&BoardID=3&TopicID=2'>提升</a> |
<a href='/Forum/TopicSetting.asp?Action=Down&BoardID=3&TopicID=2'>沉底</a> |
<a href='/Forum/TopicSetting.asp?Action=Delete&BoardID=3&TopicID=2'>刪除</a> |
<a href='/Forum/TopicSetting.asp?Action=Lock&BoardID=3&TopicID=2'>屏蔽</a> |
<a href='/Forum/TopicSetting.asp?Action=Move&BoardID=3&TopicID=2'>移動</a> |
<a href='/Forum/TopicSetting.asp?Action=Elite&BoardID=3&TopicID=2'>加為精華</a> |
<a href='/Forum/TopicSetting.asp?Action=Top&BoardID=3&TopicID=2'>設置版塊固頂</a> |
<a href='/Forum/TopicSetting.asp?Action=AllTop&BoardID=3&TopicID=2'>設置全站固頂</a>
</td>
</tr>
</table>
</div>
<script language="javscript">
var oo = document.getElementById("checkCode");
oo.focus();
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -