📄 listattachments.jsp
字号:
<%--
- $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/user/listattachments.jsp,v 1.20 2007/10/19 10:48:25 lexuanttkhtn Exp $
- $Author: lexuanttkhtn $
- $Revision: 1.20 $
- $Date: 2007/10/19 10:48:25 $
-
- ====================================================================
-
- Copyright (C) 2002-2007 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: Dung Bui
--%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="net.myvietnam.mvncore.util.ParamUtil" %>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.MVNForumResourceBundle" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ include file="inc_common.jsp"%>
<%@ include file="inc_doctype.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<%
int totalAttachments = ((Integer)request.getAttribute("TotalAttachments")).intValue();
int memberPostsPerPage = onlineUser.getPostsPerPage();
Collection attachBeans = (Collection)request.getAttribute("AttachmentBeans");
%>
<mvn:html locale="${currentLocale}">
<mvn:head>
<mvn:title><fmt:message key="mvnforum.common.forum.title_name"/> - <fmt:message key="mvnforum.user.listattachments.title"/></mvn:title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css"/>
</mvn:head>
<mvn:body>
<%@ include file="header.jsp"%>
<br/>
<pg:pager
url="listattachments"
items="<%=totalAttachments%>"
maxPageItems="<%=memberPostsPerPage%>"
isOffset="true"
export="offset,currentPageNumber=pageNumber"
scope="request">
<% try {
//offset = ((Integer)request.getAttribute("offset")).intValue();
offset = new Integer((String)request.getAttribute("offset"));
} catch (Exception e) {
// do nothing
}
%>
<% String rowsType = MVNForumResourceBundle.getString(onlineUser.getLocale(), "mvnforum.common.numberof.attachments"); %>
<table width="95%" align="center">
<tr class="nav">
<td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif" alt="" /></td>
<td width="100%" nowrap="nowrap">
<a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>"><fmt:message key="mvnforum.common.nav.index"/></a> »
<fmt:message key="mvnforum.user.listattachments.title"/>
</td>
</tr>
</table>
<br/>
<table width="95%" align="center">
<tr class="portlet-font"><td>
<form action="">
<fmt:message key="mvnforum.common.filter_by.category_or_forum"/> »
<%-- <select name="FastGoForum" onChange="gotoPage(this.options[this.selectedIndex].value)">
<option value=""><fmt:message key="mvnforum.common.prompt.choose_forum"/></option>
<%
for (Iterator catIter = categoryBeans.iterator(); catIter.hasNext(); ) {
CategoryBean categoryBean = (CategoryBean)catIter.next();
int categoryID = categoryBean.getCategoryID();
if (MyUtil.canViewAnyForumInCategory(categoryID, permission) == false) continue; %>
<option value=""></option>
<option value="<%=urlResolver.encodeURL(request, response, "listforums")%>"><%=categoryBean.getCategoryName()%></option>
<option value="">---------------------------------</option>
<%
for (Iterator forumIter = forumBeans.iterator(); forumIter.hasNext(); ) {
ForumBean forumBean = (ForumBean)forumIter.next();
if (forumBean.getCategoryID() != categoryID) continue;
if (permission.canReadPost(forumBean.getForumID()) && (forumBean.getForumStatus() != ForumBean.FORUM_STATUS_DISABLED) ) { %>
<option value="<%=urlResolver.encodeURL(request, response, "listthreads?forum=" + forumBean.getForumID())%>"> <%=forumBean.getForumName()%></option>
<% } //if
} // for forum
}// for category %>
</select>
--%>
<%
out.println(request.getAttribute("Result"));
%>
</form>
</td></tr>
</table>
<table width="95%" align="center">
<tr>
<td>
<%@ include file="inc_pager.jsp"%>
</td>
</tr>
</table>
<table class="tborder" width="95%" cellspacing="1" cellpadding="5" align="center">
<mvn:cssrows>
<tr class="portlet-section-header">
<td align="center">Image</td>
<td align="center">Get Attachment</td>
<td align="center">Edit</td>
<td align="center">Delete</td>
<td align="center">Size</td>
<td align="center">Download Count</td>
<td align="center">Description</td>
</tr>
<%
if (attachBeans != null) {
for (Iterator attachIter = attachBeans.iterator(); attachIter.hasNext(); ) {
AttachmentBean attachBean = (AttachmentBean)attachIter.next();
%>
<pg:item>
<tr class="<mvn:cssrow/>" valign="top">
<td >
<%
String enablethumbnail = "";
if (MVNForumConfig.getEnableThumbnail()) {
enablethumbnail = "thumbnail=yes&";
}
%>
<%if (attachBean.getAttachMimeType().startsWith("image/") && (permission.canGetAttachment(attachBean.getForumID()) || MVNForumConfig.getEnableGuestViewImageAttachment()) ) {%>
<img src="<%=urlResolver.encodeURL(request, response, "getattachment?" + enablethumbnail + "attach=" + attachBean.getAttachID(), URLResolverService.ACTION_URL)%>" alt="<%=attachBean.getAttachFilename()%>" title="<%=attachBean.getAttachFilename()%>" border="0" />
<% } %>
</td>
<td>
<img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/attach.gif" border="0" alt="<fmt:message key="mvnforum.common.attachment"/>" />
<a class="command" href="<%=urlResolver.encodeURL(request, response, "getattachment?attach=" + attachBean.getAttachID(), URLResolverService.ACTION_URL)%>"><%=attachBean.getAttachFilename()%></a>
</td>
<td>
<%if (permission.canEditPost(attachBean.getForumID()) ) {%>
<a class="command" href="<%=urlResolver.encodeURL(request, response, "editattachment?attach=" + attachBean.getAttachID() + "&offset=" + offset)%>">[<fmt:message key="mvnforum.common.action.edit"/>]</a>
<% } %>
</td>
<td>
<%if (permission.canDeletePost(attachBean.getForumID()) ) {%>
<a class="command" href="<%=urlResolver.encodeURL(request, response, "deleteattachment?attach=" + attachBean.getAttachID() + "&offset=" + offset)%>">[<fmt:message key="mvnforum.common.action.delete"/>]</a>
<% } %>
</td>
<td>
<%=attachBean.getAttachFileSize()%> bytes
</td>
<td>
<fmt:message key="mvnforum.user.viewthread.download_count"/>: <%=attachBean.getAttachDownloadCount()%>
</td>
<td>
<%if (attachBean.getAttachDesc().length() > 0) {%>
<%=MyUtil.filter(attachBean.getAttachDesc(), false/*html*/, true/*emotion*/, true/*mvnCode*/, false/*newLine*/, true/*URL*/)%>
<%}%>
</td>
</tr>
</pg:item>
<%
}//end for
if (attachBeans.size() == 0) {%>
<tr class="<mvn:cssrow/>"><td colspan="8" align="center"><fmt:message key="mvnforum.user.listattachments.table.no_attachment"/></td></tr>
<%}
}
%>
</mvn:cssrows>
</table>
<table width="95%" align="center">
<tr>
<td>
<%@ include file="inc_pager.jsp"%>
</td>
</tr>
</table>
</pg:pager>
<br/>
<%@ include file="footer.jsp"%>
</mvn:body>
</mvn:html>
</fmt:bundle>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -