📄 message.asp
字号:
<!-- #include file="const.asp" -->
<%
call opendb()
checkuser()
position "浏览个人信箱",0
dim type1,str,nnn,str2,sql,rs,i,color,id
type1=trim(request.QueryString("type"))
if type1="1" then
str="来自"
str2="收件箱"
elseif type1="2" then
str="发往"
str2="发件箱"
elseif type1="3" then
str="对方"
str2="垃圾箱"
else
str="来自"
str2="收件箱"
end if
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function popWin(loadurl)
{
wintop=(screen.availHeight-480)/2;
winleft=(screen.availWidth-650)/2;
newWindow = window.open(loadurl,"","scrollbars=yes,resizable=yes,width=600,height=450,top="+wintop+",left="+winleft+"");
}
function monWin(loadurl)
{
newWindow = window.open(loadurl,"","scrollbars=yes,resizable=yes");
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" align="center" valign="top"> <!-- #include file="topbar.asp" --> </td>
</tr>
<tr>
<td align="center" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10" align="center" valign="top" bgcolor="#ECE9D9"> </td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="10"> </td>
<td align="center" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="84%" height="30"><span class="v8"><img src="images/btn_face.gif" width="10" height="7">
<a href="index.asp"><%=sitename%></a> <FONT face=Webdings color="#660000">8</FONT>
<a href="message.asp">我的信箱</a> <FONT face=Webdings color="#660000">8</FONT>
<%=str2%></font></td>
<td width="16%" align="center" class=v8b><a href="index.asp">返回首页</a></td>
</tr>
<tr>
<td height="1" colspan="2" bgcolor="#ECE9D9"></td>
</tr>
</table>
<br> <table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="140" valign="top"> <table width="130" cellpadding="2" cellspacing="1">
<tr>
<td align="center" background="images/bg4.gif" bgcolor="#D9D3B4" colspan="2"> </td>
</tr>
<tr>
<td height="1" width="13%"></td>
<td height="1" width="87%"></td>
</tr>
<tr>
<td width="13%"> </td>
<td width="87%"><a href="javascript:popWin('msgnew.asp')" class=a01><b>发信息</b></a></td>
</tr>
<tr>
<td height="1" bgcolor="#D9D3B4" colspan="2"></td>
</tr>
<tr>
<td width="13%"> </td>
<td width="87%"><a href="message.asp?type=1" class=a01><b>收件箱</b></a></td>
</tr>
<tr>
<td height="1" bgcolor="#D9D3B4" colspan="2"></td>
</tr>
<tr>
<td width="13%"> </td>
<td width="87%"><a href="message.asp?type=2" class=a01><b>发件箱</b></a></td>
</tr>
<tr>
<td height="1" bgcolor="#D9D3B4" colspan="2"></td>
</tr>
<tr>
<td width="13%"> </td>
<td width="87%"><a href="message.asp?type=3" class=a01><b>垃圾箱</b></a></td>
</tr>
<tr>
<td height="1" bgcolor="#D9D3B4" colspan="2"></td>
</tr>
</table></td>
<td valign="top"> <table width="100%" height="250" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#ECE9D9">
<tr background="images/bg4.gif">
<td width="16%" height="12" align="center" background="images/bg4.gif">
<%=str%></td>
<td width="55%" height="12" align="center" background="images/bg4.gif">标题</td>
<td width="21%" height="12" align="center" background="images/bg4.gif">时间</td>
<td width="8%" height="12" align="center" background="images/bg4.gif">操作</td>
</tr>
<%
if type1="1" then
sql="select * from m3_message where to1='"&request.Cookies("matrix3")("matrix3_name")&"' and owner='"&request.Cookies("matrix3")("matrix3_name")&"' and valid=1 order by addtime desc"
elseif type1="2" then
sql="select * from m3_message where from1='"&request.Cookies("matrix3")("matrix3_name")&"' and owner<>'"&request.Cookies("matrix3")("matrix3_name")&"' and valid=1 order by addtime desc"
elseif type1="3" then
sql="select * from m3_message where owner='"&request.Cookies("matrix3")("matrix3_name")&"' and valid=0 order by addtime desc"
else
sql="select * from m3_message where to1='"&request.Cookies("matrix3")("matrix3_name")&"' and owner='"&request.Cookies("matrix3")("matrix3_name")&"' and valid=1 order by addtime desc"
end if
set rs=server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
if not (rs.bof and rs.eof) then
i=0
do while (not rs.eof)
id=rs("ID")
if (i mod 2)=0 then
color="#F1F0E4"
else
color="#F8F7EF"
end if
if type1="1" then
nnn=rs("from1")
elseif type1="2" then
nnn=rs("to1")
elseif type1="3" then
nnn=rs("from1")
if nnn=request.Cookies("matrix3")("matrix3_name") then
nnn=rs("to1")
end if
else
nnn=rs("from1")
end if
%>
<tr bgcolor='#FFFFFF'>
<td height="20" align="center"><%=nnn%></td>
<td height="20" align="center"><a href="javascript:popWin('message_view.asp?id=<%=id%>')">
<%if rs("isnew")=1 then
if type1="2" then
%>
<b><%=rs("title")%> </b>(<font color="#FF0000">对方未阅读</font>)
<%else%>
<b><%=rs("title")%> </b>(<font color="#FF0000">新邮件</font>)
<%end if%>
<%else%>
<%=rs("title")%>
<%end if%>
</a></td>
<td height="20" align="center"><%=rs("addtime")%></td>
<td height="20" align="center"><a href="message_del.asp?id=<%=id%>&type=<%=type1%>">删除</a></td>
</tr>
<% i=i+1
rs.movenext
loop
else
%>
<tr bgcolor='#FFFFFF'>
<td height="20" colspan="4"> 暂无信件 ...</td>
</tr>
<%
end if
rs.close
sql="select * from m3_message where owner='"&request.Cookies("matrix3")("matrix3_name")&"'"
rs.open sql,conn,1,1
if rs.recordcount>30 then
response.write"<script>alert('您的信箱已经满了!\n\n别人无法给你发新信息.\n\n请整理您的信箱.');</script>"
elseif rs.recordcount>25 then
response.write"<script>alert('提示:您的信箱快要满了 .\n\n如果满了,别人将无法给你发信息.\n\n请整理您的信箱.');</script>"
end if
rs.close
set rs=nothing
call closedb()
%>
<tr bgcolor='#FFFFFF'>
<td colspan="4" valign="top"> </td>
</tr>
<tr>
<td height="12" colspan=4> </td>
</tr>
</table></td>
</tr>
</table>
<br> </td>
<td width="10"> </td>
<td width="1" bgcolor="#E8BC3C"></td>
<td width="100" bgcolor="#ECE9D9" valign="top">
<!-- #include file="right.asp" -->
</td>
</tr>
</table></td>
</tr>
<tr>
<td height="10" align="center" valign="bottom">
<!-- #include file="bottombar.asp" -->
</td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -