📄 viewmail.asp
字号:
<% Response.Buffer=True %>
<!--#include file="../inc/person.inc"-->
<% uname=session("puid")
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from pmailbox where reid='"&uname&"'and newmail=0"
rs.open sql,conn,1,1
mailnum=rs.recordcount
rs.close
set rs=nothing
Set rs = Server.CreateObject("ADODB.Recordset")
if request("del")<>"" then
conn.Execute("delete * from pmailbox where id="&request("del"))
response.write"<SCRIPT language=JavaScript>alert('信件删除成功!');"
response.write"javascript:window.close();</SCRIPT>"
end if
sql="select * from pmailbox where id="&request("id")
rs.open sql,conn,1,1
if rs.bof or rs.eof then
response.write"<SCRIPT language=JavaScript>alert('信件不存在或已被删除!');"
response.write"javascript:window.close();</SCRIPT>"
end if
newmail=rs("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("title")%></title>
</head>
<body>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" width="366" height="69" bordercolordark="#EBEEF3" bordercolor="#000000">
<tr>
<td height="18" width="356" valign="bottom" colspan="2" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#999999">
<p align="center"><font color="#FFFFFF">=== 站内信件 ===</font>
</td>
</tr>
<tr>
<td height="20" width="356" valign="bottom" colspan="2"> 发信人:<%=rs("sendname")%></td>
</tr>
<tr>
<td height="19" width="356" valign="bottom" colspan="2"> 标 题:<%=rs("title")%></td>
</tr>
<tr>
<td height="19" width="356" valign="bottom" colspan="2"> 发信时间:<%=rs("sdate")%></td>
</tr>
<tr>
<td>
<%=rs("mailtext")%>
</td>
</tr>
<tr>
<td height="18" width="356" valign="bottom" colspan="2" bgcolor="#FFFFFF">
<p align="right">[<a href="viewmail.asp?del=<%=rs("id")%>">删除信件</a>] [<a href="sendmail.asp?reid=<%=rs("senduid")%>">回复信件</a>]
[<a href="javascript:window.close()">关闭窗口</a>]
</td>
</tr>
</table>
</div>
</body>
</html>
<% rs.close
set rs=nothing
if newmail="0" then
Set rs = Server.CreateObject("ADODB.Recordset")
sql2="update pmailbox set newmail=newmail+1 where id="&request("id")
rs.open sql2,conn,1,1
end if %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -