updatepost.asp
来自「绿叶oa系统办公自动化 2008.工作日志管理,文件管理」· ASP 代码 · 共 132 行
ASP
132 行
<%@LANGUAGE="VBSCRIPT"%>
<%
Response.ExpiresAbsolute=now()-1
Response.CacheControl="no-cache"
%>
<%
MM_authorizedUsers=""
MM_authFailedURL="../../adminlogin666.asp"
MM_grantAccess=false
If Session("MM_Usernamesyslogin") <> "" 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
%><%t1=request("t1")
c=request("c")
if isempty(c) or trim(c)="" then
%>
<script>
alert("请输入归档名或归档名不能为空格。");history.go(-1)
</script>
<%response.end()
end if%>
<!--#include file="../../../Connections/oavbsconn.asp" -->
<%
if(c <> "") then Command1__t = c
if(t1 <> "") then Command1__t1 = t1
%>
<%
Dim Recordset2__MMColParam
Recordset2__MMColParam = "1"
If (Request("ID") <> "") Then
Recordset2__MMColParam = Request("ID")
End If
%>
<%
Dim Recordset2__c
Recordset2__c = "1"
If (Request("c") <> "") Then
Recordset2__c = Request("c")
End If
%>
<%
Dim Recordset2
Dim Recordset2_numRows
Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_oavbsconn_STRING
Recordset2.Source = "SELECT * FROM bbsbankuai WHERE ID <> " + Replace(Recordset2__MMColParam, "'", "''") + " and 版块='" + Replace(Recordset2__c, "'", "''") + "'"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()
Recordset2_numRows = 0
%>
<%if not Recordset2.eof or not Recordset2.bof then%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<script language="javascript">
{
alert("该归档与其它冲突.");history.go(-1)
}
</script>
<%response.end()
end if%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request("ID") <> "") Then
Recordset1__MMColParam = Request("ID")
End If
%>
<%dim c
c=request("c")
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT * FROM bbsbankuai WHERE ID = " + Replace(Recordset1__MMColParam, "'", "''") + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
if not Recordset1.eof or not Recordset1.bof then
Recordset1("版块")=c
Recordset1.update
Recordset1_numRows = 0
%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_oavbsconn_STRING
Command1.CommandText = "UPDATE bssdsghgdjne6tynjhdnhfsthe65 SET 版块='" + Replace(Command1__t, "'", "''") + "' WHERE 版块='" + Replace(Command1__t1, "'", "''") + "' "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%response.redirect "guidangadmin.asp"
else%>
<script>
{
alert("数据不存在..");history.go(-1)
}
</script>
<%Recordset1.Close()
Set Recordset1 = Nothing
end if%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?