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

📄 admin_bbs.asp

📁 感谢您使用BBSXP
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!-- #include file="Setup.asp" -->
<%
if SiteSettings("AdminPassword")<>session("pass") then response.redirect "Admin.asp?menu=Login"
Log(""&Request.ServerVariables("script_name")&"<br>"&Request.ServerVariables("Query_String")&"<br>"&Request.form&"")


id=HTMLEncode(Request("id"))
bbsid=HTMLEncode(Request("bbsid"))
TimeLimit=HTMLEncode(Request("TimeLimit"))
UserName=HTMLEncode(Request("UserName"))


response.write "<center>"



select case Request("menu")
case "ApplyManage"
ApplyManage

case "activation"
activation

case "bbsManage"
bbsManage

case "bbsManagexiu"
bbsManagexiu


case "bbsManagexiuok"
bbsManagexiuok

case "bbsadd"
bbsadd

case "bbsaddok"
bbsaddok

case "classs"
classs


case "upSiteSettings"
upSiteSettings

case "upSiteSettingsok"
upSiteSettingsok


case "bbsManageDel"
Conn.execute("Delete from [BBSXP_Forums] where id="&id&"")
error2("已经将该论坛的所有数据删除了!")



case "Delforumok"
if bbsid<>"" then BbsIdList="and ForumID="&bbsid&""
Conn.execute("Delete from [BBSXP_Threads] where lasttime<"&SqlNowString&"-"&TimeLimit&" "&BbsIdList&"")
error2("已经将"&TimeLimit&"天没有更新过的主题删除了!")


case "DelUserTopicok"
if UserName="" then error2("您没有输入用户名!")
if bbsid<>"" then BbsIdList="and ForumID="&bbsid&""
Conn.execute("Delete from [BBSXP_Threads] where UserName='"&UserName&"' "&BbsIdList&"")
error2("已经将"&UserName&"发表的主题删除了!")


case "DellikeTopicok"
Topic=HTMLEncode(Request("Topic"))
if Topic="" then error2("您没有输入字符!")
if bbsid<>"" then BbsIdList="and ForumID="&bbsid&""
Conn.execute("Delete from [BBSXP_Threads] where Topic like '%"&Topic&"%' "&BbsIdList&" ")
error2("已经将标题里包含有 "&Topic&" 的帖子全部删除了!")


case "DelForumsok"
Conn.execute("Delete from [BBSXP_Forums] where ForumHide=1 and lasttime<"&SqlNowString&"-"&TimeLimit&"")
error2("已经将"&TimeLimit&"天没有新帖子的论坛删除了!")

case "clean"
Conn.execute("Delete from [BBSXP_Threads] where IsDel=1 and lasttime<"&SqlNowString&"-"&TimeLimit&"")
error2("已经删除 "&TimeLimit&" 天以前的主题!")

case "uniteok"
hbbs=Request("hbbs")
YBBs=Request("YBBs")
if hbbs = YBBs then error2("不能选择相同论坛!")
if UserName<>"" then UserNamelist="and UserName='"&UserName&"'"
Conn.execute("update [BBSXP_Threads] set ForumID="&int(hbbs)&" where ForumID="&int(YBBs)&" and lasttime<"&SqlNowString&"-"&TimeLimit&" "&UserNamelist&"")
error2("移动论坛资料成功!")

case "activationok"
for each ho in request.form("id")
ho=int(ho)
Conn.execute("update [BBSXP_Threads] set IsDel=0 where id="&ho&"")
next
error2("已经将激活所选帖子!")



case "Delapplication"
Application.contents.ReMoveAll()
error2("已经清除服务器上所有的application缓存!")





end select

sub ApplyManage
%>

<table cellspacing=1 cellpadding=2 width=100% border=0 class=a2 align=center>
<tr class=a1 id=TableTitleLink>
<td align="center" height="25"><a href="?menu=ApplyManage&fashion=id">ID</a></td>
<td width="20%" align="center" height="25">
<a href="?menu=ApplyManage&fashion=ForumName">论坛</a></td>
<td align=center height="25"><a href="?menu=ApplyManage&fashion=ForumHide">属性</a></td>
<td align=center height="25"><a href="?menu=ApplyManage&fashion=moderated">版主</a></td>
<td align=center height="25"><a href="?menu=ApplyManage&fashion=ForumToday">今日</a></td>
<td align=center height="25"><a href="?menu=ApplyManage&fashion=ForumThreads">主题</a></td>
<td align=center height="25"><a href="?menu=ApplyManage&fashion=ForumPosts">帖子</a></td>
<td align="center" height="25">操作</td>
</tr>
<%

if Request("fashion")=empty then
fashion="ForumPosts"
else
fashion=Request("fashion")
end if


sql="select * from [BBSXP_Forums] order by "&fashion&" Desc"
Rs.Open sql,Conn,1

PageSetup=20 '设定每页的显示数量
Rs.Pagesize=PageSetup
TotalPage=Rs.Pagecount  '总页数
PageCount = cint(Request.QueryString("PageIndex"))
if PageCount <1 then PageCount = 1
if PageCount > TotalPage then PageCount = TotalPage
if TotalPage>0 then Rs.absolutePage=PageCount '跳转到指定页数
i=0
Do While Not Rs.EOF and i<PageSetup
i=i+1

%>
<tr class=a3>
<td align="center" height="25"><%=Rs("id")%></td>
<td><a target=_blank href=ShowForum.asp?ForumID=<%=Rs("id")%>><%=Rs("ForumName")%></a></td>
<td align=center><%if ""&Rs("ForumHide")&""="1" then%><font color="#FF0000">隐藏</font><%elseif ""&Rs("followid")&""="0" then%><font color="#0000FF">类别</font><%else%>正常<%end if%></td>
<td align=center width="200"><%=Rs("moderated")%></td>
<td align=center><b><font color=red><%=Rs("ForumToday")%></font></b></td>
<td align=center><b><font color=red><%=Rs("ForumThreads")%></font></b></td>
<td align=center><b><font color=red><%=Rs("ForumPosts")%></font></b></td>
<td align="center"><a href=?menu=bbsManagexiu&id=<%=Rs("id")%>>编辑论坛</a> | <a onclick=checkclick('您确定要删除该论坛的所有资料?') href=?menu=bbsManageDel&id=<%=Rs("id")%>>删除论坛</a>
</tr>
<%
Rs.MoveNext
loop
Rs.Close

%>
</table>
<table border=0 width=100% align=center><tr><td>
<script>ShowPage(<%=TotalPage%>,<%=PageCount%>,"menu=ApplyManage&fashion=<%=Request("fashion")%>")</script>
</tr></td></table>

<%

end sub


sub classs
%>

<table border="0" width="80%">
	<tr>
		<td align="center">
<form name="form" method="POST" action="?menu=bbsaddok"><input type=hidden name=classid value=0><input type=hidden name=ForumPass value=1><input type=hidden name=ForumHide value=0>
类别名称:(例如:电脑网络)<input name="ForumName" onkeyup="ValidateTextboxAdd(this, 'ForumName1')" onpropertychange="ValidateTextboxAdd(this, 'ForumName1')"><input type="submit" value="建立" id='ForumName1' disabled></form>
</td>
		<td align="center">
<form method="POST" action="?menu=bbsManagexiu">
查找论坛:<INPUT size=2 name=id onkeyup="ValidateTextboxAdd(this, 'btnadd')" onpropertychange="ValidateTextboxAdd(this, 'btnadd')" onfocus="javascript:focusEdit(this)" onblur="javascript:blurEdit(this)" value="ID" Helptext="ID">
<input type=submit value="确定" id='btnadd' disabled></form>
</td>
	</tr>
</table>


<table cellspacing=1 cellpadding="2" width="80%" border="0" class="a2" align="center">
<%
sort(0)
%>
</table>


<%

end sub

sub bbsadd

%>


<table cellspacing="1" cellpadding="2" width="80%" border="0" class="a2" align="center">
  <tr height=25>
    <td class=a1 align=middle colspan="2">建立论坛资料</td>
  </tr>
   <tr height=25>
    <td class=a3 align=middle>

<form name="form" method="POST" action="?menu=bbsaddok">
<input type=hidden name=classid value=<%=id%>>

论坛名称</td>
    <td class=a3>

<input size="20" name="ForumName"></td></tr>
   <tr height=25>
    <td class=a3 align=middle>

论坛版主</td>
    <td class=a3>

<input size="30" name=moderated> 多版主添加请用“|”隔开,如:yuzi|裕裕
</td></tr>

<tr class=a3>
<td height="2" align="center" width="20%">帖子专题</td>
<td height="2" align="Left" valign="middle" width="77%">
<input size="30" name="TolSpecialTopic"> 
添加请用“|”隔开,如:原创|转贴</td></tr>

   <tr height=25>
    <td class=a3 align=middle>

论坛介绍</td>
    <td class=a3>

<textarea rows="5" name="ForumIntro" cols="50"></textarea></td></tr>
   <tr height=25>
    <td class=a3 align=middle>

论坛状态</td>
    <td class=a3>

<select size="1" name="ForumPass">
<option value=0>关闭</option>
<option value=1 selected>正常</option>
<option value=2>游客止步</option>
<option value=3>授权浏览</option>
<option value=4>授权发帖</option>
</select>
</td></tr>




   <tr height=25>
    <td class=a3 align=middle>

授权用户名单</td>
    <td class=a3>

<textarea rows="3" name="ForumUserList" cols="40"></textarea> 添加请用“|”隔开,如:yuzi|裕裕
</td></tr>



   <tr height=25>
    <td class=a3 align=middle>

小图标URL</td>
    <td class=a3>

<input size="30" name="ForumIcon"> 显示在社区首页论坛介绍右边
</td></tr>
   <tr height=25>
    <td class=a3 align=middle>

大图标URL</td>
    <td class=a3>

<input size="30" name="ForumLogo"> 显示在论坛左上角
</td></tr>
   <tr height=25>
    <td class=a3 align=middle>

通行密码</td>
    <td class=a3>

<input size="30" name="ForumPassword"> 如果是公开论坛,此处请留空</td></tr>
   <tr height=25>
    <td class=a3 align=middle>

是否显示在论坛列表           
    <td class=a3>

<input type="radio" CHECKED value="0" name="ForumHide">显示 
<input type="radio" value="1" name="ForumHide">隐藏
</tr>
   <tr height=25>
    <td class=a3 align=middle colspan="2">

  <input type="submit" value=" 建 立 "><br></td></tr></table>
</form>
<center><br><a href=javascript:history.back()>< 返 回 ></a>


<%
end sub
sub bbsaddok
if Request("ForumName")="" then error2("请输入论坛名称")



master=split(Request("moderated"),"|")
for i = 0 to ubound(master)
If Conn.Execute("Select id From [BBSXP_Users] where UserName='"&HTMLEncode(master(i))&"'" ).eof and master(i)<>"" Then error2(""&master(i)&"的用户资料还未注册")
next


ForumUserList=replace(Request("ForumUserList"),vbCrlf,"")

Rs.Open "[BBSXP_Forums]",Conn,1,3
Rs.addNew
Rs("followid")=Request("classid")
Rs("ForumName")=HTMLEncode(Request("ForumName"))
Rs("moderated")=Request("moderated")
Rs("TolSpecialTopic")=Request("TolSpecialTopic")
Rs("ForumPass")=Request("ForumPass")
Rs("ForumPassword")=Request("ForumPassword")
Rs("ForumUserList")=ForumUserList
Rs("ForumIntro")=HTMLEncode(Request("ForumIntro"))
Rs("ForumIcon")=HTMLEncode(Request("ForumIcon"))
Rs("ForumLogo")=HTMLEncode(Request("ForumLogo"))
Rs("ForumHide")=Request("ForumHide")
Rs.update
id=Rs("id")

Rs.close

classs

end sub




sub bbsManagexiuok

if Request("ForumName")="" then error2("请输入论坛名称")



master=split(Request("moderated"),"|")
for i = 0 to ubound(master)
If Conn.Execute("Select id From [BBSXP_Users] where UserName='"&HTMLEncode(master(i))&"'" ).eof and master(i)<>"" Then error2(""&master(i)&"的用户资料还未注册")
next

ForumUserList=replace(Request("ForumUserList"),vbCrlf,"")

sql="select * from [BBSXP_Forums] where id="&id&""
Rs.Open sql,Conn,1,3


Rs("followid")=Request("classid")
Rs("SortNum")=int(Request("SortNum"))
Rs("ForumName")=HTMLEncode(Request("ForumName"))
Rs("moderated")=Request("moderated")
Rs("TolSpecialTopic")=Request("TolSpecialTopic")
Rs("ForumPass")=Request("ForumPass")
Rs("ForumPassword")=Request("ForumPassword")
Rs("ForumUserList")=ForumUserList
Rs("ForumIntro")=HTMLEncode(Request("ForumIntro"))
Rs("Forumicon")=HTMLEncode(Request("Forumicon"))
Rs("ForumLogo")=HTMLEncode(Request("ForumLogo"))
Rs("ForumHide")=Request("ForumHide")
Rs.update

Rs.close
%>
编辑成功<br><br><a href=javascript:history.back()>返 回</a>
<%
end sub


sub bbsManagexiu

sql="select * from [BBSXP_Forums] where id="&id&""
Set Rs=Conn.Execute(sql)
if Rs.EOF then error2("系统不存在该论坛的资料")
%>


<form method="POST" action="?menu=bbsManagexiuok" name=form><input type=hidden name=id value=<%=Rs("id")%>>
<table cellspacing="1" cellpadding="2" width="80%" border="0" class="a2" align="center">
  <tr height=25>
    <td class=a1 align=middle colspan="2">编辑论坛资料</td>
  </tr>
   <tr height=25>
    <td class=a3 align=middle>

论坛名称</td>
    <td class=a3>

⌨️ 快捷键说明

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