uppaixupost.asp

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

ASP
103
字号
<%  
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
%><!--#include file="../../../Connections/oavbsconn.asp" -->

<%
  if isempty(request.form("p")) or trim(request.form("p"))="" then
%>
<script>
alert("请输入排序或排序不能为空格。");history.go(-1)
</script>
<%response.end()
end if%>


<%if not isNumeric(request.form("p"))=true then %>
<script language="javascript">

alert("排序需为数字!");history.go(-1)
</script>
<%end if%>
<%if request.form("p")<0 then %>
<script language="javascript">
alert("排序需大于0!");history.go(-1)
</script>
<%end if%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request("ID") <> "") Then 
  Recordset1__MMColParam = Request("ID")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_oavbsconn_STRING
Recordset1.Source = "SELECT *  FROM 归档类别  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 
dim p
p=Recordset1("排序")
Recordset1("排序")=request("p")
Recordset1.update
Recordset1.Close()
Set Recordset1 = Nothing
Recordset1_numRows = 0
else
Recordset1.Close()
Set Recordset1 = Nothing
%>
<script>
{
alert("数据不存在");history.go(-1)
}
</script>
<%response.end()
end if
%>
<%if request("p")>request("pp") then


if(request("p") <> "") then Command1__p = request("p")

if(request("id") <> "") then Command1__d = request("id")

%>
<%
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_oavbsconn_STRING
Command1.CommandText = "UPDATE 归档类别  SET 排序=排序+1  WHERE 排序>=" + Replace(Command1__p, "'", "''") + " and id<>" + Replace(Command1__d, "'", "''") + " "
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
end if
response.redirect("guidangadmin.asp")
%>

⌨️ 快捷键说明

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