soft_hidden.asp

来自「欢迎使用《雨点下载系统 2.0》! 本系统仅提供给个人网站免费使用」· ASP 代码 · 共 49 行

ASP
49
字号
<!--#include file="conn.asp"-->
<!--#include file="chkadmin.asp"-->
<!--#include file="inc/char.asp"-->
<%dim id,action
id=CInt(Trim(Request.QueryString("id")))
action=Trim(Request.QueryString("action"))

dim errmsg,founderr
founderr=false

if chkadmin=false or power(1)="0" then
	founderr=true
	if action="true" then
		errmsg=errmsg&"<li>您没有隐藏软件的权限</li>"
	else
		errmsg=errmsg&"<li>您没有还原软件的权限</li>"
	end if
end if

dim sql,rs
sql="select Poster from Software where ID="&id
set rs=conn.execute(sql)
if chkadmin=false or (power(4)="0" and rs(0)<>session("adm_usr")) then
	founderr=true
	if action="true" then
		errmsg=errmsg&"<li>您没有隐藏他人软件的权限</li>"
	else
		errmsg=errmsg&"<li>您没有还原他人软件的权限</li>"
	end if
end if
set rs=nothing

if founderr=false then
	conn.execute("update Software set Hidden="&action&" where ID="&id)
	dim gourl,msg
	gourl=request.ServerVariables("HTTP_REFERER")
	if action="true" then
		msg="此软件已隐藏!"
	else
		msg="此软件已还原!"
	end if
	call ok()
else
	call error()
end if

conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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