📄 usersms.asp
字号:
</table></td></tr></table></form>
<%
end sub
'已发送逻辑删除,置于回收站,入口字段delS,可用于批量及单个删除
'delS:0未操作,1发送者删除,2发送者从回收站删除
sub delissend()
delid=request("id")
if delid="" or isnull(delid) then
Errmsg=Errmsg+"<li>"+"请选择相关参数。"
Founderr=true
else
conn.execute("update message set delS=1 where sender='"&trim(membername)&"' and issend=1 and id in ("&delid&")")
msg=msg+"<br>"+"<li><b>恭喜您,删除短信息成功。</b><br>删除的消息将转移到您的回收站。"
call success()
end if
end sub
sub AllDelissend()
conn.execute("update message set delS=1 where sender='"&trim(membername)&"' and delS=0 and issend=1")
msg=msg+"<br>"+"<li><b>恭喜您,删除短信息成功。</b><br>删除的消息将转移到您的回收站。"
call success()
end sub
'回收站
sub recycle()
%>
<form action="usersms.asp" method=post name=inbox>
<table cellpadding=0 cellspacing=0 border=0 width=<%=TableWidth%> bgcolor=<%=Tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr bgcolor=<%=Tabletitlecolor%>>
<td align=center valign=middle width=30><font color="<%=TableFontColor%>"><b>已读</b></font></td>
<td align=center valign=middle width=100><font color="<%=TableFontColor%>"><b>名字</b></font></td>
<td align=center valign=middle width=300><font color="<%=TableFontColor%>"><b>主题</b></font></td>
<td align=center valign=middle width=150><font color="<%=TableFontColor%>"><b>日期</b></font></td>
<td align=center valign=middle width=50><font color="<%=TableFontColor%>"><b>大小</b></font></td>
<td align=center valign=middle width=30><font color="<%=TableFontColor%>"><b>操作</b></font></td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from message where ((sender='"&trim(membername)&"' and delS=1) or (incept='"&trim(membername)&"' and delR=1)) and not delS=2 order by sendtime desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
%>
<tr>
<td bgcolor=<%=Tablebodycolor%> align=center valign=middle colspan=6><font color="<%=TableContentColor%>">您的废件箱中没有任何内容。</font></td>
</tr>
<%else%>
<%do while not rs.eof%>
<tr bgcolor=<%if rs("flag")=0 then%>"<%=aTablebodycolor%>"<%else%>"<%=Tablebodycolor%>"<%end if%>>
<td align=center valign=middle><font face="宋体" color="#333333"><%if rs("flag")=0 then%><img src="pic/m_news.gif"><%else%><img src="pic/m_olds.gif"><%end if%></font></td>
<td align=center valign=middle><%if rs("flag")=0 then%><b><%end if%><a href="dispuser.asp?name=<%=htmlencode(rs("incept"))%>" target=_blank><%=htmlencode(rs("incept"))%></a></td>
<td align=left><a href="usersms.asp?action=read&id=<%=rs("id")%>"><%if rs("flag")=0 then%><b><%end if%><%=htmlencode(rs("title"))%></a> </td>
<td><font color="<%=TableContentColor%>"><%if rs("flag")=0 then%><b><%end if%><%=rs("sendtime")%></font></td>
<td><font color="<%=TableContentColor%>"><%if rs("flag")=0 then%><b><%end if%><%=len(rs("content"))%>Byte</font></td>
<td align=center valign=middle width=30><input type=checkbox name=id value=<%=rs("id")%>></td>
</tr>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<tr bgcolor="<%=Tabletitlecolor%>">
<td align=right valign=middle colspan=6><font color="<%=TablefontColor%>">节省每一分空间,请及时删除无用信息 <input type=checkbox name=chkall value=on onclick="CheckAll(this.form)">选中所有显示记录 <input type=submit name=action onclick="{if(confirm('确定删除选定的纪录吗?')){this.document.inbox.submit();return true;}return false;}" value="删除指定信息"> <input type=submit name=action onclick="{if(confirm('确定清除回收站所有的纪录吗?')){this.document.inbox.submit();return true;}return false;}" value="清空回收站"></font></td>
</tr>
</table></td></tr></table></form>
<%
end sub
'用户能完全删除收到信息和逻辑删除所发送信息,逻辑删除所发送信息设置入口字段delS参数为2
sub delrecycle()
delid=request("id")
'response.write delid
if delid="" or isnull(delid) then
Errmsg=Errmsg+"<li>"+"请选择相关参数。"
Founderr=true
exit sub
else
conn.execute("delete from message where incept='"&membername&"' and delR=1 and id in ("&delid&")")
conn.execute("update message set delS=2 where sender='"&trim(membername)&"' and delS=1 and id in ("&delid&")")
msg=msg+"<br>"+"<li><b>恭喜您,删除短信息成功。</b><br>删除的消息将不可恢复。"
call success()
end if
end sub
sub AllDelrecycle()
conn.execute("delete from message where incept='"&membername&"' and delR=1")
conn.execute("update message set delS=2 where sender='"&trim(membername)&"' and delS=1")
msg=msg+"<br>"+"<li><b>恭喜您,删除短信息成功。</b><br>删除的消息将不可恢复。"
call success()
end sub
sub delete()
delid=request("id")
if not isNumeric(request("id")) or delid="" or isnull(delid) then
Errmsg=Errmsg+"<li>"+"请选择相关参数。"
Founderr=true
else
conn.execute("update message set delR=1 where incept='"&trim(membername)&"' and id="&delid)
conn.execute("update message set delS=1 where sender='"&trim(membername)&"' and id="&delid)
msg=msg+"<br>"+"<li><b>恭喜您,删除短信息成功。</b><br>删除的消息将置于您的回收站内。"
call success()
end if
end sub
'发送信息
sub sendmsg()
if request("id")<>"" and isNumeric(request("id")) then
set rs=server.createobject("adodb.recordset")
sql="select sendtime,title,content from message where incept='"&membername&"' and id="&request("id")
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
sendtime=rs("sendtime")
title="RE " & rs("title")
content=rs("content")
end if
rs.close
set rs=nothing
end if
%>
<form action="usersms.asp" method=post name=messager>
<table cellpadding=0 cellspacing=0 border=0 width=<%=TableWidth%> bgcolor=<%=Tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr>
<td bgcolor=<%=Tabletitlecolor%> colspan=2 align=center>
<input type=hidden name="action" value="send">
<font color="<%=TablefontColor%>"><b>发送短消息</b>--请完整输入下列信息</font></td>
</tr>
<tr>
<td bgcolor=<%=Tablebodycolor%> valign=middle width=70><font color="<%=TableContentColor%>"><b>收件人:</b></font></td>
<td bgcolor=<%=Tablebodycolor%> valign=middle><font color="<%=TableContentColor%>">
<input type=text name="touser" value="<%=request("touser")%>" size=50>
<SELECT name=font onchange=DoTitle(this.options[this.selectedIndex].value)>
<OPTION selected value="">选择</OPTION>
<%
set rs=server.createobject("adodb.recordset")
sql="select F_friend from Friend where F_username='"&membername&"' order by F_addtime desc"
rs.open sql,conn,1,1
do while not rs.eof
%>
<OPTION value="<%=rs(0)%>"><%=rs(0)%></OPTION>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
</SELECT>
使用逗号(,)分开,最多5位用户</font>
</td>
</tr>
<tr>
<td bgcolor=<%=Tablebodycolor%> valign=top><font color="<%=TableContentColor%>"><b>标题:</b></font></td>
<td bgcolor=<%=Tablebodycolor%> valign=middle><font color="<%=TableContentColor%>">
<input type=text name="title" size=50 maxlength=80 value="<%=title%>"> 请限定50字内</font>
</td>
</tr>
<tr>
<td bgcolor=<%=Tablebodycolor%> valign=top><font color="<%=TableContentColor%>"><b>内容:</b><br></font></td>
<td bgcolor=<%=Tablebodycolor%> valign=middle>
<textarea cols=70 rows=8 name="message" title="">
<%if request("id")<>"" then%>
============= 在 <%=sendtime%> 您来信中写道: ============
<%=content%>
========================================================<%end if%></textarea>
</td>
</tr>
<tr>
<td bgcolor=<%=Tabletitlecolor%> valign=middle colspan=2 align=center>
<input type=Submit value="发送" name=Submit>
<input type=Submit value="保存" name=Submit>
<input type="reset" name="Clear" value="清除">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<%
end sub
'转发信息
sub fw()
if request("id")<>"" and isNumeric(request("id")) then
set rs=server.createobject("adodb.recordset")
sql="select title,content,sender from message where (incept='"&membername&"' or sender='"&membername&"') and id="&request("id")
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Errmsg=Errmsg+"<br>"+"<li>请选择相关参数。"
Founderr=true
exit sub
else
title=rs("title")
content=rs("content")
sender=rs("sender")
end if
rs.close
set rs=nothing
end if
%>
<form action="usersms.asp" method=post name=messager>
<table cellpadding=0 cellspacing=0 border=0 width=<%=TableWidth%> bgcolor=<%=Tablebackcolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr>
<td bgcolor=<%=Tabletitlecolor%> colspan=2 align=center>
<input type=hidden name="action" value="send">
<font color="<%=TablefontColor%>"><b>发送短消息</b>--请完整输入下列信息</font></td>
</tr>
<tr>
<td bgcolor=<%=Tablebodycolor%> valign=middle width=70><font color="<%=TableContentColor%>"><b>收件人:</b></font></td>
<td bgcolor=<%=Tablebodycolor%> valign=middle><font color="<%=TableContentColor%>">
<input type=text name="touser" value="<%=request("touser")%>" size=50> 使用逗号(,)分开,最多5位用户</font>
</td>
</tr>
<tr>
<td bgcolor=<%=Tablebodycolor%> valign=top><font color="<%=TableContentColor%>"><b>标题:</b></font></td>
<td bgcolor=<%=Tablebodycolor%> valign=middle><font color="<%=TableContentColor%>">
<input type=text name="title" size=50 maxlength=80 value="Fw:<%=title%>"> 请限定50字内</font>
</td>
</tr>
<tr>
<td bgcolor=<%=Tablebodycolor%> valign=top><font color="<%=TableContentColor%>"><b>内容:</b><br></font></td>
<td bgcolor=<%=Tablebodycolor%> valign=middle>
<textarea cols=70 rows=8 name="message" title="">
========== 下面是转发信息 =========
原发件人:<%=sender%><%=chr(13)&chr(13)%>
<%=content%>
===================================</textarea>
</td>
</tr>
<tr>
<td bgcolor=<%=Tabletitlecolor%> valign=middle colspan=2 align=center>
<input type=Submit value="发送" name=Submit>
<input type=Submit value="保存" name=Submit>
<input type="reset" name="Clear" value="清除">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<%
end sub
'更改信息
sub edit()
if request("id")<>"" or isNumeric(request("id")) then
set rs=server.createobject("adodb.recordset")
sql="select id,incept,title,content from message where sender='"&membername&"' and issend=0 and id="&request("id")
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
incept=rs("incept")
title=rs("title")
content=rs("content")
id=rs("id")
else
Errmsg=Errmsg+"<br>"+"<li>没有找到您要编辑的信息。"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -