📄 checktalk.jsp~8~
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@page import="java.util.*"%>
<%@page import="com.actionForm.TalkForm"%>
<jsp:useBean id="dao" scope="request" class="com.dao.Backdao"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>查看留言</title>
</head>
<link href="css/style.css" rel="stylesheet" type="text/css">
<script language="javascript">
function checkEmpty(form){
for(i=0;i<form.length;i++){
if(form.elements[i].value==""){
alert("表单信息不能为空");
return false;
}
}
}
</script>
<body style="background-attachment: scroll; background-image: url(image/background.jpg); background-repeat: no-repeat">
<%
List list = (List) request.getAttribute("list");
int number=Integer.parseInt((String)request.getAttribute("number"));
int maxPage=Integer.parseInt((String)request.getAttribute("maxPage"));
int pageNumber=Integer.parseInt((String)request.getAttribute("pageNumber"));
int start=number*3;//开始条数
int over=(number+1)*3;//结束条数
int count=pageNumber-over;//还剩多少条记录
if(count<=0){
over=pageNumber;
}
%>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="0">
<tr >
<td height="104" colspan="2" background="image/banner.jpg"> </td>
</tr>
<tr>
<td width="212" height="395" background="image/left.jpg"><jsp:include page="left.jsp"></jsp:include></td>
<td valign="top" background="image/wordmanage.jpg">
<table width="457" height="38%" border="0" align="center">
<tr>
<td height="63"> </td>
</tr>
<tr>
<td height="326" align="center" valign="top">
<% for (int i =start; i < over; i++) {
TalkForm form=(TalkForm)list.get(i);
%>
<table width="402" height="80" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8" >
<tr>
<td width="69" height="20" >留言主题</td>
<td colspan="4"><%=form.getTopic()%></td>
</tr>
<tr>
<td height="20">留 言 人</td>
<td width="167" ><%=form.getWho()%></td>
<td width="62" height="20" >留言时间</td>
<td colspan="2"><%=form.getLeaveTime()%></td>
</tr>
<tr>
<td height="20">留言内容</td>
<td colspan="4"><%=form.getContent()%></td>
</tr>
<tr align="right">
<td height="20" colspan="4"> </td>
<td width="80">
<%
List backList=dao.selectLeave(form.getId());
if(backList.size()==0){
%>
<a href="talkAction.do?method=checkTalk&">删除主题</a>
<%}else{%>查看回复内容<%}%>
</td>
</tr>
</table> <%}%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td height="20">共为<%=maxPage%>页</td>
<td>共有<%=pageNumber%>条</td>
<td>当前为第<%=number+1%>页</td>
<td><%if((number+1)==1){%>第一页<%}else{%><a href="talkAction.do?method=checkTalk&i=0">第一页</a></td><%}%>
<td><%if(maxPage<=(number+1)){%>最后一页<%}else{%><a href="talkAction.do?method=checkTalk&i=<%=maxPage-1%>">最后一页</a></td><%}%>
<td><br><form name="form" method="post" action="talkAction.do?method=checkTalk">
<select name="i" >
<%
for(int j=0;j<maxPage;j++){
%>
<option value="<%=j%>"><%=j+1%></option>
<%}%>
</select>
<input type="submit" name="Submit" value="查询">
</form></td>
<td><%if((number+1)==1){%> 上一页<%}else{%><a href="talkAction.do?method=checkTalk&i=<%=number-1%>">上一页</a></td><%}%>
<td><%if(maxPage<=(number+1)){%>下一页<%}else{%><a href="talkAction.do?method=checkTalk&i=<%=number+1%>">下一页</a></td><%}%>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr >
<td height="81" colspan="2" background="image/bottom.jpg" > </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -