?? myfavoritethread.jsp
字號:
<%--
- $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/user/myfavoritethread.jsp,v 1.42 2006/04/14 18:04:01 minhnn Exp $
- $Author: minhnn $
- $Revision: 1.42 $
- $Date: 2006/04/14 18:04:01 $
-
- ====================================================================
-
- Copyright (C) 2002-2006 by MyVietnam.net
-
- All copyright notices regarding mvnForum MUST remain
- intact in the scripts and in the outputted HTML.
- The "powered by" text/logo with a link back to
- http://www.mvnForum.com and http://www.MyVietnam.net in
- the footer of the pages MUST remain visible when the pages
- are viewed on the internet or intranet.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- Support can be obtained from support forums at:
- http://www.mvnForum.com/mvnforum/index
-
- Correspondence and Marketing Questions can be sent to:
- info at MyVietnam net
-
- @author: Minh Nguyen
- @author: Mai Nguyen
--%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="net.myvietnam.mvncore.util.ParamUtil" %>
<%@ page import="net.myvietnam.mvncore.util.StringUtil" %>
<%@ page import="net.myvietnam.mvncore.filter.EnableEmotionFilter" %>
<%@ page import="net.myvietnam.mvncore.security.Encoder" %>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.MyUtil" %>
<%@ page import="com.mvnforum.MVNForumGlobal" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<html <fmt:message key="mvnforum.common.i18n.html_dir"/>>
<head>
<title><fmt:message key="mvnforum.common.forum.title_name"/> - <fmt:message key="mvnforum.user.myfavoritethread.title"/></title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%@ include file="header.jsp"%>
<br/>
<table width="98%" align="center">
<tr class="nav">
<td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
<td width="100%" nowrap>
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>"><fmt:message key="mvnforum.common.nav.index"/></a> »
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "myprofile")%>"><fmt:message key="mvnforum.user.header.my_profile"/></a> »
<fmt:message key="mvnforum.user.myfavoritethread.title"/>
</td>
</tr>
</table>
<br/>
<%
Collection threadBeans = (Collection) request.getAttribute("ThreadBeans");
ForumCache forumCache = ForumCache.getInstance();
double leftWidth = ((Double)request.getAttribute("QuotaRatio")).doubleValue();
final double BAR_WIDTH = 300;
final double BAR_BORDER = 5;
String percentImage = "";
if (leftWidth <= 30) {
percentImage = "percent_low.gif";
} else if (leftWidth <= 70) {
percentImage = "percent_med.gif";
} else {
percentImage = "percent_high.gif";
}
%>
<table width="98%" align="center" class="portlet-font">
<tr>
<td> <%-- this is need by IE --%></td>
<td width="<%=BAR_WIDTH + BAR_BORDER%>" align="right">
<table width="<%=BAR_WIDTH + BAR_BORDER%>" border="0" cellspacing="<%=BAR_BORDER%>" cellpadding="1" bgcolor="#AABBCC">
<tr bgcolor="#FFFFFF">
<td align="left" height="17" nowrap class="portlet-font">
<img align='left' width="<%=Math.floor(leftWidth*(BAR_WIDTH/100))%>" height="15" src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=percentImage%>" vspace='0' hspace='0'>
</td>
</tr>
<tr><td height="12" align="center" class="portlet-msg-status"><%=Math.round(leftWidth)%>% <fmt:message key="mvnforum.common.of"/> <%=MVNForumConfig.getMaxFavoriteThread()%> <fmt:message key="mvnforum.common.threads"/></td></tr>
</table>
</td>
</tr>
</table>
<br/>
<table class="tborder" width="98%" cellspacing="1" cellpadding="3" align="center">
<tr class="portlet-section-header">
<td colspan="3"><fmt:message key="mvnforum.common.thread"/></td>
<td><fmt:message key="mvnforum.common.forum"/></td>
<td align="center"><fmt:message key="mvnforum.common.post.author"/></td>
<td align="center"><fmt:message key="mvnforum.common.reply_count"/></td>
<td align="center"><fmt:message key="mvnforum.common.view_count"/></td>
<td align="center"><fmt:message key="mvnforum.common.last_post"/></td>
<td align="center"><fmt:message key="mvnforum.common.action.delete"/></td>
</tr>
<%
boolean hasANormalNoNewThread = false;
boolean hasANormalNewThread = false;
boolean hasAHotNoNewThread = false;
boolean hasAHotNewThread = false;
boolean hasAnAttachment = false;
boolean hasSticky = false;
boolean hasAnnouncement = false;
boolean hasGlobalAnnouncement = false;
int rowIndex = 0;
for (Iterator iterator = threadBeans.iterator(); iterator.hasNext(); ) {
ThreadBean threadBean = (ThreadBean)iterator.next();
String threadIcon = MyUtil.getThreadIconName(onlineUser.getLastLogonTimestamp().getTime(), threadBean.getThreadLastPostDate().getTime(), threadBean.getThreadReplyCount()+1);
if (threadIcon.equals("f_norm_no.gif")) {
hasANormalNoNewThread = true;
} else if (threadIcon.equals("f_norm_new.gif")) {
hasANormalNewThread = true;
} else if (threadIcon.equals("f_hot_no.gif")) {
hasAHotNoNewThread = true;
} else if (threadIcon.equals("f_hot_new.gif")) {
hasAHotNewThread = true;
}
String color = ((rowIndex++)%2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
%>
<pg:item>
<tr class="<%=color%>">
<td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=threadIcon%>" border="0"></td>
<td width="16"><%=EnableEmotionFilter.filter(threadBean.getThreadIcon(), ParamUtil.getContextPath() + MVNForumGlobal.EMOTION_DIR)%></td>
<td>
<% String typeImage = "";
switch (threadBean.getThreadType()) {
case ThreadBean.THREAD_TYPE_STICKY: typeImage = "sticky.gif"; hasSticky = true; break;
case ThreadBean.THREAD_TYPE_FORUM_ANNOUNCEMENT: typeImage = "announce.gif"; hasAnnouncement = true; break;
case ThreadBean.THREAD_TYPE_GLOBAL_ANNOUNCEMENT: typeImage = "global_announce.gif"; hasGlobalAnnouncement = true; break;
default:break;
} %>
<% if ( threadBean.getThreadType() != ThreadBean.THREAD_TYPE_DEFAULT) { %>
<img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=typeImage%>"/>
<% }%>
<% if (threadBean.getThreadAttachCount() > 0) {
hasAnAttachment = true; %>
<img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/attach.gif"/>
<% } %>
<a href="<%=urlResolver.encodeURL(request, response, "viewthread?thread=" + threadBean.getThreadID())%>" class="messageTopic">
<%=MyUtil.filter(threadBean.getThreadTopic(), false/*html*/, true/*emotion*/, false/*mvnCode*/, false/*newLine*/, false/*URL*/)%>
</a>
<br/>
<%=MyUtil.filter(StringUtil.getShorterString(threadBean.getThreadBody(), MVNForumConfig.getMaxCharsInShortSummary()), false/*html*/, true/*emotion*/, false/*mvnCode*/, false/*newLine*/, false/*URL*/)%>
</td>
<td><a href="<%=urlResolver.encodeURL(request, response, "listthreads?forum=" + threadBean.getForumID())%>" class="messageTopic"><%=forumCache.getBean(threadBean.getForumID()).getForumName()%></a></td>
<td align="center">
<a href="<%=urlResolver.encodeURL(request, response, "viewmember?member=" + Encoder.encodeURL(threadBean.getMemberName()))%>" class="memberName"><%=threadBean.getMemberName()%></a>
</td>
<td align="center"><%=threadBean.getThreadReplyCount()%></td>
<td align="center"><%=threadBean.getThreadViewCount()%></td>
<td align="center">
<%=onlineUser.getGMTTimestampFormat(threadBean.getThreadLastPostDate())%><br/><fmt:message key="mvnforum.common.by"/>
<a href="<%=urlResolver.encodeURL(request, response, "viewmember?member=" + Encoder.encodeURL(threadBean.getLastPostMemberName()))%>" class="memberName"><%=threadBean.getLastPostMemberName()%></a>
<a href="<%=urlResolver.encodeURL(request, response, "viewthread?thread=" + threadBean.getThreadID() + "&lastpage=yes#lastpost")%>" class="messageTopic"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/right.gif" border="0" alt="<fmt:message key="mvnforum.common.last"/>" title="<fmt:message key="mvnforum.common.last"/>"></a>
</td>
<td align="center"><a href="<%=urlResolver.encodeURL(request, response, "deletefavoritethreadprocess?thread=" + threadBean.getThreadID())%>" class="command"><fmt:message key="mvnforum.common.action.delete"/></a></td>
</tr>
<%
}//for
if (threadBeans.size() == 0) {%>
<tr class="portlet-section-body"><td colspan="9" align="center"><fmt:message key="mvnforum.user.myfavoritethread.table.no_favorite_threads"/></td></tr>
<%}%>
</table>
<br/>
<table width="98%" border="0" align="center">
<% if (hasGlobalAnnouncement) { %>
<tr class="portlet-font">
<td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/global_announce.gif" border="0"></td>
<td><fmt:message key="mvnforum.common.legend.thread.global_announcement"/></td>
</tr>
<%}%>
<% if (hasAnnouncement) { %>
<tr class="portlet-font">
<td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/announce.gif" border="0"></td>
<td><fmt:message key="mvnforum.common.legend.thread.announcement"/></td>
</tr>
<%}%>
<% if (hasSticky) { %>
<tr class="portlet-font">
<td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/sticky.gif" border="0"></td>
<td><fmt:message key="mvnforum.common.legend.thread.sticky"/></td>
</tr>
<%}%>
<% if (hasANormalNoNewThread) { %>
<tr class="portlet-font">
<td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/f_norm_no.gif" border="0"></td>
<td><fmt:message key="mvnforum.common.legend.thread.normal_no_new"/></td>
</tr>
<%}%>
<% if (hasANormalNewThread) {%>
<tr class="portlet-font">
<td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/f_norm_new.gif" border="0"></td>
<td><fmt:message key="mvnforum.common.legend.thread.normal_new"/></td>
</tr>
<%}%>
<% if (hasAHotNoNewThread) {%>
<tr class="portlet-font">
<td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/f_hot_no.gif" border="0"></td>
<td><fmt:message key="mvnforum.common.legend.thread.hot_no_new"/></td>
</tr>
<%}%>
<% if (hasAHotNewThread) {%>
<tr class="portlet-font">
<td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/f_hot_new.gif" border="0"></td>
<td><fmt:message key="mvnforum.common.legend.thread.hot_new"/></td>
</tr>
<%}%>
<% if ( hasAnAttachment ) {%>
<tr class="portlet-font">
<td width="16" align="center"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/attach.gif" border="0"></td>
<td><fmt:message key="mvnforum.common.legend.thread.has_attachment"/></td>
</tr>
<%}%>
</table>
<br/>
</fmt:bundle>
<%@ include file="footer.jsp"%>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -