📄 admin_forum.asp
字号:
%>
<b>版块权限管理</b><br>为一个给定的角色设置个人群组权限。
<form method="POST" action="?menu=ForumPermissionsUP&ForumID=<%=ForumID%>&RoleId=<%=RoleId%>" name="form">
<table cellspacing="1" width="100%" border="0" id=CommonListArea>
<tr id=CommonListTitle3>
<td colspan="2">群组权限</td>
</tr>
<tr id=CommonListCell>
<td><b>版块名称</b></td>
<td width="50%"><a href="?menu=ForumAdd&ForumID=<%=ForumID%>"><%=Conn.Execute("Select ForumName From [Wo_Forums] where ForumID="&ForumID&"")(0)%></a></td>
</tr>
<tr id=CommonListCell>
<td><b>角色名称</b></td>
<td><a href="Admin_User.asp?menu=ViewRole&RoleID=<%=RoleID%>"><%=Conn.Execute("Select Name From [Wo_Roles] where RoleID="&RoleID&"")(0)%></a></td>
</tr>
<tr id=CommonListCell>
<td><b>浏览</b><br>角色里的成员能够浏览主题列表 </td>
<td><input type="radio" value="1" name="PermissionView" <%if RS("PermissionView")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionView" <%if RS("PermissionView")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>阅读</b><br>角色里的成员能够阅读个人的主题</td>
<td><input type="radio" value="1" name="PermissionRead" <%if RS("PermissionRead")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionRead" <%if RS("PermissionRead")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>发主题</b><br>角色里的成员能够在群组上发表新主题</td>
<td><input type="radio" value="1" name="PermissionPost" <%if RS("PermissionPost")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionPost" <%if RS("PermissionPost")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>回复</b><br>角色里的成员能够回复主题 </td>
<td><input type="radio" value="1" name="PermissionReply" <%if RS("PermissionReply")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionReply" <%if RS("PermissionReply")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>编辑</b><br>角色里的成员能够编辑他们自己的主题</td>
<td><input type="radio" value="1" name="PermissionEdit" <%if RS("PermissionEdit")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionEdit" <%if RS("PermissionEdit")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>删除</b><br>角色里的成员能够删除他们自己的主题</td>
<td><input type="radio" value="1" name="PermissionDelete" <%if RS("PermissionDelete")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionDelete" <%if RS("PermissionDelete")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>发起投票</b><br>角色里的成员能够创建投票的选举</td>
<td><input type="radio" value="1" name="PermissionCreatePoll" <%if RS("PermissionCreatePoll")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionCreatePoll" <%if RS("PermissionCreatePoll")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>投票</b><br>角色里的成员能够在已有的选举上投票</td>
<td><input type="radio" value="1" name="PermissionVote" <%if RS("PermissionVote")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionVote" <%if RS("PermissionVote")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>附件</b><br>角色里的成员能够添加附件到本群组的主题中</td>
<td><input type="radio" value="1" name="PermissionAttachment" <%if RS("PermissionAttachment")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionAttachment" <%if RS("PermissionAttachment")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td><b>管理</b><br>角色里的成员能够管理本版块</td>
<td><input type="radio" value="1" name="PermissionManage" <%if RS("PermissionManage")=1 then%>checked<%end if%>>允许 <input type="radio" value="0" name="PermissionManage" <%if RS("PermissionManage")=0 then%>checked<%end if%>>拒绝</td>
</tr>
<tr id=CommonListCell>
<td colspan="2" align="right"><input type="submit" value="保存"></td>
</tr>
</table></form>
<%
Rs.Close
End Sub
Sub bbsManage
GroupList 0
%> 群组数:<b><font color="red"><%=Conn.execute("Select count(ForumID) from [Wo_Forums]")(0)%></font></b> 主题数:<b><font color="red"><%=Conn.execute("Select count(ThreadID) from [Wo_Threads]")(0)%></font></b><br>
<table cellspacing="1" width="100%" border="0" id=CommonListArea>
<tr id=CommonListTitle3>
<td align=center colspan="3">批量删除主题</td>
</tr>
<form method="POST" action="?menu=DelThreads">
<tr id=CommonListCell>
<td align="center" width="50%">删除
<select name="TimeLimit" size="1">
<option value="30">30</option>
<option value="60">60</option>
<option value="90" selected>90</option>
<option value="180">180</option>
<option value="360">360</option>
</select> 天没有人查看过的主题
</td>
<td align="center"><select name="ForumID"><option value="">所有群组</option><%=ForumsList%></select></td>
<td align="center"><input type="submit" value=" 确 定 "></td>
</tr>
</form>
<form method="POST" action="?menu=DelUserTopicok">
<tr id=CommonListCell>
<td align="center">删除 <input size="10" name="UserName"> 发表的所有主题
</td>
<td align="center"><select name="ForumID"><option value="">所有群组</option><%=ForumsList%></select></td>
<td align="center"><input type="submit" value=" 确 定 "></td>
</tr>
</form>
<form method="POST" action="?menu=DellikeTopicok">
<tr id=CommonListCell>
<td align="center">删除标题里包含有 <input size="10" name="Topic"> 的所有主题
</td>
<td align="center"><select name="ForumID"><option value="">所有群组</option><%=ForumsList%></select></td>
<td align="center"><input type="submit" value=" 确 定 "></td>
</tr>
</form>
</table>
<br>
<table cellspacing="1" width="100%" border="0" id=CommonListArea>
<tr id=CommonListTitle3>
<td align=center colspan="4">批量删除回复</td>
</tr>
<form method="POST" action="?menu=DelUserPost">
<tr id=CommonListCell>
<td align="center">删除 <input size="10" name="UserName"> 发表的所有回复</td>
<td align="center">
<select name="Posts">
<%
set Rs=conn.openSchema(20)
Do Until Rs.EOF
if instr(Rs("TABLE_NAME"),"Wo_Posts")>0 and Rs("TABLE_TYPE")="TABLE" then
Response.Write("<option value='"&Rs("TABLE_NAME")&"'>"&Rs("TABLE_NAME")&"</option>")
end if
Rs.movenext
Loop
%> </select>
</td>
<td align="center"><input type="submit" value=" 确 定 "></td>
</tr>
</form>
<form method="POST" action="?menu=DellikeTopicPost">
<tr id=CommonListCell>
<td align="center">删除标题里包含有 <input size="10" name="Topic"> 的所有回复
</td>
<td align="center">
<select name="Posts">
<%
set Rs=conn.openSchema(20)
Do Until Rs.EOF
if instr(Rs("TABLE_NAME"),"Wo_Posts")>0 and Rs("TABLE_TYPE")="TABLE" then
Response.Write("<option value='"&Rs("TABLE_NAME")&"'>"&Rs("TABLE_NAME")&"</option>")
end if
Rs.movenext
Loop
%> </select>
</td>
<td align="center"><input type="submit" value=" 确 定 "></td>
</tr>
</form>
</table>
<br>
<form method="POST" action="?menu=uniteok">
<table cellspacing="1" width="100%" border="0" id=CommonListArea>
<tr id=CommonListTitle3>
<td align=center colspan="2">移动群组主题</td>
</tr>
<tr id=CommonListCell>
<td align="center">将 <select name="ForumSource"><%=ForumsList%></select> 移动到 <select name="ForumTarget"><%=ForumsList%></select> </td>
<td align="center" rowspan="2"><input type="submit" value=" 确 定 "></td>
</tr>
<tr id=CommonListCell>
<td align="center">仅移动 <input size="2" name="TimeLimit" value="0"> 天前的主题 仅移动 <input size="8" name="UserName"> 发表的主题</td>
</tr>
</table>
</form>
<%
End Sub
Sub upSiteSettings
%>
<table cellspacing="1" width="99%" border="0" id=CommonListArea align="center">
<tr id=CommonListTitle3>
<td align=center colspan="2">群组资料更新</td>
</tr>
<tr id=CommonListCell>
<td align="center" colspan="2" height="80">
此操作将更新群组资料,修复群组统计的信息<br><a href="?menu=upSiteSettingsok">点击这里更新群组统计数据</a><br><a href="?menu=Delapplication">清除服务器上的application缓存</a><br>
</td>
</tr>
</table>
<br>
<%
End Sub
Sub upSiteSettingsok
Rs.Open "[Wo_Forums]",Conn
do while not Rs.eof
allarticle=Conn.execute("Select count(ThreadID) from [Wo_Threads] where IsDel=0 and ForumID="&Rs("ForumID")&"")(0)
if allarticle>0 then
allrearticle=Conn.execute("Select sum(TotalReplies) from [Wo_Threads] where IsDel=0 and ForumID="&Rs("ForumID")&"")(0)
else
allrearticle=0
end if
Conn.execute("update [Wo_Forums] set TotalThreads="&allarticle&",TotalPosts="&allarticle+allrearticle&" where ForumID="&Rs("ForumID")&"")
Rs.Movenext
loop
Rs.close
Response.Write("操作成功!<br><br>已经更新群组所有群组的统计数据<br>")
End Sub
Sub FroumTreeView
%>
<table cellspacing="1" cellpadding="1" width="99%" border="0" align="center"><tr>
<td align="right"><a href="?menu=AddGroup" class="CommonTextButton">新建群组</a></td></tr></table>
<table cellspacing="1" width="99%" border="0" id=CommonListArea align="center">
<%SelectGroup()%>
</table>
<%
End Sub
Sub SelectGroup()
sql="Select * From [Wo_Groups] order by SortOrder"
Set Rs1=Conn.Execute(sql)
do while not rs1.eof
%>
<tr id=CommonListTitle3>
<td> <a target="_blank" href="group.asp?GroupID=<%=rs1("GroupID")%>"><%=rs1("GroupName")%></a></td>
<td align="right" width="250">
<a href="?menu=AddGroup&GroupID=<%=rs1("GroupID")%>">编辑群组</a> | <a onclick="return window.confirm('您确定要删除该群组内的所有群组?')" href="?menu=GroupManageDel&GroupID=<%=rs1("GroupID")%>">删除群组</a>
</td>
</tr>
<%
ii=ii+1
sort rs1("GroupID"),0
ii=ii-1
rs1.Movenext
loop
Set Rs1 = Nothing
%>
<table cellspacing="1" cellpadding="1" width="99%" border="0" align="center"><tr><td align=right><a href="?menu=ManageGroups" class="CommonTextButton">切换到网格模式</a></td></tr></table>
<%
End Sub
Sub sort(selec,ParentID)
if ParentID=0 then
sql="GroupID="&selec&" and ParentID=0"
else
sql="ParentID="&selec&""
end if
sql="Select * From [Wo_Forums] where "&sql&" order by SortOrder"
Set Rs1=Conn.Execute(sql)
do while not rs1.eof
%>
<tr id=CommonListCell>
<td> <%=string(ii*2," ")%><a target="_blank" href="ShowForum.asp?ForumID=<%=rs1("ForumID")%>"><%=rs1("ForumName")%></a></td>
<td align="right"><a href="?menu=ForumAdd&ForumID=<%=rs1("ForumID")%>&GroupID=<%=rs1("GroupID")%>">编辑群组</a> | <a onclick="return window.confirm('您确定要删除该群组的所有资料?')" href="?menu=bbsManageDel&ForumID=<%=rs1("ForumID")%>">删除群组</a></td>
</tr>
<%
ii=ii+1
sort rs1("ForumID"),1
ii=ii-1
rs1.Movenext
loop
Set Rs1 = Nothing
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -