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

📄 admin_user.asp

📁 论坛建站的源代码
💻 ASP
📖 第 1 页 / 共 3 页
字号:
		Rs("RealName")=Request("RealName")
		Rs("Occupation")=Request("Occupation")
		Rs("Address")=Request("Address")
		Rs("WebAddress")=Request("WebAddress")
		Rs("WebLog")=Request("WebLog")
		Rs("WebGallery")=Request("WebGallery")
	Rs.update
	Rs.close
	
	UpdateApplication"UserBirthday","Select UserID,UserName From ["&TablePrefix&"Users] where Month(Birthday)="&Month(now())&" and day(Birthday)="&day(now())&""
	
	Response.Write("更新成功")
End Sub



Sub UserRank


%>
<table border="0" width="90%" align="center">
	<tr>
		<td align=right><a href="?menu=UserRankAdd" class="CommonTextButton">添加用户等级</a>
</td>
	</tr>
</table>

<%
	RoleGetRow = FetchEmploymentStatusList("Select RoleID,Name from ["&TablePrefix&"Roles] where RoleID >= 0 order by RoleID")
	If IsArray(RoleGetRow) Then
		For i=0 to ubound(RoleGetRow,2)
			Set Rs=Execute("select * from ["&TablePrefix&"Ranks] where RoleID="&RoleGetRow(0,i)&"")
			If not Rs.eof Then
%>
<table border="0" cellpadding="5" cellspacing="1" class=CommonListArea width=90% align="center">
	<tr class=CommonListTitle>
		<td colspan="4" align="center"><%=RoleGetRow(1,i)%></td>
	</tr>
	<tr class=CommonListHeader>
		<td width="100" align="center">ID</td>
		<td>用户等级</td>
		<td width="150">最少发帖</td>
		<td width="150" align="center">管理</td>
	</tr>
<%
			Do While Not Rs.eof
%>
	<tr class="CommonListCell">
		<td align="center"><%=Rs("RankID")%></td>
		<td><%=Rs("RankName")%></td>
		<td><%=Rs("PostingCountMin")%></td>
		<td align="center">
			<a href="?menu=UserRankAdd&RankID=<%=Rs("RankID")%>">编辑</a> | 
			<a onclick="return window.confirm('您确定要执行该操作?');" href="?menu=UserRankDel&RankID=<%=Rs("RankID")%>">删除</a>
		</td>
	</tr>
<%
				Rs.movenext
			Loop
%>
</table>
<%
			End If
		Next
	End If
End Sub

Sub UserRankAdd
	RankID=RequestInt("RankID")
	If RankID>0 Then
		Set Rs=Execute("select * from ["&TablePrefix&"Ranks] where RankID="&RankID&"")
		If Not Rs.eof Then
			RoleID=Rs("RoleID")
			RankName=Rs("RankName")
			PostingCountMin=Rs("PostingCountMin")
		End If
		Rs.close
	End If
%>
<form method="POST" action=?menu=UserRankUp>
<input type="hidden" name="RankID" value="<%=RankID%>">
<table border="0" cellpadding="5" cellspacing="1" class=CommonListArea width=100% align="center">
	<tr class=CommonListTitle>
		<td colspan="2" align="center">添加/编辑用户等级</td>
	</tr>
	<tr class="CommonListCell">
		<td align="right" width=30%>用户角色:</td>
		<td>
		<select name="RoleID">
		<option value="0">所有人</option>
<%
	RoleGetRow = FetchEmploymentStatusList("Select RoleID,Name from ["&TablePrefix&"Roles] where RoleID > 0 order by RoleID")
	For i=0 To Ubound(RoleGetRow,2)
	%><option value="<%=RoleGetRow(0,i)%>" <%if RoleID=RoleGetRow(0,i) then%>selected<%end if%>><%=RoleGetRow(1,i)%></option><%
	Next
%>
		</select>
		</td>
	</tr>
	<tr class="CommonListCell">
		<td align="right" width=30%>最少发帖:</td>
		<td><input size="20" name="PostingCountMin" value="<%=PostingCountMin%>"></td>
	</tr>
	<tr class="CommonListCell">
		<td align="right" width=30%>用户等级对应的文字或图片HTML代码:<br /><font color=#FF0000>(支持HTML)</font></td>
		<td><input size=50 name="RankName" value="<%=server.HTMLEncode(RankName)%>"></textarea></td>
	</tr>
	<tr class="CommonListCell">
		<td align="center" colspan=2><input type="submit" value=" 确 定 "></td>
	</tr>
</table>
</form>
<%
End Sub

Sub AllRoles
%><b>角色管理</b><br />创建/编辑角色,用来控制一个用户在制定版块的权限。<br />
<table cellspacing="1" cellpadding="5" width="100%" border="0" class=CommonListArea align="center">
	<tr class=CommonListTitle>
		<td align="center" colspan="2">角色管理</td>
	</tr>
<%
	sql="Select * from ["&TablePrefix&"Roles] order by RoleID"
	Set Rs=Execute(sql)
		Do While Not Rs.EOF 
%>
	<tr class="CommonListCell">
		<td><a href="?menu=ViewRole&RoleID=<%=Rs("RoleID")%>"><b><%=Rs("Name")%></b></a><br /><%=Rs("Description")%></td>
		<td align="center" width="200"><a class="CommonTextButton" href="?menu=ViewRole&RoleID=<%=Rs("RoleID")%>">编辑角色属性</a> <a class="CommonTextButton" href="?menu=RolePermissions&RoleID=<%=Rs("RoleID")%>">编辑版块权限</a></td>
	</tr>
<%
			Rs.MoveNext
		loop
	Rs.Close
%>
	<tr class="CommonListCell">
		<td colspan="2">
		<form name="form" method="POST" action="?menu=CreateRole">
			<input name="RoleName" onkeyup="ValidateTextboxAdd(this, 'RoleName1')" size="50"><input type="submit" value="创建" id="RoleName1" disabled></form>
		</td>
	</tr>
</table>
<%
End Sub

Sub ViewRole
	if  RoleId<4 then PostDisabled="disabled"
	Rs.Open "Select * from ["&TablePrefix&"Roles] where RoleID="&RoleId&"",Conn,1
%>
<form name="form" method="POST" action="?menu=UpRole&RoleID=<%=RoleID%>" style="margin:0px;padding:0px;">
	<table cellspacing="1" cellpadding="5" width="100%" border="0" class=CommonListArea align="center">
		<tr class="CommonListTitle">
			<td>RoleID</td>
			<td width="60%"><%=Rs("RoleID")%></td>
		</tr>
		<tr class="CommonListCell">
			<td>名称</td>
			<td width="60%"><input name="RoleName" size="50" value="<%=Rs("Name")%>"></td>
		</tr>
		<tr class="CommonListCell">
			<td>描述</td>
			<td width="60%"><input name="Description" size="50" value="<%=Rs("Description")%>"></td>
		</tr>
		<tr class="CommonListTitle">
			<td colspan="2">设置该角色上传附件的相关选项:</td>
		</tr>
		<tr class="CommonListCell">
			<td><b>允许单个帖子附件的大小(KB)</b><br />启用系统默认设置,则输入0</td>
			<td><input size="20" name="RoleMaxFileSize" value="<%=Rs("RoleMaxFileSize")%>" /></td>
		</tr>
		<tr class="CommonListCell">
			<td><b>设置用户上传文件夹的最大容量(KB)</b><br />启用系统默认设置,则输入0</td>
			<td><input size="20" name="RoleMaxPostAttachmentsSize" value="<%=Rs("RoleMaxPostAttachmentsSize")%>" /></td>
		</tr>
		<tr class="CommonListCell">
			<td colspan="2" align="center"><input <%=PostDisabled%> type="button" value="删除" onclick="document.location.href='?menu=DelRole&amp;RoleID=<%=RoleID%>'"> <input type="submit" value="保存"> </td>
		</tr>
        
	</table>
</form>
<%
	Rs.close
End Sub




Sub RolePermissions
%>
<form name="form" method="POST" action="?menu=RolePermissionsUP&RoleID=<%=RoleID%>" style="margin:0px;padding:0px;">
	<table cellspacing="1" cellpadding="5" width="100%" border="0" class=CommonListArea align="center">
	<tr class="CommonListTitle">
		<td colspan="11" align="center">编辑角色“<%=Execute("select Name from ["&TablePrefix&"Roles] where RoleID="&RoleId&"")(0)%>”在各版块的权限</td>
	</tr>
	<tr class="CommonListHeader" align="center">
		<td>版块权限</td>
		<td width="8%">浏览</td>
		<td width="8%">阅读</td>
		<td width="8%">发帖</td>
		<td width="8%">回复</td>
		<td width="8%">编辑</td>
		<td width="8%">删除</td>
		<td width="10%">发起投票</td>
		<td width="8%">投票</td>
		<td width="8%">附件</td>
		<td width="9%">管理</td>
	</tr>
<%
	Sql="Select ForumID,ForumName from ["&TablePrefix&"Forums]"
	Set Rs=Execute(Sql)
	do while Not Rs.eof
		Set Rs1=Execute("Select * from ["&TablePrefix&"ForumPermissions] where RoleID="&RoleID&" and ForumID="&Rs("ForumID")&"")
			if not Rs1.eof then
				PermissionView=Rs1("PermissionView")
				PermissionRead=Rs1("PermissionRead")
				PermissionPost=Rs1("PermissionPost")
				PermissionReply=Rs1("PermissionReply")
				PermissionEdit=Rs1("PermissionEdit")
				PermissionDelete=Rs1("PermissionDelete")
				PermissionCreatePoll=Rs1("PermissionCreatePoll")
				PermissionVote=Rs1("PermissionVote")
				PermissionAttachment=Rs1("PermissionAttachment")
				PermissionManage=Rs1("PermissionManage")
			end if
		Set Rs1=nothing
%>
	<input type="hidden" name="ForumID" value="<%=Rs("ForumID")%>" />
	<tr align="center" class="CommonListCell">
		<td><%=Rs("ForumName")%></td>
		<td><input type="checkbox" value="1" name="PermissionView<%=Rs("ForumID")%>"<%if PermissionView=1 then%> checked<%end if%> /></td>
		<td><input type="checkbox" value="1" name="PermissionRead<%=Rs("ForumID")%>"<%if PermissionRead=1 then%> checked /><%end if%></td>
		<td><input type="checkbox" value="1" name="PermissionPost<%=Rs("ForumID")%>"<%if PermissionPost=1 then%> checked /><%end if%></td>
		<td><input type="checkbox" value="1" name="PermissionReply<%=Rs("ForumID")%>"<%if PermissionReply=1 then%> checked /><%end if%></td>
		<td><input type="checkbox" value="1" name="PermissionEdit<%=Rs("ForumID")%>"<%if PermissionEdit=1 then%> checked /><%end if%></td>
		<td><input type="checkbox" value="1" name="PermissionDelete<%=Rs("ForumID")%>"<%if PermissionDelete=1 then%> checked /><%end if%></td>
		<td><input type="checkbox" value="1" name="PermissionCreatePoll<%=Rs("ForumID")%>"<%if PermissionCreatePoll=1 then%> checked /><%end if%></td>
		<td><input type="checkbox" value="1" name="PermissionVote<%=Rs("ForumID")%>"<%if PermissionVote=1 then%> checked /><%end if%></td>
		<td><input type="checkbox" value="1" name="PermissionAttachment<%=Rs("ForumID")%>"<%if PermissionAttachment=1 then%> checked /><%end if%></td>
		<td><input type="checkbox" value="1" name="PermissionManage<%=Rs("ForumID")%>"<%if PermissionManage=1 then%> checked /><%end if%></td>
	</tr>
<%
		Rs.movenext
	loop
%>
	<tr class="CommonListCell">
		<td colspan="11" align="right"><input type="submit" value=" 保存 " /></td>
	</tr>
</table></form>


<%
	Rs.close
End Sub




AdminFooter
%>

⌨️ 快捷键说明

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