📄 list.jsp
字号:
<%@page language="java" contentType="text/html;charset=UTF-8" import="com.terac.album.*,com.terac.album.bean.*,java.util.List"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:html locale="true">
<html:base/>
<%@ include file="_header.jsp" %>
<!-- navi begin -->
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
<tr>
<td bgcolor="#cccccc" height="1"></td>
</tr>
<tr>
<td height="30" bgcolor="#eeeeee">
<a href="list.do"><b><bean:message key="label.home" /></b></a>
</td>
</tr>
<tr>
<td bgcolor="#cccccc" height="1"></td>
</tr>
</table>
<br>
<!-- navi end -->
<%
Pager pager=(Pager)request.getAttribute("pager");
%>
<table border="0" cellspacing="2" cellpadding="5" width="100%" align="center">
<tr>
<td align="right">
<font color="#ffffff"><bean:message key="label.counts"/>: <%=pager.getCount()%> <bean:message key="label.pages"/>: <%=pager.getPage()%>/<%=pager.getPageCount()%></font> <% if(pager.getPage()>1){%><a href="list.do?page=<%=pager.getPage()-1%>"><img src="images/prepage.gif" border="0"></a><%}%>
<% if(pager.getPage()<pager.getPageCount()){%><a href="list.do?page=<%=pager.getPage()+1%>"><img src="images/nextpage.gif" border="0"></a><%}%>
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="5" width="85%" align="center">
<%
Config cfg=(Config)application.getAttribute(Constants.ALBUM_CONFIG);
List photoList=pager.getList();
for (int i = 0; i < photoList.size(); i++) {
Photo photo = (Photo) photoList.get(i);
if(i%cfg.getCols()==0){%>
<tr valign="bottom" align="center">
<%}%>
<td>
<table class="pictd" border="0" cellspacing="0" cellpadding="2" width="100%" align="center">
<tr>
<td height="195">
<table border="0" cellspacing="0" cellpadding="2" width="100%" align="center">
<tr align="center" height="150">
<td valign="bottom">
<%
String filename=cfg.getUploadDirectory()+"/"+photo.getFilename()+"_s.jpg";
%>
<a href="view.do?id=<%=photo.getId()%>" ><img src="<%=filename%>" border="0"></a>
</td>
</tr>
<tr align=middle>
<td>
<%=photo.getName()%><br>
<%=photo.getWidth()%>*<%=photo.getHeight()%> | <%=photo.getSize()%>K
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<%if(i%cfg.getCols()==cfg.getCols()-1){%>
</tr>
<%}else if(i==photoList.size()-1){
for (int j = 0; j < cfg.getCols()-photoList.size()%cfg.getCols(); j++){
%>
<td>
<table border="0" cellspacing="0" cellpadding="2" width="170" align="center">
<tr>
<td></td>
</tr>
</table>
</td>
<% } %>
</tr>
<%
}
}
%>
</table>
<%@ include file="_footer.jsp" %>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -