⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminbd.asp

📁 完美政府版,正版网站解决方案
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%set rs=nothing%>
<%case"editpassuser"
passuser=Replace(Request.Form("passuser"),"'","''")
conn.execute("update bdinfo set passuser='"&passuser&"' where id="&bd&" and followid<>0")
tl=" 编 辑 成 功"
mes="版面认证用户编辑成功。"
call sendinfo(tl,mes)
%>
<%case"gonggaogl"
set rs=conn.execute("select * from paper where bd="&bd&" order by id desc")
%>
<div class=adminbdtitle>版面现有公告</div>
<div class=adminbdbody>
<table border="0"  cellpadding="0" style="border-collapse: collapse" width="100%">
    <tr><td width="40%" height=28 >&nbsp;<b>公告标题:</b></td>
      <td width="20%" >&nbsp;<b>发表者:</b></td><td width="20%" >&nbsp;<b>发表时间:</b></td>
      <td width="20%" >&nbsp;<b>公告操作:</b></td></tr>
<%do while not rs.eof
paper=rs("paper")
paper=split(paper,"|")
%><tr><td width="40%">
  <p style="margin: 4">&nbsp;<a href=# onclick=openscript('paper.asp?id=<%=rs("id")%>')><%=lefttrue(checktitle(paper(0)),25)%></a></td>
  <td width="20%">&nbsp;<%=checktitle(paper(1))%></td><td width="20%">&nbsp;<%=paper(2)%></td>
  <td width="20%">&nbsp;<a href="adminbd.asp?action=delgg&id=<%=rs("id")%>&bd=<%=bd%>">删除</a> |
  <a href="adminbd2.asp?action=editgg&id=<%=rs("id")%>&bd=<%=bd%>">编辑</a></td></tr><%rs.movenext
loop%>
    </table>
</div><%set rs=nothing%>
<%case"delgg"
conn.execute("delete*from paper where id="&id&" and bd="&bd&"")
tl=" 删 除 成 功"
mes="删除公告成功。"
call sendinfo(tl,mes)%>

<%case"editggok"
ggtitle=Replace(Request.Form("ggtitle"),"'","")
ggok=Replace(ggtitle," ","")

content=checkbad(Request.Form("content"))
content=replace(content,"|","│")
content=replace(content,"'","''")
contentok=Replace(content," ","")

if ggok="" or contentok="" then
tl=" 修 改 失 败"
mes="<b>对不起!公告修改失败,可能存在以下问题。</b><br>·请填写完整公告标题和公告内容。<br>·<a href='javascript:history.go(-1)'><img src"&styleid&"/re.gif align=absmiddle border=0> 返回重新填写</a>"
else
content2=ggtitle&"|"&lgname&"|"&now()+timeset/24&"|"&content
conn.execute("update [paper] set paper='"&content2&"' where id="&id&" and bd="&bd&"")
tl=" 修 改 成 功"
mes="·公告修改成功。"
end if
call sendinfo(tl,mes)

case"top"
gettop()
if idtop=2 then
tl=" 操 作 失 败"
mes="<b>操作失败,可能存在以下问题。</b><br>·该帖子已经被总置顶,不能够被版主置顶。<br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
else
set rs=server.createobject("adodb.recordset")
sql="Select top 1 top from [topic] where bd="&bd&" and id="&id&""
rs.open sql,conn,1,3
rs("top")=1
rs.Update
rs.close
set rs=nothing
tl=" 置 顶 成 功"
mes="<b>置顶帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
end if
umark(30)
call sendinfo(tl,mes)


case"good"
conn.execute("update topic set type=1 where bd="&bd&" and id="&id&"")
tl=" 设 定 成 功"
mes="<b>设定为精华帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
umark(50)
call sendinfo(tl,mes)

case"lock"
conn.execute("update topic set type=2 where bd="&bd&" and id="&id&"")
tl=" 锁 定 成 功"
mes="<b>锁定帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
call sendinfo(tl,mes)

case"delbbs"
conn.execute("update topic set type=3 where bd="&bd&" and id="&id&"")
conn.execute("update bbs"&totable&" set type=3 where bd="&bd&" and id="&id&"")
tl=" 删 除 成 功"
mes="<b>删除帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。"
umark(-30)
call sendinfo(tl,mes)

case"update"
conn.execute("update topic set edittime=now()+"&timeset&"/24 where bd="&bd&" and id="&id&"")
tl=" 提 升 成 功"
mes="<b>提升帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
call sendinfo(tl,mes)

case"deltop"
gettop()
if idtop=2 then
tl=" 操 作 失 败"
mes="<b>操作失败,可能存在以下问题。</b><br>·该帖子已经被总置顶,不能够被版主取消置顶。<br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
else
set rs=server.createobject("adodb.recordset")
sql="Select top 1 top from [topic] where bd="&bd&" and id="&id&""
rs.open sql,conn,1,3
rs("top")=0
rs.Update
rs.close
set rs=nothing
tl=" 操 作 成 功"
mes="<b>取消置顶成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
end if
call sendinfo(tl,mes)

case"delgood"
conn.execute("update topic set type=0 where bd="&bd&" and id="&id&"")
tl=" 设 定 成 功"
mes="<b>设取消精华帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
call sendinfo(tl,mes)

case"dellock"
conn.execute("update topic set type=0 where bd="&bd&" and id="&id&"")
tl=" 解 锁 成 功"
mes="<b>解锁帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
call sendinfo(tl,mes)
case"move"
%><script>
function changelist(){
var choosename=document.getElementsByName("bd").item(0);
var chooseint=choosename.selectedIndex;
var choosevalue=choosename.options[chooseint].value;
if(choosevalue==0){
	alert("不能选择分类,只能选择版面!");
	choosename.options[0].selected=true;
	return false;
}

}
</script>
<form method="POST" action="adminbd.asp?action=moveok&bd=<%=bd%>&id=<%=id%>&totable=<%=totable%>" onsubmit="return changelist();">
<div class=adminbdtitle>移动帖子</div><div class=adminbdbody><p style="margin:8px;">请选择帖子要移动到的版面:
<%
set rs=conn.execute("select * from bdinfo where followid=0 order by orders desc,id")
	response.write"<select size=1 name=bd><option value=0>请选择版面</option>"
	do while not rs.eof
		response.write"<option value=0 style='background-color:#e5e5e5;'>┏ "&split(rs("bdinfo"),"|")(0)&"</option>"
		set rs1=conn.execute("select * from bdinfo where followid="&rs("id")&" order by orders desc,id")
			do while not rs1.eof
				response.write"<option value="&rs1("id")&">┠ "&split(rs1("bdinfo"),"|")(0)&"</option>"
				rs1.movenext
			Loop
		set rs1=nothing
		rs.movenext
	Loop
	response.write"</select>"
set rs=nothing
%>&nbsp; 
    <input type="submit" value="  移   动  " name="a"></p></div></form>
<%case"moveok"
dim thisbbs
thisbbs=checknum(request.form("bd"))
if thisbbs=0 then
tl=" 移 动 失 败"
mes="<b>移动帖子失败,你没有选择版面。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。<br>·<a href='javascript:history.go(-1)'><img border=0 src="&styleid&"/re.gif align=absmiddle>返回重新选择</a>"
else
conn.execute("update topic set bd="&thisbbs&" where bd="&bd&" and id="&id&"")
conn.execute("update bbs"&totable&" set bd="&thisbbs&" where bd="&bd&" and id="&id&"")
conn.execute("update bbs"&totable&" set bd="&thisbbs&" where bd="&bd&" and bid="&id&"")
tl=" 移 动 成 功"
mes="<b>移动帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&thisbbs&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
end if
call sendinfo(tl,mes)

case"delrebbs"
dim bbsid
bbsid=checknum(request.querystring("bbsid"))
conn.execute("update bbs"&totable&" set type=3 where bd="&bd&" and bbsid="&bbsid&"")
umark2(-20)
tl=" 删 除 成 功"
mes="<b>删除回帖成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
call sendinfo(tl,mes)
%><%
case"alltop"
if usertype<4 then
tl=" 操 作 失 败"
mes="<b>对不起!权限不够。</b>"
call sendinfo(tl,mes)
call down
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="Select top 1 top from [topic] where id="&id&""
rs.open sql,conn,1,3
rs("top")=2
rs.Update
rs.close
set rs=nothing
umark(50)
tl=" 操 作 成 功"
mes="<b>总置顶帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
call sendinfo(tl,mes)
%><%case"delalltop"
if usertype<4 then
tl=" 操 作 失 败"
mes="<b>对不起!权限不够。</b>"
call sendinfo(tl,mes)
call down
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="Select top 1 top from [topic] where id="&id&""
rs.open sql,conn,1,3
rs("top")=0
rs.Update
rs.close
set rs=nothing
tl=" 操 作 成 功"
mes="<b>取消总置顶帖子成功,请选择你要进行的操作。</b><br>·<a href=topiclist.asp?bd="&bd&">回到"&bdinfo(0)&"</a>。<br>·<a href=showbbs.asp?bd="&bd&"&id="&id&"&totable="&totable&">回到浏览的帖子</a>。"
call sendinfo(tl,mes)
%><%end select

call down%>

⌨️ 快捷键说明

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