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

📄 admin_forum.asp

📁 闻名一时的bbsxp超快论坛系统现在放出最新版2008版本给希望装论坛的朋友借鉴安装调试
💻 ASP
📖 第 1 页 / 共 3 页
字号:

Sub ViewForumPermissions
	sql="Select * from ["&TablePrefix&"ForumPermissions] where ForumID="&ForumID&" and RoleID="&RoleID&""
	Set Rs=Execute(sql)
%>
<b>版块权限管理</b><br />为一个给定的角色设置个人论坛权限。  
<form method="POST" action="?menu=ForumPermissionsUP&ForumID=<%=ForumID%>&RoleId=<%=RoleId%>" name="form">
<table cellspacing="1" cellpadding="5" width="100%" border="0" class=CommonListArea>
	<tr class=CommonListTitle>
		<td colspan="2">论坛权限</td>
	</tr>
	<tr class="CommonListCell">
		<td><b>版块名称</b></td>
		<td width="50%"><a href="?menu=ForumAdd&ForumID=<%=ForumID%>"><%=Execute("Select ForumName From ["&TablePrefix&"Forums] where ForumID="&ForumID&"")(0)%></a></td>
	</tr>
	<tr class="CommonListCell">
		<td><b>角色名称</b></td>
		<td><a href="Admin_User.asp?menu=ViewRole&RoleID=<%=RoleID%>"><%=Execute("Select Name From ["&TablePrefix&"Roles] where RoleID="&RoleID&"")(0)%></a></td>
	</tr>
	<tr class="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 class="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 class="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 class="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 class="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 class="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 class="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 class="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 class="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 class="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 class="CommonListCell">
		<td colspan="2" align="right"><input type="submit" value="保存" /></td>
	</tr>
</table></form>
<%
	Rs.Close
End Sub

Sub bbsManage
	ForumsList=GroupList(0)
%> 论坛数:<b><font color="red"><%=Execute("Select count(ForumID) from ["&TablePrefix&"Forums]")(0)%></font></b>  主题数:<b><font color="red"><%=Execute("Select count(ThreadID) from ["&TablePrefix&"Threads]")(0)%></font></b><br />
<table cellspacing="1" cellpadding="5" width="100%" border="0" class=CommonListArea>
	<tr class=CommonListTitle>
		<td align=center colspan="3">批量删除主题</td>
	</tr>
	<form method="POST" action="?menu=DelThreads">
		<tr class="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="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 class="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 class="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" cellpadding="5" width="100%" border="0" class=CommonListArea>
	<tr class=CommonListTitle>
		<td align=center colspan="2">批量删除回帖</td>
	</tr>
	<form method="POST" action="?menu=DelUserPost">
	<tr class="CommonListCell">
		<td align="center">删除 <input size="10" name="UserName" /> 发表的所有回帖</td>
		<td align="center"><input type="submit" value=" 确 定 " /></td>
	</tr>
	</form>
	<form method="POST" action="?menu=ClearRecyclePost">
	<tr class="CommonListCell">
		<td align="center">清空 <input size="10" name="TimeLimit" /> 天前删除的回帖</td>
		<td align="center"><input type="submit" value=" 确 定 " /></td>
	</tr>
	</form>
	<form method="POST" action="?menu=DellikeTopicPost">
	<tr class="CommonListCell">
		<td align="center">删除标题里包含有 <input size="10" name="Topic" /> 的所有回帖 </td>
		<td align="center"><input type="submit" value=" 确 定 " /></td>
	</tr>
	</form>
</table>
<br />
<form method="POST" action="?menu=uniteok">
	<table cellspacing="1" cellpadding="5" width="100%" border="0" class=CommonListArea>
		<tr class=CommonListTitle>
			<td align=center colspan="2">移动论坛帖子</td>
		</tr>
		<tr class="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 class="CommonListCell">
			<td align="center">仅移动 <input size="2" name="TimeLimit" value="0" /> 天前的帖子   仅移动 <input size="8" name="UserName" /> 发表的帖子</td>
		</tr>
		</table>
</form>
<%
End Sub



Sub FroumTreeView
%>

<table cellspacing="1" cellpadding="1" width="90%" border="0" align="center"><tr>
	<td align="right"><a href="?menu=AddGroup" class="CommonTextButton">新建论坛组</a></td></tr></table>

<table cellspacing="1" cellpadding="5" width="90%" border="0" class=CommonListArea align="center">
<%SelectGroup()%>
</table>
<%
End Sub
Sub SelectGroup()



	GroupGetRow = FetchEmploymentStatusList("Select GroupID,GroupName From ["&TablePrefix&"Groups] order by SortOrder")
	if IsArray(GroupGetRow) then
	For i=0 To Ubound(GroupGetRow,2)


%>
	<tr class=CommonListTitle>
		<td> <a target="_blank" href="Default.asp?GroupID=<%=GroupGetRow(0,i)%>"><%=GroupGetRow(1,i)%></a></td>
		<td align="right" width="250">
			<a href="?menu=ForumAdd&ParentID=0&GroupID=<%=GroupGetRow(0,i)%>">新建论坛</a> | <a href="?menu=AddGroup&GroupID=<%=GroupGetRow(0,i)%>">编辑论坛组</a> | <a onclick="return window.confirm('您确定要删除该论坛组内的所有论坛?')" href="?menu=GroupManageDel&GroupID=<%=GroupGetRow(0,i)%>">删除论坛组</a>
		</td>
	</tr>
<%
		ii=ii+1
		sort GroupGetRow(0,i),0
		ii=ii-1
	Next
	end if
	%>
	
	
	<table cellspacing="1" cellpadding="1" width="90%" 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 ["&TablePrefix&"Forums] where "&sql&" order by SortOrder"
	Set Rs1=Execute(sql)
	do while not rs1.eof
%>
	<tr class="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&ParentID=<%=rs1("ForumID")%>&GroupID=<%=rs1("GroupID")%>">新建子论坛</a> | <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


Sub ShowTags
%>
<form method=post action=?menu=EditTagsUp style="margin:0px">
<table cellspacing="1" cellpadding="5" width="100%" border="0" class=CommonListArea align="center">
	<tr class=CommonListTitle align="center">
		<td width="10%">ID</td>
		<td width="25%">标签名</td>
		<td width="17%">创建日期</td>
		<td width="15%">是否启用</td>
		<td width="10%">总帖子数</td>
		<td width="17%">最后更新日期</td>
		<td width="10%">动作</td>
	</tr>
<%
	sql="["&TablePrefix&"PostTags]"
	
	TotalCount=Execute("Select count(TagID) From "&sql&"")(0) '获取数据数量
	PageSetup=20 '设定每页的显示数量
	TotalPage=Abs(Int(TotalCount/PageSetup*(-1))) '总页数
	PageCount = RequestInt("PageIndex") '获取当前页
	if PageCount <1 then PageCount = 1
	if PageCount > TotalPage then PageCount = TotalPage
	
	
	Rs.open sql,conn,1
	if TotalPage>1 then RS.Move (PageCount-1) * pagesetup
	i=0
	Do While Not RS.EOF and i<PageSetup
		i=i+1
%>
	<tr class="CommonListCell" align="center">
		<td><%=Rs("TagID")%><input type=hidden name=TagID value=<%=Rs("TagID")%>></td>
		<td><input type=text name="TagName<%=Rs("TagID")%>" value=<%=Rs("TagName")%>></td>
		<td><%=Rs("DateCreated")%></td>
		<td>
			<input type="radio" name="IsEnabled<%=Rs("TagID")%>" value="1" <%if Rs("IsEnabled")=1 then%>checked<%end if%>>是
			<input type="radio" name="IsEnabled<%=Rs("TagID")%>" value="0" <%if Rs("IsEnabled")=0 then%>checked<%end if%>>否
		</td>
		<td><%=Rs("TotalPosts")%></td>
		<td><%=Rs("MostRecentPostDate")%></td>
		<td><a href="?menu=DelTag&TagID=<%=Rs("TagID")%>" onclick="return window.confirm('确定执行此操作?')">删除</a></td>
	</tr>
<%
		Rs.movenext
	loop
%>
</table>
<table cellspacing="0" cellpadding="0" width="100%" border="0" align="center">
	<tr class="CommonListCell">
		<td><input value=" 更 新 " type="submit" /></td>
</form>
		<td align="right"><%ShowPage()%></td>
	</tr>
</table>
<%
End Sub



AdminFooter
%>

⌨️ 快捷键说明

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