guidangpostforadmin.asp
来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 160 行
ASP
160 行
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
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
%>
<!--#include file="../../Connections/oavbsconn.asp" -->
<%dim id,ip,types,beizhu,chexiaofou,baoliubeizhu
id=request("id")
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR")
types=request("接收部门")
beizhu=request("fuyan")
chexiaofou=request("撤消归档")
baoliubeizhu=request("保留备注")
%>
<%
if len(beizhu)>65535then
Response.Write("<script>alert(""您输入的备注内容超出数据库极限,系统最多接收的字符是65535个!"");location=""javascript:history.back()"";</script>")
Response.End
end if
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request("ID") <> "") Then
Recordset1__MMColParam = Request("ID")
End If
%>
<%
Dim Recordset1__u
Recordset1__u = "1"
If (Session("userssdfgfhtrh") <> "") Then
Recordset1__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT * FROM 归档收发文db WHERE 收发文ID = " + Replace(Recordset1__MMColParam, "'", "''") + " and 归档人帐号='" + Replace(Recordset1__u, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType =3
Recordset1.Open()
if not Recordset1.eof or not Recordset1.bof then
if chexiaofou="" then
Recordset1("类别")=types
if baoliubeizhu="" then
Recordset1("备注")=beizhu
end if
Recordset1("归档更新时间")=now()
Recordset1.update
end if
if chexiaofou="1" then
Recordset1.delete
Recordset1.update
end if
Recordset1_numRows = 0
%>
<%
Dim Recordset2__d
Recordset2__d = "1"
If (Request("ID") <> "") Then
Recordset2__d = Request("ID")
End If
%>
<%
Dim Recordset2__u
Recordset2__u = "1"
If (Session("userssdfgfhtrh") <> "") Then
Recordset2__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT * FROM shouwen WHERE 添加人帐号 ='" + Replace(Recordset2__u, "'", "''") + "' and 拟稿人删除<>'是' and shouwen.id=" + Replace(Recordset2__d, "'", "''") + ""
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 3
Recordset2.Open()
if not Recordset2.eof or not Recordset2.bof then
if chexiaofou="" then
Recordset2("归档更新时间")=now()
Recordset2("归档人")=session("names")
Recordset2("归档否")="是"
Recordset2("归档类别")=types
Recordset2.update
end if
if chexiaofou="1" then
Recordset2("归档否")="否"
Recordset2("归档结果")="未归档"
Recordset2.update
end if
Recordset2_numRows = 0
%>
<%end if%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
if chexiaofou<>"1" then %>
<script>
{
alert("收文归档更新成功。");history.go(-2)
}
</script>
<%else%>
<script>
{
alert("收文归档撤消成功。");history.go(-2)
}
</script>
<%end if%>
<%else%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<script>
{
alert("该收文已归档或记录不存在");history.go(-1)
}
</script>
<%response.end()
end if%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?