📄 mail_list.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@page language="java" import="java.sql.*"%>
<jsp:useBean id="userBean" scope="page" class="webmail.conn"/>
<%!
public String getStr(String str)
{
try
{
String temp_p=str;
byte[] temp_t=temp_p.getBytes("ISO8859-1");
String temp=new String(temp_t);
return temp;
}
catch(Exception e)
{
}
return "null";
}
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<table width="100%" border="1">
<tr>
<td width="18%">发件人</td>
<td width="25%">标题</td>
<td width="29%">时间</td>
<td width="28%">附件</td>
</tr>
<%
String sql;
sql="select * from inbox where userID='"+session.getAttribute("username")+"'";
ResultSet RS;
RS=userBean.executeQuery(sql);
while(RS.next())
{
int id;
id=RS.getInt("id");
%>
<tr>
<td width="18%"> <%=RS.getString("fromID")%></td>
<td width="25%"> <a href="read.jsp?id=<%=id%>"><%=RS.getString("title")%></a></td>
<td width="29%"> <%=RS.getDate("send_time")%></td>
<td width="28%"> <%=RS.getString("fujian")%></td>
</tr>
<%
}
RS.close();
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -