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

📄 admin_user_permissions.asp

📁 简单的asp论坛源码系统,很适用于初学者!界面简洁,功能齐全
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<% @ Language=VBScript %>
<% Option Explicit %>
<!--#include file="admin_common.asp" -->
<%
'****************************************************************************************
'**  Copyright Notice    
'**
'**  Web Wiz Forums(TM)
'**  http://www.webwizforums.com
'**                            
'**  Copyright (C)2001-2008 Web Wiz(TM). All Rights Reserved.
'**  
'**  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS UNDER LICENSE FROM 'WEB WIZ'.
'**  
'**  IF YOU DO NOT AGREE TO THE LICENSE AGREEMENT THEN 'WEB WIZ' IS UNWILLING TO LICENSE 
'**  THE SOFTWARE TO YOU, AND YOU SHOULD DESTROY ALL COPIES YOU HOLD OF 'WEB WIZ' SOFTWARE
'**  AND DERIVATIVE WORKS IMMEDIATELY.
'**  
'**  If you have not received a copy of the license with this work then a copy of the latest
'**  license contract can be found at:-
'**
'**  http://www.webwizguide.com/license
'**
'**  For more information about this software and for licensing information please contact
'**  'Web Wiz' at the address and website below:-
'**
'**  Web Wiz, Unit 10E, Dawkins Road Industrial Estate, Poole, Dorset, BH15 4JD, England
'**  http://www.webwizguide.com
'**
'**  Removal or modification of this copyright notice will violate the license contract.
'**
'****************************************************************************************



'*************************** SOFTWARE AND CODE MODIFICATIONS **************************** 
'**
'** MODIFICATION OF THE FREE EDITIONS OF THIS SOFTWARE IS A VIOLATION OF THE LICENSE  
'** AGREEMENT AND IS STRICTLY PROHIBITED
'**
'** If you wish to modify any part of this software a license must be purchased
'**
'****************************************************************************************




'Set the response buffer to true
Response.Buffer = True



'Dimension variables
Dim strForumName	'Holds the name of the forum
Dim strMemberName	'Holds the name of the forum member
Dim lngMemberID		'Holds the ID number of the member
Dim intSelGroupID	'Holds the group ID to select
Dim iaryForumID		'Holds the forum ID array
Dim intCatID		'Holds the cat ID
Dim sarryForums
Dim intCurrentRecord
Dim sarrySubForums
Dim intCurrentRecord2
Dim intSubForumID


'Read in the details
lngMemberID = CLng(Request("UID"))





'Read in the member name
'Initalise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT " & strDbTable & "Author.Username From " & strDbTable & "Author WHERE " & strDbTable & "Author.Author_ID=" & lngMemberID & ";"

'Query the database
rsCommon.Open strSQL, adoCon

'Read in the forum name form the recordset
If NOT rsCommon.EOF Then

	'Read in the forums from the recordset
	strMemberName = rsCommon("Username")
End If

'Release server varaibles
rsCommon.Close




'If this is a post back update the database
If Request.Form("postBack") AND blnDemoMode = False Then
	
	
	'Run through till all checked forums are added
	For each iaryForumID in Request.Form("chkFID")


		'Initalise the strSQL variable with an SQL statement to query the database
		strSQL = "SELECT " & strDbTable & "Permissions.* From " & strDbTable & "Permissions WHERE " & strDbTable & "Permissions.Forum_ID=" & iaryForumID & " AND " & strDbTable & "Permissions.Author_ID = " & lngMemberID & ";"
		
		'Set the Lock Type for the records so that the record set is only locked when it is updated
		rsCommon.LockType = 3
		
		'Query the database
		rsCommon.Open strSQL, adoCon
	
		With rsCommon
			'If this is a new one add new
			If rsCommon.EOF Then .AddNew
	
			'Update the recordset
			.Fields("Forum_ID") = iaryForumID
			.Fields("Author_ID") = lngMemberID
			.Fields("View_Forum") = CBool(Request.Form("read"))
			.Fields("Post") = CBool(Request.Form("post"))
			.Fields("Reply_posts") = CBool(Request.Form("reply"))
			.Fields("Edit_posts") = CBool(Request.Form("edit"))
			.Fields("Delete_posts") = CBool(Request.Form("delete"))
			.Fields("Priority_posts") = CBool(Request.Form("priority"))
			.Fields("Poll_create") = CBool(Request.Form("poll"))
			.Fields("Vote") = CBool(Request.Form("vote"))
			.Fields("Attachments") = CBool(Request.Form("files"))
			.Fields("Image_upload") = CBool(Request.Form("images"))
			.Fields("Moderate") = CBool(Request.Form("moderate"))
			.Fields("Display_post") = CBool(Request.Form("display"))
			.Fields("Calendar_event") = CBool(Request.Form("calEvent"))
			.Fields("Attachments") = False
			.Fields("Image_upload") = False
	
			'Update the database with the new user's details
			.Update
			
			'Close recordset
			.close
		End With
	Next
	

	'Release server varaibles
	Call closeDatabase()

	'Redirect back to permissions page
	Response.Redirect("admin_user_permissions.asp?UID=" & lngMemberID & strQsSID3)
