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

📄 bbsmanage.asp

📁 进入后台
💻 ASP
字号:
<!--#include file="config.asp"-->
<!--#include file="head.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Sitename&"-网址:"&Sitehttp%></title>
<LINK href="css.css" type=text/css rel=stylesheet>
</head>
<body>
<%call sitehead
aid=clng(request("aid"))
eid=clng(request("eid"))
if aid="" or aid<1 or eid="" or eid<1 then ShowError("访问的帖子不存在")
rs.open "select top 1 title,bbsbm,good,atop from bbs where id="&aid&"",conn,1,1
	If Rs.eof and Rs.bof Then ShowError("访问的帖子不存在")
	Set rc = Server.CreateObject("Adodb.Recordset")
	rc.open "select * from bbsbm where id="&rs("bbsbm")&"",conn,1,1
	If Rc.eof and Rc.bof Then ShowError("访问的版面不存在")
	bmname=rc("bmname")
	bmadmin=rc("bmadmin")
	bid=rc("id")
	rc.close
	atitle=rs("title")
	agood=rs("good")
	aatop=rs("atop")
	rs.close
	if bmadmin<>"" then
	bmadmin=Split(bmadmin,",")
	upnun=ubound(bmadmin)
	for StartID=0 to upnun
	if session("xyluserid")=int(bmadmin(StartID)) then
	isbz=1
	exit for
	end if
	next
	end if
	if session("sitejob")<>3 and isbz<>1 then ShowError("你无权进行此操作")
	Select Case request("action")
	Case "del":
		 call del
	Case "btop":
		 call btop
	Case "good":
		Call good
	Case "amove":
		Call amove
	Case Else:
		 call show
End Select
sub show%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#f9f8f2" class="border">
  <tr>
    <td height="25">  <img src="image/bbsface/fle.gif" width="10" height="10"><a href="index.asp"> 校友录首页</a> - <a href="bbs.asp">论坛</a> - <a href="bbsbm.asp?bid=<%=bid%>"><%=bmname%></a> - 管理帖子</td>
  </tr>
</table><br><table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
  <tr>
    <td height="20">主题:<%=atitle%></td>
  </tr>
  <tr>
    <td height="20">请认真操作,负责的选择级别。</td>
  </tr>
</table>

<br>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<form name="form1" method="post" action="?aid=<%=aid%>&eid=<%=eid%>&action=del"> <caption>
<div align="left">删除帖子</div>
</caption>
  <tr>
    <td height="30">分数操作:
      <input name="jb" type="radio" value="1" checked>
      扣1分
      <input type="radio" name="jb" value="5">
      扣5分
      <input type="radio" name="jb" value="10">     
      扣10分 
      <input type="radio" name="jb" value="20">
扣20分
<input type="radio" name="jb" value="30">
扣30分      
    </td>
  </tr>
  <tr>
    <td height="25"><input type="submit" name="Submit" value="提交"></td>
  </tr> </form>
</table>
<br>
<%if aid=eid then%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<form name="form1" method="post" action="?aid=<%=aid%>&eid=<%=eid%>&action=good"> <caption>
<div align="left">精华帖子</div>
</caption>
<tr>
    <td height="30">选择级别: 
      <select name="jb2" size="1" id="jb2">
        <%if agood=0 then%>
		<option value="1">精华</option>
		<%end if
		if agood=1 then%>
		<option value="0">取消精华</option>
		<%end if%>
      </select></td>
  </tr>
  <tr>
    <td height="30">分数操作:
      <input name="jb" type="radio" value="0">
不操作
<input name="jb" type="radio" value="1">
      1分
      <input name="jb" type="radio" value="5" checked>
      5分
      <input type="radio" name="jb" value="10">     
      10分 
      <input type="radio" name="jb" value="20">
20分
<input type="radio" name="jb" value="30">
30分      
    </td>
  </tr>
  <tr>
    <td height="25"><input type="submit" name="Submit" value="提交"></td>
  </tr> </form>
</table>
<br>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<form name="form1" method="post" action="?aid=<%=aid%>&eid=<%=eid%>&action=btop"> <caption>
<div align="left">置顶帖子</div>
</caption>
<tr>
    <td height="30">选择级别: 
      <select name="jb2" size="1" id="jb2">
        <%if aatop<>1 then%>
        <option value="1">置顶</option>
        <%end if
		if aatop<>2 then%>
        <option value="2">总置顶</option>
        <%end if
		if aatop<>0 then%>
        <option value="0">取消置顶</option>
        <%end if%>
      </select>
</td>
  </tr>
  <tr>
    <td height="30">分数操作:
      <input name="jb" type="radio" value="0" checked>
不操作
<input name="jb" type="radio" value="1">
      1分
      <input name="jb" type="radio" value="5">
      5分
      <input type="radio" name="jb" value="10">     
      10分 
      <input type="radio" name="jb" value="20">
20分
<input type="radio" name="jb" value="30">
30分      
    </td>
  </tr>
  <tr>
    <td height="25"><input type="submit" name="Submit" value="提交"></td>
  </tr> </form>
</table>
<br>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<form name="form1" method="post" action="?aid=<%=aid%>&eid=<%=eid%>&action=amove"> <caption>
<div align="left">移动帖子</div>
</caption>
  <tr>
    <td height="30">选择版面:
      <select name="jb2" size="1" id="jb2">
	  <%rs.open "select * from bbsbm where id<>"&bid&" order by bmpx",conn,1,3
	If Rs.eof and Rs.bof Then
	Response.write("暂无任何版面,请后台添加")
	else
	do while not rs.eof%>
        <option value="<%=rs("id")%>"><%=rs("bmname")%></option>
		<%rs.movenext
loop
end if
rs.close
set rs=nothing%>
      </select></td>
  </tr>
    <tr>
    <td height="30">分数操作:
      <input name="jb" type="radio" value="0" checked>
不扣分
<input name="jb" type="radio" value="1">
      扣1分
      <input type="radio" name="jb" value="5">
      扣5分
      <input type="radio" name="jb" value="10">     
      扣10分 
      <input type="radio" name="jb" value="20">
扣20分
<input type="radio" name="jb" value="30">
扣30分      
    </td>
  </tr>
  <tr>
    <td height="25"><input type="submit" name="Submit" value="提交"></td>
  </tr> </form>
</table>
<br>
<%end if
End sub
sub del
jb=request.Form("jb")
if jb="" or jb<1 then ShowError("级别不可以小于1")
if aid =eid then
rs.open "select id,userid from bbs where bbsid="&aid&"",conn,1,1
	If Rs.eof and Rs.bof Then ShowError("帖子不存在")
	do while not rs.eof
	if rs(1)<>"" then
	if rs(0)=aid then
	conn.Execute("UPDATE [user] Set bbscount=bbscount-1,sitemoney=sitemoney-"&jb&" where id="&rs(1))
	else
	conn.Execute("update [user] set sitemoney=sitemoney-1,bbscount=bbscount-1 where id="&rs(1))
	end if
	end if
	rs.movenext
	loop
	rs.close
	conn.Execute "delete from bbs where bbsid="&aid&""
	a=obj.gourl(" 本页面将在3秒后自动返回您所删帖子所在的版面,可以继续选择以下操作:<br><br> 返回<A href='bbsbm.asp?bid="&bid&"'>["&bmname&"]</a>论坛版面<br><br> 到<A href='bbs.asp'>[论坛首页]</a>","bbsbm.asp?bid="&bid&"")
else
rs.open "select id,userid from bbs where id="&eid&"",conn,1,1
	If Rs.eof and Rs.bof Then ShowError("帖子不存在")
	if rs(1)<>"" then
	conn.Execute("UPDATE [user] Set bbscount=bbscount-1,sitemoney=sitemoney-"&jb&" where id="&rs(1))
	end if
	rs.close
	conn.Execute "delete from bbs where id="&eid&""
	a=obj.gourl(" 本页面将在3秒后自动返回您所删除的帖子,可以继续选择以下操作:<br><br> 返回<A href='bbsbm.asp?bid="&bid&"'>["&bmname&"]</a>论坛版面<br><br> 到<A href='bbsview.asp?aid="&aid&"'>[刚才的主题]</a>","bbsbm.asp?bid="&bid&"")
end if
End sub
sub good
jb=request.Form("jb")
if jb="" or jb<0 then ShowError("分数操作不可以小于0")
jb2=request.Form("jb2")
if jb2="" or jb2<0 then ShowError("请选择是否精华")
rs.open "select userid,good from bbs where id="&aid&"",conn,1,3
	If Rs.eof and Rs.bof Then ShowError("帖子不存在")
	if jb2=1 then
	rs(1)=1
	else
	rs(1)=0
	end if
	rs.update
	if jb2=1 then
	conn.Execute("UPDATE [user] Set sitemoney=sitemoney+"&jb&" where id="&rs(0))
	else
	conn.Execute("UPDATE [user] Set sitemoney=sitemoney-"&jb&" where id="&rs(0))
	end if
rs.close
a=obj.gourl(" 本页面将在5秒后自动返回您所操作的帖子,可以继续选择以下操作:<br><br> 返回<A href='bbsbm.asp?bid="&bid&"'>["&bmname&"]</a>论坛版面<br><br> 到<A href='bbsview.asp?aid="&aid&"'>[刚才操作帖子]</a>","bbsview.asp?aid="&aid&"")
End sub
sub btop
jb=request.Form("jb")
if jb="" or jb<0 then ShowError("分数操作不可以小于0")
jb2=request.Form("jb2")
if jb2="" or jb2<0 then ShowError("请选择置顶级别")
rs.open "select userid,atop from bbs where id="&aid&"",conn,1,3
	If Rs.eof and Rs.bof Then ShowError("帖子不存在")
	rs(1)=jb2
	rs.update
	if jb2>0 then
	conn.Execute("UPDATE [user] Set sitemoney=sitemoney+"&jb&" where id="&rs(0))
	else
	conn.Execute("UPDATE [user] Set sitemoney=sitemoney-"&jb&" where id="&rs(0))
	end if
rs.close
a=obj.gourl(" 本页面将在5秒后自动返回您所操作的帖子,可以继续选择以下操作:<br><br> 返回<A href='bbsbm.asp?bid="&bid&"'>["&bmname&"]</a>论坛版面<br><br> 到<A href='bbsview.asp?aid="&aid&"'>[刚才操作帖子]</a>","bbsview.asp?aid="&aid&"")
End sub
sub amove
jb=request.Form("jb")
if jb="" or jb<0 then ShowError("分数操作不可以小于0")
jb2=request.Form("jb2")
if jb2="" or jb2<1 then ShowError("请选择新版面")
rs.open "select userid,bbsbm from bbs where id="&aid&"",conn,1,3
	If Rs.eof and Rs.bof Then ShowError("帖子不存在")
	rs(1)=jb2
	rs.update
	conn.Execute("UPDATE [user] Set sitemoney=sitemoney-"&jb&" where id="&rs(0))
rs.close
a=obj.gourl(" 本页面将在5秒后自动返回您所操作的帖子,可以继续选择以下操作:<br><br> 返回<A href='bbsbm.asp?bid="&bid&"'>["&bmname&"]</a>论坛版面<br><br> 到<A href='bbsview.asp?aid="&aid&"'>[刚才操作帖子]</a>","bbsview.asp?aid="&aid&"")
End sub
call sitebottom%>
</body>
</html>

⌨️ 快捷键说明

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