admin_authorsave.asp

来自「本人仅业余学习一些基础的ASP知识以供系统设计之用,并非专业人员,相关服务器设置」· ASP 代码 · 共 35 行

ASP
35
字号
<!--#include file="../conn.asp"--><!--#include file="../inc/config.asp"-->
<!-- #include file="session.asp" -->
<%

page=replace(trim(request("page")),"'","")
id=request.QueryString("id")
act=request("act")

if act="lock" then
set rs=server.CreateObject("ADODB.RecordSet")
	sql="select author_lock from author where author_id="&id
	rs.open sql,conn,1,1
	if not rs.eof then
		if rs("author_lock")=0 then
			conn.execute ("update author set author_lock=1 where author_id="&id)
		else
			conn.execute ("update author set author_lock=0 where author_id="&id)
		end if
	end if
	rs.close
set rs=nothing
elseif act="author" then
	conn.execute ("update userinfo set GOauthor=0 where authorid="&id)
	conn.execute ("update author set author_addpost=0,author_lock=1 where author_id="&id)
elseif act="goauthor" then
	conn.execute ("update userinfo set GOauthor=1 where authorid="&id)
	conn.execute ("update author set author_writing='',author_lock=0,author_addpost=1 where author_id="&id)
	if makeJS=1 then
		temauthoradd(authorNum)
	end if
end if
conn.close
response.write ("<script>opener.location.reload();</script>")
Call ShowAdminSuccessMsg("操作成功!","javascript:window.close()")
%>

⌨️ 快捷键说明

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