📄 message.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*"%>
<jsp:useBean id="databean" scope="session" class="ConnBean.conn" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>留言</title>
</head>
<link href="../images/style.css" rel="stylesheet">
<body>
<TABLE width=760 border=0 align="center" cellPadding=0 cellspacing="0"
bgcolor="#FFFFFF" style="BORDER-COLLAPSE: collapse">
<jsp:include page="top_mybandao.jsp" />
</table>
<table width="300" height="340" border="1" align="center"
cellpadding="0" cellspacing="0" bordercolor="#0000ff">
<tr>
<td valign="top">
<table width="800" height="127" border="0" align="center"
cellpadding="0" cellspacing="00">
<tr align="center" valign="middle" background="../images/top1.gif">
<td height="42" colspan="8" nowrap class="head">
<font color="#FF0000"> <%
if (session.getAttribute("user") == null) {
out
.print("<script language=\"JavaScript\">alert(\"登录后才能查看自己的订单!\");location.href=\"../index.jsp\"</script>");
} else {
out.println(session.getAttribute("user"));
}
%> </font> ,您的留言情况如下
<input type="button" value="退 出"
onclick="javascript:location.href='mybandao.jsp';">
<INPUT type="Button" name="button2" value="写留言" onclick="javascript:location.href='wmsg.jsp';">
</td>
</tr>
<tr align="center" valign="middle" bgcolor="#4ad7fa">
<td align="center" height="22" colspan="8" nowrap class="head">
<font size="5" face="华文行楷" class="bgcolor">
我 的 留 言 </font>
</td>
</tr>
<tr align="center" valign="middle" class="bgcolor">
<td width="200" height="21" class="bgcolor">
<strong> 主题 </strong>
</td>
<td width="150" height="21" class="bgcolor">
<strong> 留言时间 </strong>
</td>
<td width="120" height="21" class="bgcolor">
<strong> 是否回复 </strong>
</td>
<td width="120" height="21" class="bgcolor">
<strong> 查看回复 </strong>
</td>
</tr>
<tr align="center" valign="middle" class="bgcolor">
<td width="260" height="10" class="bgcolor">
</td>
</tr>
<%
String username = (String) session.getAttribute("user");
try {
String sql = "select * from leaveword where LeaverName='"
+ username + "'";
ResultSet rs = databean.executeQuery(sql);
while (rs.next()) {
String id = rs.getString("ID");
String time = rs.getString("LeaverTime");
String title = rs.getString("LeaverTitle");
String isrep = rs.getString("Repeater");
%>
<tr align="center" valign="middle" class="bgcolor">
<td width="200" height="21" class="bgcolor">
<A href="../user/rmsg.jsp?id=<%out.print(id);%>" class=link_b07 href="#"
target=_self> <%out.print(title);%> </A>
</td>
<td width="150" height="21" class="bgcolor">
<%
out.print(time);
%>
</td>
<td width="120" height="21" class="bgcolor">
<%
out.print(isrep);
%></td>
<td><INPUT type="Button" name="button1" value="查看" onclick="javascript:location.href='rmsg.jsp?id=<%out.print(id);%>';"></td>
</tr>
<%
}
} catch (SQLException e) {
e.printStackTrace();
}
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -