📄 user_sms.asp
字号:
<!--#include file="user_popedom.asp"-->
<!--#include file="include/ms_ubb.asp"-->
<%
'==============================================================
'程序名称:茂盛网站管理系统(Maoin CSM)
'当前版本:Maosin CMS Version 1.1 Powered by maosin.com
'程序作者:阿茂(李胜茂)
'网站地址:www.maosin.com www.maosin.net
' QQ:57861417
'电子邮箱:maosin@163.com maosin@maosin.com
'--------------------------------------------------------------
'Copyright (C) 2006 maosin.com All Rights Reserved.
'免费版本请在程序首页保留(Powered by:Maosin CMS)版权链接信息;
'您可以对此版本进行修改,美化,但请保留此ASP文件内的版权信息;
'茂盛设计网保留此软件的法律追究权利
'==============================================================
if session(userVar)=userVal then
userInfo=session("userinfo")
Dim sms_id,action:operation=Request.QueryString("operation")
sms_id=Request.QueryString("sms_id")
Call sms()
Select Case LCase(operation)
Case LCase("inceptbox")
Call inceptbox()
Case LCase("sendbox")
Call sendbox()
Case LCase("recycleBox")
Call recycleBox()
Case LCase("friendlist")%>
<!--#include file="user_friend.asp"-->
<% Call friendlist()
Case LCase("smsIsSend")
Call smsIsSend()
Case LCase("sendmessage"),LCase("edit"),LCase("replay"),LCase("fw")
Call smsOperation()
Case LCase("edit")
Call edit()
Case LCase("showsms")
Call showsms()
Case LCase("maosin_del")
Call deleteSms()
Case Else
Call inceptbox()
End Select
else
response.Write("此功能需要注册或登录本站才能用")
end if%>
<%
Sub sms()
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="rmc">
<tr>
<td height="50" align="center" valign="middle">
<a href="?action=sms&operation=inceptBox"><img src="images/sms/sms_inbox.gif" width="40" height="40" align="absmiddle" border="0"></a>
<a href="?action=sms&operation=sendBox"><img src="images/sms/sms_outbox.gif" width="40" height="40" align="absmiddle" border="0"></a>
<a href="?action=sms&operation=smsIsSend"><img src="images/sms/sms_issend.gif" width="40" height="40" align="absmiddle" border="0"></a>
<a href="?action=sms&operation=recycleBox"><img src="images/sms/sms_recycle.gif" width="40" height="40" align="absmiddle" border="0"></a>
<a href="?action=sms&operation=friendlist"><img src="images/sms/sms_address.gif" width="40" height="40" align="absmiddle" border="0"></a>
<a href="?action=sms&operation=sendmessage"><img src="images/sms/sms_write.gif" width="40" height="40" align="absmiddle" border="0"></a>
<%if lcase(operation)=lcase("showsms") or lcase(operation)=lcase("replay") or lcase(operation)=lcase("fw") then%>
<a href="?action=sms&operation=replay&sms_id=<%=sms_id%>"><img src="images/sms/sms_reply.gif" width="40" height="40" align="absmiddle" border="0"></a>
<a href="?action=sms&operation=fw&sms_id=<%=sms_id%>"><img src="images/sms/m_fw.gif" width="40" height="40" align="absmiddle" border="0"></a>
<a href="?action=sms&operation=maosin_del&sms_id=<%=sms_id%>"><img src="images/sms/m_delete.gif" width="40" height="40" align="absmiddle" border="0"></a></td>
<%end if%>
</tr>
</table>
<br/>
<%End Sub
Sub inceptbox()
If request.form("deleclear")<>"" Then
sms_count=Cint(request.form("sms_id").count)
if CStr(request.Form("operation"))="maosin_delbox" then
for i=1 to sms_count
if not isNumeric(request.form("sms_id")(i)) then
showmsg "编号ID参数应为整型参数","操作错误信息"
exit sub
end if
sms_id=sms_id&request.form("sms_id")(i)&","
next
sql="update ms_sms set sms_delRe=1 where sms_id in ("&sms_id&") and incept_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delSe=0 and sms_delRe=0"
message="恭喜恭喜,您已成功删除了"&sms_count&"条短信到废件箱"
if sms_count<>0 then
conn.execute(sql)
showmsg message,"操作成功信息"
else
response.write("<script>alert('您没有选择任何操作');window.history.go(-1);</script>")
end if
elseif CStr(request.Form("operation"))="maosin_clrbox" then
sql="update ms_sms set sms_delRe=1 where incept_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delSe=0 and sms_delRe=0"
message="恭喜恭喜,您已成功清空收信箱的短信到废旧箱"
conn.execute(sql)
showmsg message,"操作成功信息"
end if
exit sub
End if
sql="select * from ms_sms where incept_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delSe=0 and sms_delRe=0"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,connstr,1,1,"&H0001"
n=20'每页显示记录数
url="?action=sms&operation=inceptBox&"
nextpage=pagetitle(rs,n,url,"条短信")
%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" class="tableBC">
<tr><td colspan="5" height="22" class="tdT"> 我的收信箱</td></tr>
<tr align="center" class="intdT">
<td width="40" height="22">已 读</td>
<td width="100">发 信 人</td>
<td width="250">短 信 标 题</td>
<td width="120">发 送 时 间</td>
<td width="50">操 作</td>
</tr>
<form name="smsform" method="post" action="?action=sms&operation=inceptBox">
<%if (not rs.eof) and (not rs.bof) then
lineNo=1
Do While Not rs.Eof And lineNo<=rs.pagesize%>
<tr class="tdBC" valign="middle" align="center">
<td height="22">
<%if rs("sms_isread") then%>
<img src="images/sms/isread.gif" align="absmiddle">
<%else%>
<img src="images/sms/news.gif" align="absmiddle">
<%end if%>
</td>
<td><%=rs("send_user")%></td>
<td align="left"> <a href="?action=sms&operation=showsms&box=inceptBox&sms_id=<%=rs("sms_id")%>"><%=rs("sms_title")%></a></td>
<td><%=rs("sms_date")%></td>
<td><input type="checkbox" value="<%=rs("sms_id")%>" name="sms_id" id="sms_id"></td>
</tr>
<%lineNo=lineNo+1
rs.MoveNext
Loop
else
%>
<tr class="tdBC"><td colspan="5" height="40" valign="middle" align="center">您的收信箱没有短信!</td></tr>
<%end if
if rs.RecordCount>n then
%>
<tr class="tdBC" valign="middle" align="center"><td colspan="5"><%=nextpage%></td></tr>
<%end if%>
<tr class="tdBC" valign="middle" align="right"><td height="25" colspan="5">
<font class="font" color="#8B8B8B">为了节省空间,请及时删除无用的短信!</font>
<input type="checkbox" name="selectAll" onClick="selectedAll(this.form)" id="ckeckall"><label for="ckeckall">选择所有</label>
<input type="hidden" name="operation">
<input type="submit" name="deleclear" class="other_button" onClick="this.form.operation.value='maosin_delbox';" value="删除所选">
<input type="submit" name="deleclear" class="other_button" onClick="this.form.operation.value='maosin_clrbox'" value="清空收信箱">
</td></tr></form>
</table>
<script type="text/javascript">
function selectedAll(obj){
for(var i=0;i<obj.elements.length-4;i++){
obj.elements(i).checked=obj.selectAll.checked;
}
}
</script>
<%
rs.close
Set rs=Nothing
End Sub
Sub sendbox()
If request.form("deleclear")<>"" Then
sms_count=Cint(request.form("sms_id").count)
if CStr(request.Form("operation"))="maosin_delbox" then
for i=1 to sms_count
if not isNumeric(request.form("sms_id")(i)) then
showmsg "编号ID参数应为整型参数","操作错误信息"
exit sub
end if
sms_id=sms_id&request.form("sms_id")(i)&","
next
sql="update ms_sms set sms_delSe=1 where sms_id in ("&sms_id&") and send_user='"&userinfo(1)&"' and sms_isSend=0 and sms_delSe=0 and sms_delRe=0"
message="恭喜恭喜,您已成功删除了"&sms_count&"条短信到废件箱"
if sms_count<>0 then
conn.execute(sql)
showmsg message,"操作成功信息"
else
response.write("<script>alert('您没有选择任何操作');window.history.go(-1);</script>")
end if
elseif CStr(request.Form("operation"))="maosin_clrbox" then
sql="update ms_sms set sms_delSe=1 where send_user='"&userinfo(1)&"' and sms_isSend=0 and sms_delSe=0 and sms_delRe=0"
message="恭喜恭喜,您已成功清空发信箱的短信到废旧箱"
conn.execute(sql)
showmsg message,"操作成功信息"
end if
exit sub
End if
sql="select * from ms_sms where send_user='"&userinfo(1)&"' and sms_isSend=0 and sms_delSe=0 and sms_delRe=0"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open sql,connstr,1,1
n=20'每页显示记录数
url="?action=sms&operation=sendBox&"
nextpage=pagetitle(rs,n,url,"条短信")
%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" class="tableBC">
<tr><td colspan="5" height="22" class="tdT"> 我的发信箱</td></tr>
<tr valign="middle" align="center" class="intdT">
<td width="40" height="22">已 读</td>
<td width="100">收 信 人</td>
<td width="250">短 信 标 题</td>
<td width="120">发 送 时 间</td>
<td width="50">操 作</td>
</tr>
<form name="smsform" method="post" action="?action=sms&operation=sendBox">
<%if (not rs.eof) and (not rs.bof) then
lineNo=1
Do While Not rs.Eof And lineNo<=rs.pagesize%>
<tr class="tdBC" valign="middle" align="center">
<td height="24">
<img src="images/sms/sms_issend_.gif" align="absmiddle">
</td>
<td><%=rs("incept_user")%></td>
<td> <a href="?action=sms&operation=edit&sms_id=<%=rs("sms_id")%>"><%=rs("sms_title")%></a></td>
<td><%=rs("sms_date")%></td>
<td><input type="checkbox" value="<%=rs("sms_id")%>" name="sms_id"></td>
</tr>
<%lineNo=lineNo+1
rs.MoveNext
Loop
else
%>
<tr class="tdBC" valign="middle" align="center"><td colspan="5" height="40">您的发信箱没有短信!</td></tr>
<%end if
if rs.RecordCount>n then
%>
<tr class="tdBC" valign="middle" align="center"><td colspan="5"><%=nextpage%></td></tr>
<%end if%>
<tr><td height="25" class="tdBC" valign="middle" align="right" colspan="5">
<font class="font" color="#8B8B8B">为了节省空间,请及时删除无用的短信!</font>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -