forked from maxliaops/Java_Web_Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckmess.jsp
More file actions
119 lines (117 loc) · 4.55 KB
/
checkmess.jsp
File metadata and controls
119 lines (117 loc) · 4.55 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="java.util.Iterator"%>
<%@ page import="java.util.Collection"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="electric.dbs.Dbmess"%>
<%@ page import="electric.dbs.Messdb"%>
<%@ page import="electric.dbs.mess"%>
<%@ page import="electric.dbs.Dbshop"%>
<%@ page import="electric.dbs.Shopdb"%>
<%@ page import="electric.dbs.shop"%>
<%@ page import="electric.electricUtils.ParamUtils"%>
<%@ page import="electric.electricUtils.DbConnectionManager"%>
<%
Messdb mess=new Messdb();
int countpage=mess.selectsql(5);
shop pt=(shop)session.getAttribute("USERPO");
if(pt==null)
{
response.sendRedirect("login.jsp");
}
%>
<html>
<head>
<title>留言管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet">
</head>
<body>
<table width="777" height="172" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="Images/tiring-room/tiring-room_01.gif" width="777" height="125"></td>
</tr>
<tr>
<td height="47" valign="top" background="Images/tiring-room/tiring-room_02.gif"><jsp:include page="H_navigation.jsp"/></td>
</tr>
</table></td>
</tr>
</table>
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="44" height="380" valign="top"><img src="Images/tiring-room/tiring-room_03.gif" width="44" height="248"></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="68" colspan="2" background="Images/tiring-room/h_broad.gif"> </td>
</tr>
<tr>
<td width="4%"> </td>
<td width="96%">
<table width="100%" height="74" border="1" cellpadding="0" cellspacing="0"
bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#82664F">
<tr>
<td width="19%" height="20" align="center">发布时间</td>
<td width="16%" align="center">姓名</td>
<td width="60%" align="center">留言</td>
<td width="5%" align="center">删除</td>
</tr>
<%
int pa=ParamUtils.getIntParameter(request,"pa",1);
int spa=pa-1;
if(spa<1)
{
spa=1;
}
int xpa=pa+1;
if(xpa>countpage)
{
xpa=countpage;
}
Messdb messdb=new Messdb();
Collection coll=messdb.select(5,pa);
if (coll == null || coll.isEmpty()) {
System.out.println("coll is null");
}else {
Iterator it = coll.iterator();
while (it.hasNext()) {
mess b2 = (mess) it.next();
%>
<tr>
<td height="20" align="center"><%=b2.getCreateDate().substring(0,4)%>年<%=b2.getCreateDate().substring(4,6)%>月<%=b2.getCreateDate().substring(6,8)%>日</td>
<td height="20" align="center"><%=b2.getMname()%></td>
<td height="20" align="center"><a href="messshow.jsp?id=<%=b2.getId()%>"><%=b2.getMtext()%></a></td>
<td height="20" align="center">
<A href="mess_add.jsp?id=<%=b2.getId()%>&pageaction=delete&responsepage=checkmess.jsp"><IMG border=0 height=22 src="image/del.gif" width=22></A>
</td>
</tr>
<%
}
}
%>
</table>
<table width="100%" border="0" cellspacing="-2" cellpadding="-2" height="20">
<tr>
<td width="20%"> </td>
<td width="80%"><div align="right">
<%if(pa>1){%>
<a href="checkmess.jsp?pa=1">第一页</a>
<a href="checkmess.jsp?pa=<%=spa%>">上一页</a>
<%}
if(pa<countpage){%>
<a href="checkmess.jsp?pa=<%=xpa%>">下一页</a>
<a href="checkmess.jsp?pa=<%=countpage%>">最后一页</a>
<%}%>
</div></td>
</tr>
</table>
</td>
</tr>
</table></td>
<td width="35" valign="top"><img src="Images/tiring-room/tiring-room_05.gif" width="35" height="248"></td>
</tr>
</table>
<jsp:include page="copyright.htm"/>
</body>
</html>