-
Notifications
You must be signed in to change notification settings - Fork 433
/
Copy pathuser_queryPhoto.jsp
123 lines (99 loc) · 3.54 KB
/
user_queryPhoto.jsp
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:directive.page import="java.util.List"/>
<jsp:directive.page import="com.wy.form.Photo"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>宇晨相册——查询个人相册</title>
<link href="css/style.css" type="text/css" rel="stylesheet" />
<script language="javascript" src="js/js.js" type="text/javascript"></script>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
</head>
<%
if(null==session.getAttribute("userInfo")){
response.sendRedirect("index.jsp");
}
%>
<body>
<jsp:include page="top.jsp" flush="true" />
<table width="753" height="40" border="0" align="center" cellpadding="0" cellspacing="0" background="images/16.jpg">
<tr>
<td width="561" height="28"> <font color="#EDE6BC" size="-1"><b>当前用户:${sessionScope.userInfo.username}</b></font></td>
<td width="192"><a href="user_upLoadPhoto.jsp" class="a1">请您上传自己的相片</a>
</td>
</tr>
</table>
<table width="753" height="54" border="0" align="center" cellpadding="0" cellspacing="0" background="images/17.jpg">
<tr>
<td height="51"><table width="287" height="33" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="287" height="33" align="center" valign="bottom">查询个人相册</th>
</tr>
</table></td>
</tr>
</table>
<table width="753" height="504" border="0" align="center" cellpadding="0" cellspacing="0" background="images/18.jpg">
<tr>
<td height="347" align="center">
<c:if test="${empty type}">
<c:out value="您还没有上传自己的相片"/>
</c:if>
<c:if test="${!empty type}">
<table width="139" border="0" cellpadding="0" cellspacing="0">
<%
String[] typePhoto=(String[])request.getAttribute("type");
int lineCount=5;
int typeLength=typePhoto.length;
int rowCount=typeLength/lineCount;
if(typeLength%lineCount!=0){
rowCount++;
}
List list=(List)request.getAttribute("list");
%>
<tr>
<%
for(int i=0;i<typeLength;i++){
%>
<td width="149" height="153" align="center">
<table width="128" height="142" border="0">
<tr>
<td width="118" height="111" align="center">
<%
for(int j=0;j<list.size();j++){
Photo photo=(Photo)list.get(j);
if(photo.getPhotoType().equals(typePhoto[i])){
%>
<a href="photoServlet?info=queryPhotoList&type=<%=photo.getPhotoType()%>">
<img src="<%=photo.getSmallPhoto()%>">
</a>
<%
break;
} }%>
</td>
</tr>
<tr>
<td width="122" height="28" align="center" background="images/11.gif"><b><%=typePhoto[i]%><b></td>
</tr>
</table>
</td>
<%
if(i%lineCount==lineCount-1){
out.print("</tr><tr>");
}
}
if(rowCount*lineCount-typeLength>0){
int overCount=rowCount*lineCount-typeLength;
for(int j=0;j<overCount;j++){
out.print("<td align=center width=155> </td>");
}
}
%>
</tr>
</table>
</c:if>
</td>
</tr>
</table>
<jsp:include page="down.jsp" flush="true"></jsp:include>
</body>
</html>