forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphoto_query.jsp
More file actions
97 lines (87 loc) · 3.23 KB
/
Copy pathphoto_query.jsp
File metadata and controls
97 lines (87 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:directive.page import="com.mr.model.UserInfo"/>
<jsp:directive.page import="com.mr.dao.ObjectDao"/>
<jsp:directive.page import="com.mr.model.ArticleInfo"/>
<jsp:directive.page import="java.util.List"/>
<jsp:directive.page import="com.mr.tools.ToChinese"/>
<jsp:directive.page import="com.mr.model.PhotoInfo"/>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%@taglib prefix ="s" uri="/struts-tags"%>
<s:set name="userInfo" value="%{#session.userInfo}"/>
<link href="css/style.css" type="text/css" rel="stylesheet">
<script src="js/validate.JS" language="javascript" type="text/javascript"></script>
<title><s:property value="#userInfo.account"/>博客空间</title>
</head>
<%
String info="相片全部查询";
if(null!=request.getAttribute("Info")){
info=(String)request.getAttribute("info");
}
List list=(List)request.getAttribute("list");
%>
<body>
<jsp:include page="blog_top.jsp" flush="true"/>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="184" height="205" valign="top" background="images/b_l_3.gif"><jsp:include page="blog_left.jsp" flush="true"/></td>
<td align="center" valign="top">
<br>
<%=info%><br><br>
<table width="179" height="165" border="0" cellpadding="0" cellspacing="0">
<tr>
<%
int lineCount=2;
int size=list.size();
int rowCount=size/lineCount;
if(size%lineCount!=0){
rowCount++;
}
for(int i = 0;i<size;i++){
PhotoInfo photoInfo=(PhotoInfo)list.get(i);
%>
<td width="179">
<table width="147" height="164" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="143" height="98" align="center">
<a href="blog/userManager/photo_queryOne.jsp?address=<%=photoInfo.getPhotoAddress()%>" target="_blank">
<img src="<%=photoInfo.getPhotoAddress()%>" height="123" width="140">
</a>
</td>
</tr>
<tr>
<td height="20">相片类别:<%=photoInfo.getPhotoType()%></td>
</tr>
<tr>
<td height="20">相片名称:<%=photoInfo.getPhotoName() %></td>
</tr>
</table>
</td>
<%
if(i%lineCount==lineCount-1){
out.print("</tr><tr>");
}
}
if(rowCount*lineCount-size>0){
int overCount=rowCount*lineCount-size;
for(int j=0;j<overCount;j++){
out.print("<td align=center> </td>");
}
}
%>
</tr>
</table>
<br>
</td>
<td width="180" align="center" valign="top" background="images/b_r_2.gif"><jsp:include page="blog_right.jsp" flush="true"/></td>
</tr>
</table>
<jsp:include page="blog_down.jsp" flush="true"/>
</body>
</html>