matrix3_restore.asp

来自「这是ASP的OA」· ASP 代码 · 共 31 行

ASP
31
字号
<!-- #include file="const.asp" -->
<%
dim id,sql,rs,rootid,rootid2
id=nrequest("id")
if id="" then
	response.Redirect("error.asp?id=3")
	response.End()
else
	call opendb()
	checkadmin()
	sql="select valid,RootID from m3_bbs where id="&id&""
	set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,3
	if rs.eof and rs.bof then
		response.Redirect("error.asp?id=2")
		response.End()
	else
		rs("valid")=1
		rootid2=rs("RootID")
		rs.update
	end if
	rs.close
	set rs=nothing
	if id<>rootid2 then
		sql="update m3_bbs set re=re+1 where id="&rootid2&""
		conn.execute(sql)
	end if
	call closedb()
	response.write("<script>alert('还原成功 !');window.close();</script>")
end if
%>

⌨️ 快捷键说明

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