<%@ Language=VBScript%> <%Option Explicit%> <% '------------------------------------------------------------------------- ' nfsclientgroups_edit_prop.asp:Edit the Properties of the selected NFS ' Client Group. ' ' Copyright (c) Microsoft Corporation. All rights reserved. ' ' Date Description ' 27-Sept-2000 Started '------------------------------------------------------------------------- %> <% '------------------------------------------------------------------------- ' Form Variables '------------------------------------------------------------------------- Dim F_ClientGroupName ' The nfs Clientgroup name Dim F_ClientGroupMembers ' The Current GroupMembers '------------------------------------------------------------------------- ' Create the page and Event handler '------------------------------------------------------------------------- Dim page Dim rc rc = SA_CreatePage(L_CLIENTGROUPSEDIT_TITLE_TEXT, "", PT_PROPERTY, page) If rc = 0 Then SA_ShowPage( page ) End If Public Function OnInitPage( ByRef PageIn, ByRef EventArg) SetVariablesFromsystem OnInitPage = True End Function Public Function OnPostBackPage( ByRef PageIn, ByRef EventArg) SetVariablesFromForm OnPostBackPage = True End Function Public Function OnServePropertyPage( ByRef PageIn, ByRef EventArg) Call ServeCommonJavaScript() %>
<%=L_EDIT_DESCRIPTION_TEXT%>
 
<%=L_GROUPNAME_TEXT%> <%=L_CLIENTNAME_TEXT%>
<%=L_MEMBERS_TEXT%> <% Call SA_ServeOnClickButtonEx(L_MEMBERSADDBTN_TEXT, "", "AddtoListbox()", 50, 0, "DISABLED","btnmembersadd") %>
<% Call SA_ServeOnClickButtonEx(L_MEMBERSREMOVEBTN_TEXT, "", "DeletefromListbox()", 50, 0, "DISABLED","btnmembersremove") %>
<% OnServePropertyPage = True End Function Public Function OnSubmitPage( ByRef PageIn, ByRef EventArg) OnSubmitPage = EditClientGroup() End Function Public Function OnClosePage( ByRef PageIn, ByRef EventArg) OnClosePage = True End Function Function ServeCommonJavaScript() %> <% End Function '------------------------------------------------------------------------- 'Function name: SetVariablesFromSystem 'Description: Serves in Getting the data from System 'Input Variables: None 'Output Variables: None 'Returns: None 'Global Variables: In: ' Out: '------------------------------------------------------------------------- Function SetVariablesFromSystem Err.Clear On Error Resume Next Dim StrClientGroupName ' Nfs ClientGroupName is obtained from QueryString StrClientGroupName= Request.QueryString("Pkey") F_ClientGroupName=StrClientGroupName If F_ClientGroupName = "" OR Err.Number <> 0 Then SA_ServeFailurePage L_PROPERTYNOTRETRIEVED_ERRORMESSAGE End if F_ClientGroupMembers = NFS_ListMembersInGroup(F_ClientGroupName) F_ClientGroupMembers= Mid( F_ClientGroupMembers, 1, len( F_ClientGroupMembers )-1 ) End Function '------------------------------------------------------------------------- 'Function name: SetVariablesFromForm 'Description: Serves in Getting the data from Client 'Input Variables: None 'Output Variables: None 'Returns: None 'Global Variables: In: ' Out: '------------------------------------------------------------------------- Function SetVariablesFromForm 'Err.Clear 'On Error Resume Next F_ClientGroupName=Request.Form("hidnewGroupName") F_ClientGroupMembers=Request.Form("hidGroupmembers") Call SA_TraceOut( "F_ClientGroupName: ", F_ClientGroupName ) Call SA_TraceOut( " F_ClientGroupMembers: ", F_ClientGroupMembers ) End Function '------------------------------------------------------------------------- 'Function name: DisplayMembers 'Description: Serves in Displaying the Members of given Client ' Group in a list box. 'Input Variables: None 'Output Variables: None 'Returns: None 'Global Variables: In:F_ClientGroupName -NFs Client Group Name '------------------------------------------------------------------------- Function DisplayMembers Err.Clear On Error Resume Next Dim strMembers Dim intMembers Dim intMembersCount strMembers=Split(F_ClientGroupMembers,",") intMembersCount=ubound(strMembers) If g_strMemberAtFault = "" Then Response.Write "" For intMembers=1 to intMembersCount Response.Write "" next Else For intMembers=0 to intMembersCount If strMembers(intMembers) = g_strMemberAtFault then Response.Write "" else Response.Write "" end if next End If End Function '------------------------------------------------------------------------- 'Function name: EditClientGroup() 'Description: Serves in Editing the Members of a Client Group 'Input Variables: None 'Output Variables: None 'Returns: None 'Global Variables: In:L_(*) -Localization Varibles. ' In:F_ClientGroupName -NFs Client Group Name ' In:F_ClientGroupMembers -The Current GroupMembers in ' the present Group. ' In:F_ClientGroupMembers --GroupMembers to be ' added to Present Group '------------------------------------------------------------------------- Function EditClientGroup( ) Err.Clear on error resume next Dim ObjClientGroups Dim intMembers Dim intMembersCount Dim arrMembers Dim nRetValue EditClientGroup = False ' Check to see if the groups exists nRetValue = NFS_IsValidGroup( F_ClientGroupName ) If Not HandleError( nRetValue ) Then Exit Function End If Dim strMembers strMembers = NFS_ListMembersInGroup(F_ClientGroupName) If (Len(strMembers) > 0) Then If (Right(strMembers, 1) = ",") Then strMembers = Left(strMembers, Len(strMembers) - 1) End If End If nRetValue = NFS_DeleteMembersFromGroup ( F_ClientGroupName, strMembers ) If nRetValue = ERROR_SUCCESS Then nRetValue = NFS_AddMembersToGroup ( F_ClientGroupName, F_ClientGroupMembers ) End If If Not HandleError( nRetValue ) Then Exit Function End If If nRetValue = ERROR_SUCCESS Then EditClientGroup = True Else EditClientGroup = False End If End Function %>