📄 best.asp
字号:
<!--#include file="connbbs.asp"-->
<% if session("user")="" then
response.redirect "../err.asp"
end if
articleid=trim(request("articleid"))
articleid=replace(articleid,"'","")
bbsid=trim(request("bbsid"))
bbsid=replace(bbsid,"'","")
if articleid="" or bbsid="" then
bbserr=true%>
<script language=vbscript>
MsgBox "对不起,文章ID和论坛ID不能为空!"
location.href = "javascript:history.back()"
</script>
<%end if
if not isnumeric(rootid) then
response.redirect "../err.asp"
end if
if not isnumeric(bbsid) then
response.redirect "../err.asp"
end if
set rs=server.createobject("ADODB.recordset")
sql="select best from bbs where id="&articleid&" and bbsid="&bbsid&" order by id desc"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
bbserr=true%>
<script language=vbscript>
MsgBox "对不起,找不到该贴!"
location.href = "javascript:history.back()"
</script>
<%else
best=rs("best")
end if%>
<%
rs.close
set rs1=server.createobject("ADODB.recordset")
sql1="select bbsadmin from bbslist where id="&bbsid&" order by id desc"
rs1.open sql1,conn,1,1
if rs1.bof and rs1.eof then
bbserr=true
else
bbsadmin=rs1("bbsadmin")
end if
if instr(bbsadmin,"|"&session("user")&"|")<1 then
bbserr=true
end if
%>
<% if bbserr=true then%>
<script language=vbscript>
MsgBox "对不起,找不到该论坛或者你不是该论坛的版主!"
location.href = "javascript:history.back()"
</script>
<% end if%>
<%if bbserr<>true then
if best=0 then
conn.execute"update bbs set best=1 where id="&articleid&" and bbsid="&bbsid
success="true"
else
conn.execute"update bbs set best=0 where id="&articleid&" and bbsid="&bbsid
success="true"
end if
end if
rs1.close
conn.close
set conn=nothing
%>
<html>
<head><title>设定成功</title></head>
<script language="javascript">
<!--
function closeit() {
setTimeout("self.close()",1000)
}
-->
</script>
<link rel="stylesheet" href="../index.css">
<body onload="javascript:closeit()">
<table width=100%><tr><td width=100% align=center>
<%if success="true" then%>设定成功<%else%>
发生未知错误,请与管理员联系<%end if%><br>
窗口在1秒钟内自动关闭</td></tr></table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -