📄 writepost2forsbanli.asp
字号:
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="../../index.asp"
MM_grantAccess=false
If Session("userssdfgfhtrh") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%server.ScriptTimeout=6000%>
<%'on error resume next%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<%
if request.form("sendto")="|" then
Response.Write("<script>alert(""请选择接收对象!"");location=""javascript:history.back()"";</script>")
Response.End
end if
%>
<%
if left(request.form("sendto"),6)="|请选择对象" then
Response.Write("<script>alert(""请选择接收对象!"");location=""javascript:history.back()"";</script>")
Response.End
end if
%>
<%
if request.form("sendto")="" then
Response.Write("<script>alert(""请增加接收对象!"");location=""javascript:history.back()"";</script>")
Response.End
end if
%>
<%
if len(request("标题"))>255then
Response.Write("<script>alert(""接收人与审批事由标题内容超出数据库极限,系统最多接收的字符是255个!"");location=""javascript:history.back()"";</script>")
Response.End
end if
%>
<%sendto=request("sendto")%>
<!--#include file="../../Connections/ifr/ifrasp.asp" -->
<%
dim mysendto,sendto
sendto=request("sendto")
mysendto=split(sendto,"|",-1,1)
'a=splict("128,201,203",",")
for i=0 to ubound(mysendto)
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT 标题,sp类型,内容,接收人姓名,发送人姓名,发送人帐号,sms接收部门,入库日期,信息属性,sms发送人level,发送人部门,sms是否为群发,spid FROM infoall"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 3
Recordset2.LockType = 3
Recordset2.Open()
Recordset2.addnew
Recordset2("sms接收部门")=request.form("userdept")
Recordset2("标题")=request.form("标题")
Recordset2("内容")=request.form("content")
Recordset2("接收人姓名")=mysendto(i)
Recordset2("发送人姓名")=request.form("发送人姓名")
Recordset2("发送人帐号")=request.form("发送人帐号")
Recordset2("入库日期")=request.form("datas")
Recordset2("信息属性")=request.form("信息属性")
Recordset2("发送人部门")=session("bumen")
Recordset2("sms发送人level")=Session("levels")
Recordset2("sms是否为群发")="否"
Recordset2("spid")=session("spidup")
Recordset2("sp类型")=request("sptype")
Recordset2.update
Recordset2_numRows = 0
next
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_oavbsconn_STRING
Command1.CommandText = "DELETE FROM infoall WHERE 接收人姓名='' and (信息属性='短消息' or 信息属性='短消息回复') "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
set Command2 = Server.CreateObject("ADODB.Command")
Command2.ActiveConnection = MM_oavbsconn_STRING
Command2.CommandText = "DELETE FROM infoall WHERE (信息属性='短消息' or 信息属性='短消息回复') and (接收人姓名='请选择接收对象' or 接收人姓名='对所有人群发' or 接收人姓名='请选择对象') "
Command2.CommandType = 1
Command2.CommandTimeout = 0
Command2.Prepared = true
Command2.Execute()
Session.Contents.Remove("smmsgetnames")
Session.Contents.Remove("shenpishiyou")
Session.Contents.Remove("shenqingren")
%>
<%
Dim huizhi__MMColParam
huizhi__MMColParam = "1"
If ("|"&session("names") <> "") Then
huizhi__MMColParam = "|"&session("names")
End If
%>
<%
Dim huizhi__d
huizhi__d = "1"
If (REQUEST("id") <> "") Then
huizhi__d = REQUEST("id")
End If
%>
<%
Dim huizhi,h,p,m
Dim huizhi_numRows
h=request("huizhi")
p=request("sendto")
m=request("many")
Set huizhi = Server.CreateObject("ADODB.Recordset")
huizhi.ActiveConnection = MM_oavbsconn_STRING
huizhi.Source = "SELECT id ,是否回执,接收人,办理人,是否显示列表 FROM shouwen WHERE id=" + Replace(huizhi__d, "'", "''") + " and 接收人 like '%" + Replace(huizhi__MMColParam, "'", "''") + "%' ORDER BY id desc"
huizhi.CursorType = 0
huizhi.CursorLocation = 2
huizhi.LockType = 3
huizhi.Open()
huizhi("接收人")=p&huizhi("接收人")
huizhi("办理人")=p
if m="是" then
huizhi("是否显示列表")="是"
else
huizhi("是否显示列表")="否"
end if
huizhi.update
huizhi_numRows = 0
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
huizhi.Close()
Set huizhi = Nothing
%>
<%session("shenpishiyou")=shiyou
session("shenqingren")=shengqingren
%>
<script language="javascript">
<!--
alert("收文提交完毕,请等待受理!");window.location.href="../shouwen/getshenlist.asp"
-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -