qianyuepost.asp

来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 195 行

ASP
195
字号
<%@LANGUAGE="VBSCRIPT"%>
<%  
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 yijian,id,q
id=request("id")
yijian=request.form("yijian")
q=request("q")
%>
<%
if yijian="" then 
	  Response.Write("<script>alert(""请输入审批意见!"");location=""javascript:history.back()"";</script>")  
	  Response.End
  end if
%>
<%
if  len(yijian)>65535then 
	  Response.Write("<script>alert(""您输入的内容超出数据库极限,系统最多接收的字符是65535个!"");location=""javascript:history.back()"";</script>")  
	  Response.End
  end if
%>
<%
Dim img__MMColParam
img__MMColParam = "1"
If (session("names") <> "") Then 
  img__MMColParam = session("names")
End If
%>
<%
Dim img
Dim img_numRows
Set img = Server.CreateObject("ADODB.Recordset")
img.ActiveConnection = MM_oavbsconn_STRING
img.Source = "SELECT fawenforimg  FROM usertertggbng  WHERE names = '" + Replace(img__MMColParam, "'", "''") + "'"
img.CursorType = 0
img.CursorLocation = 2
img.LockType = 1
img.Open()
img_numRows = 0
%>
<%if not img.eof or not img.bof then
dim imgp
imgp=img("fawenforimg")
end if
%>
<%
Dim Recordset1__u
Recordset1__u = "1"
If (Session("userssdfgfhtrh") <> "") Then 
  Recordset1__u = Session("userssdfgfhtrh")
End If
%>
<%
Dim Recordset1__d
Recordset1__d = "1"
If (id <> "") Then 
  Recordset1__d = id
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM fawenyijian  WHERE 审批id=" + Replace(Recordset1__d, "'", "''") + " and 审批人帐号='" + Replace(Recordset1__u, "'", "''") + "'and 意见类型='签阅'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 3
Recordset1.LockType = 3
Recordset1.Open()
if Recordset1.eof and Recordset1.bof then
Recordset1.addnew
Recordset1("审批id")=id
Recordset1("审批意见")=yijian
Recordset1("电子签名")=imgp
Recordset1("审批签阅结果")=request("审核结果")
Recordset1("审批人帐号")=Session("userssdfgfhtrh")
Recordset1("审批人姓名")=Session("names")
Recordset1("审批人部门")=Session("bumen")
Recordset1("意见类型")="签阅"

Recordset1.update
Recordset1_numRows = 0
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Dim r__d
r__d = "1"
If (request("id") <> "") Then 
  r__d = request("id")
End If
%>
<%
Dim r
Dim r_numRows
Set r = Server.CreateObject("ADODB.Recordset")
r.ActiveConnection = MM_oavbsconn_STRING
r.Source = "SELECT *  FROM fawen where id=" + Replace(r__d, "'", "''") + ""
r.CursorType = 0
r.CursorLocation = 2
r.LockType = 3
r.Open()
if not r.eof or not r.bof then
if r("签阅人")="" then
r("签阅人")=session("names")
end if

r("导入签发图片")=imgp
r("已会签人列表")=r("已会签人列表")&"|"&session("names")


r.update
else
end if
r_numRows = 0
%>
<%
Dim huiqian__MMColParam
huiqian__MMColParam = "1"
If (Request("id") <> "") Then 
  huiqian__MMColParam = Request("id")
End If
%>
<%
Dim huiqian__u
huiqian__u = "1"
If (session("names") <> "") Then 
  huiqian__u = session("names")
End If
%>
<%
Dim huiqian
Dim huiqian_numRows
Set huiqian = Server.CreateObject("ADODB.Recordset")
huiqian.ActiveConnection = MM_oavbsconn_STRING
huiqian.Source = "SELECT *  FROM fawenhuiqian  WHERE 发文id = " + Replace(huiqian__MMColParam, "'", "''") + " and 会签人='" + Replace(huiqian__u, "'", "''") + "'"
huiqian.CursorType = 0
huiqian.CursorLocation = 2
huiqian.LockType = 3
huiqian.Open()
if not huiqian.eof or not huiqian.bof then
huiqian("是否会签完毕")="是"
huiqian.update
end if
huiqian_numRows = 0
%>
<%
r.Close()
Set r = Nothing
%>
<%
huiqian.Close()
Set huiqian = Nothing
%>
<%
img.Close()
Set img = Nothing
%>
<%response.redirect "doshenforqianyeu.asp?id="&cint(id)%>
<%else%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<script>
{
alert("很抱歉,该发文您已经签阅。");history.go(-1)
}
</script>
<%response.end()
end if%>

⌨️ 快捷键说明

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