📄 usersms.asp
字号:
Founderr=true
exit sub
end if
rs.close
set rs=nothing
else
Errmsg=Errmsg+"<br>"+"<li>请指定相关参数。"
Founderr=true
exit sub
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="savedit">
<input type=hidden name="id" value="<%=id%>">
<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>
<input type=text name="touser" value="<%=incept%>" size=70>
</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=70 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=""><%=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 read()
if request("id")="" or not isNumeric(request("id")) then
Errmsg=Errmsg+"<br>"+"<li>请指定相关参数。"
Founderr=true
exit sub
end if
set rs=server.createobject("adodb.recordset")
if request("action")="read" then
sql="update message set flag=1 where ID="&cstr(request("id"))
conn.execute(sql)
end if
sql="select * from message where (incept='"&membername&"' or sender='"&membername&"') and id="&cstr(request("id"))
rs.open sql,conn,1,1
if rs.eof and rs.bof then
errmsg=errmsg+"<br>"+"<li>你是不是跑到别人的信箱啦、或者该信息已经收件人删除。"
founderr=true
end if
if not founderr then
%>
<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%> align=center><font color="<%=TableFontColor%>"><b>欢迎使用短消息接收,<%=membername%></b></font></td>
</tr>
<tr>
<td bgcolor=<%=aTabletitlecolor%>><font color="<%=TableContentColor%>">
<%if request("action")="outread" then%>
在<b><%=rs("sendtime")%></b>,您发送此消息给<b><%=htmlencode(rs("incept"))%></b>!
<%else%>
在<b><%=rs("sendtime")%></b>,<b><%=htmlencode(rs("sender"))%></b>给您发送的消息!
<%end if%></font></td>
</tr>
<tr>
<td bgcolor=<%=Tablebodycolor%> valign=top align=left><font color=<%=TableContentColor%>>
<b>消息标题:<%=htmlencode(rs("title"))%></b><hr size=1>
<%=ubbcode(rs("content"))%></font>
</td>
</tr>
</table></td></tr></table>
<%end if%>
<%
rs.close
set rs=nothing
end sub
sub savemsg()
if request("touser")="" then
errmsg=errmsg+"<br>"+"<li>您忘记填写发送对象了吧。"
founderr=true
else
incept=request("touser")
incept=split(incept,",")
end if
if request("title")="" then
errmsg=errmsg+"<br>"+"<li>您还没有填写标题呀。"
founderr=true
else
title=request("title")
end if
if request("message")="" then
errmsg=errmsg+"<br>"+"<li>内容是必须要填写的噢。"
founderr=true
else
message=request("message")
end if
if not founderr then
for i=0 to ubound(incept)
set rs=server.createobject("adodb.recordset")
sql="select username from [user] where username='"&incept(i)&"'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
errmsg=errmsg+"<br>"+"<li>论坛没有这个用户,看看你的发送对象写对了嘛?"
founderr=true
end if
rs.close
set rs=nothing
if not founderr then
if request("Submit")="发送" then
sql="insert into message (incept,sender,title,content,sendtime,flag,issend) values ('"&incept(i)&"','"&membername&"','"&title&"','"&message&"',Now(),0,1)"
subtype="已发送信息"
else
sql="insert into message (incept,sender,title,content,sendtime,flag,issend) values ('"&incept(i)&"','"&membername&"','"&title&"','"&message&"',Now(),0,0)"
subtype="发件箱"
end if
conn.execute(sql)
if i>4 then
errmsg=errmsg+"<br>"+"<li>最多只能发送给5个用户,您的名单5位以后的请重新发送"
founderr=true
exit for
end if
end if
next
if not founderr then
msg=msg+"<br>"+"<li><b>恭喜您,发送短信息成功。</b><br>发送的消息同时保存在您的"&subtype&"中。"
call success()
end if
end if
end sub
sub savedit()
if request("id")="" or not isNumeric(request("id")) then
Errmsg=Errmsg+"<br>"+"<li>请指定相关参数。"
Founderr=true
exit sub
end if
if request("touser")="" then
errmsg=errmsg+"<br>"+"<li>您忘记填写发送对象了吧。"
founderr=true
exit sub
else
incept=request("touser")
end if
if request("title")="" then
errmsg=errmsg+"<br>"+"<li>您还没有填写标题呀。"
founderr=true
exit sub
else
title=request("title")
end if
if request("message")="" then
errmsg=errmsg+"<br>"+"<li>内容是必须要填写的噢。"
founderr=true
exit sub
else
message=request("message")
end if
if not founderr then
set rs=server.createobject("adodb.recordset")
sql="select username from [user] where username='"&incept&"'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
errmsg=errmsg+"<br>"+"<li>论坛没有这个用户,看看你的发送对象写对了嘛?"
founderr=true
exit sub
end if
rs.close
set rs=nothing
if not founderr then
if request("Submit")="发送" then
sql="update message set incept='"&incept&"',sender='"&membername&"',title='"&title&"',content='"&message&"',sendtime=Now(),flag=0,issend=1 where id="&request("id")
subtype="已发送信息"
else
sql="update message set incept='"&incept&"',sender='"&membername&"',title='"&title&"',content='"&message&"',sendtime=Now(),flag=0,issend=0 where id="&request("id")
subtype="发件箱"
end if
conn.execute(sql)
end if
if not founderr then
msg=msg+"<br>"+"<li><b>恭喜您,发送短信息成功。</b><br>发送的消息同时保存在您的"&subtype&"中。"
call success()
end if
end if
end sub
sub success()
%>
<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 align="center">
<td width="100%" bgcolor=<%=Tabletitlecolor%>><font color="<%=TablefontColor%>">成功:短信息</font></td>
</tr>
<tr>
<td width="100%" bgcolor=<%=Tablebodycolor%>><font color="<%=TableContentColor%>"><%=msg%></font>
</td>
</tr>
</table> </td></tr></table>
<%
end sub
sub newmsg()
%>
<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 align="center">
<td width="100%" bgcolor=<%=Tabletitlecolor%>><font color="<%=TablefontColor%>">短消息通知</font></td>
</tr>
<tr>
<td width="100%" bgcolor=<%=Tablebodycolor%> align=center><br>
<a href=usersms.asp?action=inbox><img src="<%=picurl%>newmail.gif" border=0>有新的短消息</a><br>
<br>
<a href=usersms.asp?action=inbox>按此查看</a><br><br>
</td>
</tr>
</table> </td></tr></table>
<%
end sub
stats="发送短信"
call endline()
%>
<script language="JavaScript">
<!--
function CheckAll(form) {
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
//-->
</script>
<!--#include file="footer.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -