📄 topass.asp
字号:
<%Option Explicit%>
<%
dim objRS,sql
dim sortid,staid
dim tmp,referer
sortid = Request.Form("sortid")
staid = Request.Form("staid")
referer = Request.ServerVariables("HTTP_REFERER")
if Trim(staid) = "" then
Response.Write("<script language=""JavaScript"">alert(""请选择要通过验证的站点!"");history.go(-1)</script>")
Response.End
end if
%>
<!--#include file="adoconn.asp"-->
<%
tmp = split(staid,chr(44))
'objConn.BeginTrans
Set objRS = Server.CreateObject("ADODB.RecordSet")
if sortid <> "" and IsNumeric(sortid) then
sql = "update stationinfo set ispass = TRUE where id in (" & staid & ")"
objConn.Execute(sql)
sql = "select * from sort where id = " & sortid
objRS.Open sql, objConn, 3, 3
if Err.number <>0 then
Response.Write "打开数据库出错!"
'objConn.RollbackTrans
else
objRS("totalnopass").value = objRS("totalnopass").value - (UBound(tmp) + 1)
objRS("totalispass").value = objRS("totalispass").value + (UBound(tmp) + 1)
objRS.Update()
objConn.Close()
end if
else
dim objRS_parent
Set objRS_parent = Server.CreateObject("ADODB.RecordSet")
sql = "select * from stationinfo where id in (" & staid & ")"
objRS.Open sql, objConn, 3, 3
do while not objRS.EOF
sql = "select * from sort where id = " & objRS("parentid")
objRS_parent.Open sql, objConn, 3, 3
if objRS_parent.EOF then
'err
else
objRS_parent("totalispass").value = objRS_parent("totalispass").value + 1
objRS_parent("totalnopass").value = objRS_parent("totalnopass").value - 1
objRS_parent.Update()
end if
objRS_parent.Close()
objRS("ispass") = TRUE
objRS.MoveNext()
loop
Set objRS_parent = nothing
end if
Set objConn = nothing
Set objRS = nothing
Response.Write("<script language=""JavaScript"">alert(""您已经成功加入所有选中的站点啦!"");location.replace(""" & referer & """)</script>")
'Response.Write("referer: " & referer & "<br>")
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -