productcheckset.asp
来自「一个企业管理ASP源码.增加了一些新的功能.」· ASP 代码 · 共 53 行
ASP
53 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!--#include file="basedsoftadmin.asp"-->
<!--#include file="../Inc/Config.asp"-->
<!--#include file="Inc/Function.asp"-->
<%
dim ID,Action,sqlDel,rsDel,FoundErr,ErrMsg,PurviewChecked,ObjInstalled
ID=trim(request("ID"))
Action=Trim(Request("Action"))
FoundErr=False
ObjInstalled=IsObjInstalled("Scripting.FileSystemObject")
if ID="" or Action="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>参数不足!</li>"
end if
if FoundErr=False then
if instr(ID,",")>0 then
dim idarr,i
idArr=split(ID)
for i = 0 to ubound(idArr)
call CheckArticle(clng(idarr(i)),Action)
next
else
call CheckArticle(clng(ID),Action)
end if
end if
if FoundErr=False then
call CloseConn()
response.Redirect "ProductCheck.asp"
else
call CloseConn()
call WriteErrMsg()
end if
sub CheckArticle(ID,CheckAction)
PurviewChecked=False
sqlDel="select * from Product where ID=" & CLng(ID)
Set rsDel= Server.CreateObject("ADODB.Recordset")
rsDel.open sqlDel,conn,1,3
if rsDel.bof and rsDel.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>找不到文章:" & rsDel("ID") & " </li>"
end if
if CheckAction="Check" then
rsDel("Passed")=True
elseif CheckAction="CancelCheck" then
rsDel("Passed")=False
end if
rsDel.update
set rsDel=nothing
end sub
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?