www.gusucode.com > 仿MOP对开式论坛程序 1.0源码程序 > showmessages.asp

    <%@language="VBScript"%>
<!--#include file="title.asp"-->
<!--#include file="sub.asp"-->
<%
contents=contents &"<title>已保存密信-"& caption &"</title>"&_
"</head>"&_
"<body title=""可以使用Alt+S或者Ctrl+Enter直接提交密信"">"&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">"&_
"<tr>"&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"" class=""tdc"">"
if gbmaduser="" then
contents=contents &"<script language=""JavaScript"">alert(""出错:你还没登陆或者已经掉线,请重新登陆。"");window.close();</script>"
else
if Right(validate,Len(gbmaduser))<>gbmaduser then
contents=contents &"<script language=""JavaScript"">alert(""出错:验证Cookies信息出错,请重新登陆。\n引起该错误的原因可能是因为你手动修改了Cookies。"");window.close();</script>"
else
if gb<30 then
contents=contents &"<script language=""JavaScript"">alert(""出错:你的"& gbname &"不足30,不能使用密信功能。"");window.close();</script>"
else
Dim i,delid,erryes
delid=Request.QueryString("delid")
if IsNumeric(delid) then
delid=Clng(delid)
else
delid="0"
end if
if delid>0 then
rs.Open "Select userpwd From gbmaduser Where gbmaduser='"& gbmaduser &"'",conn,1,1
if Not rs.Eof then
if rs("userpwd")<>userpwd then
contents=contents &"<script language=""JavaScript"">alert(""出错:密码验证错误,请重新登陆。\n引起该错误的原因可能是因为你手动修改了Cookies。"");window.close();</script>"
erryes="yes"
end if
else
contents=contents &"<script language=""JavaScript"">alert(""出错:不存在的用户,请重新登陆。\n引起该错误的原因可能是因为你手动修改了Cookies。"");window.close();</script>"
end if
rs.Close
if erryes<>"yes" then
rs.Open "oldmessage Where id="& delid,conn,1,3
if Not rs.Eof then
if LCase(rs("gbmaduser"))=LCase(gbmaduser) then rs.Delete
end if
rs.Close
end if
end if
rs.Open "oldmessage Where gbmaduser='"& gbmaduser &"' Order by posttime Desc",conn,1,1
if rs.Eof then
contents=contents &"<script language=""JavaScript"">alert(""出错:你没有任何的已保存密信。"");window.open(""session.asp"","""& bbssn &"online"");window.close();</script>"
else
For i=1 to rs.RecordCount
if rs("remessage")<>"" then
contents=contents &"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">"& rs("sender") &" 发送给你的密信("& rs("posttime") &")</td></tr>"&_
"<tr class=""tds""><td>"
if rs("recontent")<>"" then contents=contents &"<font class=""del"">Re:"& unhtmlcode(rs("recontent")) &"</font><br><br>"
contents=contents & unhtmlcode(rs("content")) &"<br><br>"&_
"<font class=""del"">已回复:"& unhtmlcode(rs("remessage")) &"</font><br><br>操作:<a href=""showmessages.asp?delid="& rs("id") &""" title=""删除该密信"">删除</a>"&_
"</td></tr>"
else
contents=contents &"<form name=""sendmessage"& i &""" method=""post"" onsubmit=""return validinput"& i &"();"" action=""sendmessage.asp"" onkeydown=""resend"& i &"()"">"&_
"<tr class=""toptr""><td class=""tdc"" height=""20"" background="""& theme &"02.gif"">"& rs("sender") &" 发送给你的密信("& rs("posttime") &")</td></tr>"&_
"<tr class=""tds""><td>"
if rs("recontent")<>"" then contents=contents &"<font class=""del"">Re:"& unhtmlcode(rs("recontent")) &"</font><br><br>"
contents=contents & unhtmlcode(rs("content")) &"<br><br>"&_
"<script language=""JavaScript"">function validinput"& i &"(){if(document.sendmessage"& i &".content.value.length==0){alert(""请填写好密信内容。"");document.sendmessage"& i &".content.focus();return false;}return true;};function resend"& i &"(){if((event.altKey==true && event.keyCode==83) || (event.ctrlKey==true && event.keyCode==13)){this.document.sendmessage"& i &".button.click();}}</script>"&_
"操作:<a href=""showmessages.asp?delid="& rs("id") &""" title=""删除该密信"">删除</a>  回复:<font title=""回复密信后将自动删除本条密信""><input name=""delmessage"" type=""checkbox"" value=""yes"" checked>回复后删除</font>"&_
"<input type=""hidden"" name=""oldid"" value="""& rs("id") &"""> <input name=""button"" type=""submit"" value=""提交"" onmouseover=""this.className='over';"" onmouseout=""this.className='out';"" class=""out"">"&_
"<br><textarea name=""content"" rows=""8"" cols=""53""></textarea>"&_
"</td></tr></form>"
end if
rs.MoveNext
Next
end if
rs.Close
end if
end if
end if
contents=contents &"</table>"&_
""&_
"<tr>"
%>
<!--#include file="bottom.asp"-->