End If


%>
<!-- #include file="includes/browser_page_encoding_inc.asp" -->
<meta name="generator" content="Web Wiz Forums" />
<title>Create Member Permissions</title>
<%
'***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
Response.Write("<!--//" & _
vbCrLf & "/* *******************************************************" & _
vbCrLf & "Software: Web Wiz Forums(TM) ver. " & strVersion & "" & _
vbCrLf & "Info: http://www.webwizforums.com" & _
vbCrLf & "Copyright: (C)2001-2008 Web Wiz(TM). All rights reserved" & _
vbCrLf & "******************************************************* */" & _
vbCrLf & "//-->" & vbCrLf & vbCrLf)
'***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ******
%>
<!-- #include file="includes/admin_header_inc.asp" -->
<div align="center"><h1>Create Member Permissions for <% = strMemberName %></h1><br />
  <a href="admin_menu.asp<% = strQsSID1 %>">Control Panel Menu</a><br />
  <a href="admin_find_user.asp<% = strQsSID1 %>">Select another Member to Create, Edit, or Delete  Permissions for </a><br />
  <br />
  <span class="text">Use the form below to create permissions on Forums for the member <b>
  <% = strMemberName %>
  </b>.<br />
  <b>These member permissions override any Group Permissions the member would have on  forums. </b> </span></div>
<form action="admin_user_permissions.asp?UID=<% = lngMemberID %><% = strQsSID2 %>" method="post" name="frmNewForum" id="frmNewForum">
  <div align="center"><span class="text"><span class="lgText"><br />
    Permissions</span><br />
    Select what permissions you require for this user </span><br />
    <span class="text"><a href="#per" class="smLink">What do the different permissions mean?</a></span> <br />
    <br />
    <table border="0" align="center" cellpadding="2" cellspacing="1" class="tableBorder">
      <tr>
        <td align="left" width="194" class="tableLedger">Member Name </td>
        <td width="43" align="center" class="tableLedger">Access</td>
        <td width="43" align="center" class="tableLedger"> New Topics</td>
        <td width="43" align="center" class="tableLedger">Sticky Topics</td>
        <td width="43" align="center" class="tableLedger">Post Reply</td>
        <td width="43" align="center" class="tableLedger">Edit Posts</td>
        <td width="43" align="center" class="tableLedger">Delete Posts</td>
        <td width="43" align="center" class="tableLedger">New Polls </td>
        <td width="43" align="center" class="tableLedger">Poll Vote </td>
        <td width="43" align="center" class="tableLedger">Calendar Event</td>
        <td width="43" align="center" class="tableLedger">Post Approval </td>
        <td width="43" align="center" class="tableLedger"> Forum Moderator</td>
      </tr>
      <tr>
        <td align="left" class="tableRow"><% = strMemberName %></td>
        <td align="center" class="tableRow"><input name="read" type="checkbox" value="true" checked="checked" /></td>
        <td align="center" class="tableRow"><input name="post" type="checkbox" value="true" checked="checked" /></td>
        <td align="center" class="tableRow"><input type="checkbox" name="priority" value="true" /></td>
        <td align="center" class="tableRow"><input name="reply" type="checkbox" value="true" checked="checked" /></td>
        <td align="center" class="tableRow"><input name="edit" type="checkbox" value="true" checked="checked" /></td>
        <td align="center" class="tableRow"><input name="delete" type="checkbox" value="true" checked="checked" /></td>
        <td align="center" class="tableRow"><input type="checkbox" name="poll" value="true" /></td>
        <td align="center" class="tableRow"><input type="checkbox" name="vote" value="true" /></td>
        <td align="center" class="tableRow"><input type="checkbox" name="calEvent" value="true" /></td>
        <td align="center" class="tableRow"><input type="checkbox" name="display" value="true" /></td>
        <td align="center" class="tableRow"><input type="checkbox" name="moderate" value="true" /></td>
      </tr>

⌨️ 快捷键说明

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