?? viewmail.jsp
字號(hào):
<% String puid= (String) session.getValue("puid");
if((puid==null)|(puid=="")){
out.print("<SCRIPT language=JavaScript>alert('操作超時(shí),請(qǐng)重新登錄!');");
out.print("this.location.href='../default.jsp';</SCRIPT>");
}
%>
<%@ include file="../conn.jsp"%>
<%request.setCharacterEncoding("GB2312");
String uname= (String) session.getValue("puid");
if(request.getParameter("del")!=null)
{stmt.executeUpdate("delete from scott.pmailbox where id='"+request.getParameter("del")+"'");
out.print("<SCRIPT language=JavaScript>alert('信件被刪除!');");
out.print("javascript:window.close();</SCRIPT>");
response.sendRedirect("mailbox.jsp");
}
String sqlname;
sqlname="select * from scott.pmailbox where id= '"+request.getParameter("id")+"' order by id desc" ;
ResultSet rs=stmt.executeQuery(sqlname);
if(!rs.next()){
out.print("<SCRIPT language=JavaScript>alert('信件不存在或已被刪除!');");
out.print("javascript:window.close();</SCRIPT>");
}else{
String newmail=rs.getString("newmail"); %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" href="../inc/register.css" type="text/css">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=rs.getString("title")%></title>
</head>
<body>
<div align="center">
<center>
<table border="4" cellpadding="0" cellspacing="0" width="366" height="69" bordercolor="#EBEEF3" bordercolorlight="#EBEEF3" bordercolordark="#EBEEF3">
<tr>
<td height="18" width="356" valign="bottom" bgcolor="#C6CEDE" colspan="2" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<p align="center">=== 站內(nèi)信件 ===</td>
</tr>
<tr>
<td height="20" width="356" valign="bottom" bgcolor="#EBEEF3" colspan="2"> 發(fā)信人:<%=rs.getString("sendname")%></td>
</tr>
<tr>
<td height="19" width="356" valign="bottom" bgcolor="#EBEEF3" colspan="2"> 標(biāo)
題:<%=rs.getString("title")%></td>
</tr>
<tr>
<td height="19" width="356" valign="bottom" bgcolor="#EBEEF3" colspan="2"> 發(fā)信時(shí)間:<%=rs.getString("sdate")%></td>
</tr>
<tr>
<td width="2" rowspan="3">
</center>
</td>
<td height="4" width="349">
</td>
</tr>
<tr>
<td bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" width="349">
<%=rs.getString("mailtext")%>
</td>
</tr>
<tr>
<td height="1" width="349">
</td>
</tr>
<tr>
<td height="23" width="356" valign="bottom" bgcolor="#EBEEF3" colspan="2">
<p align="center">[<a href="viewmail.jsp?del=<%=rs.getString("id")%>">刪除信件</a>] [<a href="sendmail.jsp?reid=<%=rs.getString("senduid")%>">回復(fù)信件</a>]
</td>
</tr>
</table>
</div>
<p align="center">
【<a href="javascript:window.close()">關(guān)閉窗口</a>】
</body>
</html>
<%}
stmt.executeUpdate("update scott.pmailbox set newmail=newmail+1 where id='"+request.getParameter("id")+"'");
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -