<!--#include file="../inc/Secure.htm"-->
<!--#include file="../inc/conn.htm"-->
<%
LoginID=trim(session("LoginID"))
if LoginID="" then LoginID=0

ID=trim(request("ID"))
if ID="" then response.redirect "NewDoc.htm"

del=trim(request("del"))
if del="delete" then
	oConn.execute "update tblMailIn set status=1 where id="& ID
	response.write "邮件已删除。<a href=mail.htm>[返回]</a>"
	oConn.close
	response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from tblMailIn where ID="& ID
rs.open sql,oConn
if not rs.eof then
	FromID=trim(rs("FromID"))
	FromName=trim(rs("FromName"))
	ToName=trim(rs("ToName"))
	Subject=trim(rs("Subject"))
	Body=trim(rs("Body"))
	AttachFile=trim(rs("AttachFile"))
	Times=trim(rs("Times"))
end if
rs.close
set rs=nothing
oConn.execute "update tblMailin set isRead=1 where id="& ID

%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../CSS/main.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<table border=0 width="100%" bgcolor=#FFFFFF cellpadding=3 cellspacing=0>
<tr bgcolor=#eeeddb>
<td><a href="mailDetail.htm?ID=<%=ID%>&del=delete" onclick="return CheckDelete();">删除</a></td>
<td><a href="newMail.htm?reply=<%=FromName%>">回复</a></td>
<td><a href="transmit.htm?mailid=<%=ID%>">转交</a></td>
<td><a href="inbox.htm">返回</a></td>
</tr>
</table>
<BR>
<table border=0 width="100%" bgcolor=#FFFFFF cellpadding=3 cellspacing=0>
<tr>
	<td width="15%">发件人：</td>
	<td><%=FromName%></td>
</tr>
<tr>
	<td>收件人：</td>
	<td><%=ToName%></td>
</tr>
	<td>发送时间：</td>
	<td><%=Times%></td>
</tr>
</tr>
	<td>主题：</td>
	<td><%=Subject%></td>
</tr>
<%if attachfile<>"" then%>
</tr>
	<td>附件：</td>
	<td><a target="_blank" href="../File_up/Mail/<%=LoginID&"/"&attachfile%>"><%=attachfile%></td>
</tr>
<%end if%>
</tr>
	<td colspan=2><hr size=1 color=#D0D090></td>
</tr>

</tr>
	<td colspan=2><%=replace(replace(server.htmlencode(Body&""),chr(13),"<br>")," ","&nbsp;")%></td>
</tr>
</table>
<BR><BR>
</BODY>
</HTML>
<!--#include file="../inc/conn_close.htm"-->
<script language=javascript>
function CheckDelete()
{
	return confirm("确实删除吗？");
}
</script>
