⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_sms.asp

📁 本系统是一套开源WEB的网站管理系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
	<input type="checkbox" name="selectAll" onClick="selectedAll(this.form)" id="ckeckall"><label for="ckeckall">选择所有</label>&nbsp;
	<input type="hidden" name="operation">
	<input type="submit" name="deleclear" class="other_button" onClick="this.form.operation.value='maosin_delbox'" value="删除所选">&nbsp;
	<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 recycleBox()
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
		if sms_count<>0 then
			sql="delete from ms_sms  where sms_id in ("&sms_id&") and (incept_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delRe=1) or (send_user='"&userinfo(1)&"' and sms_isSend=0 and sms_delSe=1)"
			conn.execute(sql)
			conn.execute("update ms_sms set sms_delSe=2 where sms_id in ("&sms_id&") and send_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delSe=1")
			message="恭喜恭喜,您已经彻底删除了废件箱的"&sms_count&"条短信"
			showmsg message,"操作成功信息"
		else
			response.write("<script>alert('您没有选择任何操作');window.history.go(-1);</script>")
		end if
	elseif CStr(request.Form("operation"))="maosin_clrbox" then
		sql="delete from ms_sms where (incept_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delRe=1) or (send_user='"&userinfo(1)&"' and sms_isSend=0 and sms_delSe=1)"
		message="恭喜恭喜,您已经彻底删除了废件箱的短信"
		conn.execute(sql)
		conn.execute("update ms_sms set sms_delSe=2 where send_user='"&userinfo(1)&"' and sms_isSend=0 and sms_delSe=1")
		showmsg message,"操作成功信息"
	end if
	exit sub
End if
sql="select * from ms_sms where (incept_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delRe=1) or (send_user='"&userinfo(1)&"' and sms_isSend=0 and sms_delSe=1) or (send_user='"&userinfo(1)&"' and sms_issend=1 and sms_delSe=1)"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,connstr,1,1,"&H0001"
n=20'每页显示记录数
url="?action=sms&operation=recycleBox&"
nextpage=pagetitle(rs,n,url,"条短信")
%>
	<table width="100%" border="0" cellpadding="1" cellspacing="1" class="tableBC">
		<tr><td colspan="5" height="22" class="tdT">&nbsp;我的废旧箱</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=recycleBox">	
	<%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">
		  <%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>&nbsp;<a href="?action=sms&operation=showsms&box=recycleBox&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 class="tdBC" valign="middle" align="right" 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>&nbsp;
	<input type="hidden" name="operation">
	<input type="submit" name="deleclear" class="other_button" onClick="this.form.operation.value='maosin_delbox'" value="删除所选">&nbsp;
	<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 smsIsSend()
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
		if sms_count<>0 then
			sql="update ms_sms set sms_delSe=1 where sms_id in ("&sms_id&") and  send_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delSe=0 and sms_delRe=0"
			conn.execute(sql)
			message="恭喜恭喜,您已成功删除了"&sms_count&"条短信到废件箱"
			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=1 and sms_delSe=0 and sms_delRe=0"
		conn.execute(sql)
		message="恭喜恭喜,您已成功清空已发送的短信到废件箱"
		showmsg message,"操作成功信息"
	end if
	exit sub
End if
sql="select * from ms_sms where send_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=smsIsSend&"
nextpage=pagetitle(rs,n,url,"条短信")
%>
	<table width="100%" border="0" cellpadding="1" cellspacing="1" class="tableBC">
		<tr><td colspan="5" height="22" class="tdT">&nbsp;已发送短信</td></tr>
        <tr valign="middle" align="center" class="intdT"> 
          <td width="40" height="26">已 读</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=smsIsSend">	
	<%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">
		  <%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>&nbsp;<a href="?action=sms&operation=showsms&box=isSendBox&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 class="tdBC" valign="middle" align="right" 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>&nbsp;
	<input type="hidden" name="operation">
	<input type="submit" name="deleclear" class="other_button" onClick="this.form.operation.value='maosin_delbox'" value="删除所选">&nbsp;
	<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 showsms()
dim sms_id,sql,rs,sms_title,sms_content,sendtitle
sms_id=request.querystring("sms_id")
if not isNumeric(sms_id) then
	showmsg "<font color=""#ff0000"">系统返回如下信息:</font><br><br><li>请输入一个正确的整型参数</li>","出错信息"
	exit sub
end if
set rs=Server.CreateObject("ADODB.RecordSet")
if	request("box")="recycleBox" then
	sql="select * from ms_sms where sms_id="&sms_id&" and (incept_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delRe=1) or (send_user='"&userinfo(1)&"' and sms_isSend=0 and sms_delSe=1) or (send_user='"&userinfo(1)&"' and sms_issend=1 and sms_delSe=1)"
elseif request("box")="isSendBox" then
	sql="select * from ms_sms where sms_id="&sms_id&" and send_user='"&userinfo(1)&"' and sms_isSend=1 and sms_delSe=0 and sms_delRe=0"
else
	sql="select * from ms_sms where sms_id="&sms_id&" and incept_user='"&userInfo(1)&"' and sms_isSend=1 and sms_delSe=0 and sms_delRe=0"
end if
rs.Open sql,connstr,1,3
if not rs.eof and not rs.bof then
	if request("box")="inceptBox" then
		rs("sms_isRead")=true
		rs.update
	end if
	sms_title=rs("sms_title")
	sms_content=rs("sms_content")
	sendtitle=rs("send_user")&" 于 "&rs("sms_date")&" 发送给您的短信!"
	rs.close
	set rs=nothing
else
	showmsg "<font color=""#ff0000"">系统返回如下信息:</font><br><br><li>没有此短信,或者您没有权限查看此短信</li><li><a href="""&request.servervariables("http_referer")&""">单击这里返回</a></li>","出错信息"
	exit sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -