<%= OutputCSS() %> > <% Dim mode, strSQL, groupID, strSQL1 Dim objCon, objRS, objCom Dim allowmail:allowmail = Application(dbName&"maildll") if isGuest then %> <% call headerHTML() %>
<%= RightViolationMessage %>


<% call footerHTML() %> <% response.end end if 'response.write (memBlocklist) mode = request.queryString("mode") groupID = request.queryString("groupID") SELECT Case lcase(mode) Case "quick" Dim arrAddresses, iAddress set objRS = server.createobject("adodb.recordset") With objRS .open dbOwnerPrefix&"spShowQuickAddress ("&memID&")", datastore, , , adCmdStoredProc if not (.eof and .bof) then arrAddresses = .getrows .close End With set objRS = nothing %>
<% if isArray(arrAddresses) then %> <% for iAddress = 0 to ubound(arrAddresses,2) %> <% next %> > <% else %> <% end if %>
<%= AddressDesc %>
width="2%"> " name="addtolist" class="radiocheck"> class="c2"> <%= HTMLEncode(""&arrAddresses(1,iAddress)) %>
class="c2"> <%= AddressNoMember %>


<% Case "add" Dim memberToAdd, grouping1 grouping1 = request.form("grouping1") '0 = default; 1 = blocked list set objCon = server.createobject("adodb.connection") objCon.open datastore for each memberToAdd in request.form("addtolist") set objCom = server.createobject("adodb.command") With objCom .activeConnection = objCon .commandText = dbOwnerPrefix&"spAddressAdd" .commandType = adCmdStoredProc .Parameters.Append .Createparameter("@mem", adInteger, adParamInput, 0, memID) .Parameters.Append .Createparameter("@contactID", adInteger, adParamInput, 0, memberToAdd) .Parameters.Append .Createparameter("@inGroup", adSmallInt, adParamInput, 0, grouping1) .execute , , adExecuteNoRecords End With set objCom = nothing next objCon.close set objCon = nothing Call GetBlockedList(memID) response.clear response.redirect (request("http_referer")) Case "addindividual" ' a new event in 1.50.14 set objCom = server.createobject("adodb.command") With objCom .activeConnection = datastore .commandText = dbOwnerPrefix&"spAddressAdd" .commandType = adCmdStoredProc .Parameters.Append .Createparameter("@mem", adInteger, adParamInput, 0, memID) .Parameters.Append .Createparameter("@contactID", adInteger, adParamInput, 0, request.queryString("memID")) .Parameters.Append .Createparameter("@inGroup", adSmallInt, adParamInput, 0, 0) .execute , , adExecuteNoRecords End With set objCom = nothing response.clear response.redirect (request("http_referer")) Case "block" ' a new event in 1.90.21 set objCom = server.createobject("adodb.command") With objCom .activeConnection = datastore .commandText = dbOwnerPrefix&"spAddressAdd" .commandType = adCmdStoredProc .Parameters.Append .Createparameter("@mem", adInteger, adParamInput, 0, memID) .Parameters.Append .Createparameter("@contactID", adInteger, adParamInput, 0, request.queryString("memID")) .Parameters.Append .Createparameter("@inGroup", adSmallInt, adParamInput, 0, 1) .execute , , adExecuteNoRecords End With set objCom = nothing Call GetBlockedList(memID) response.clear response.redirect (request("http_referer")) Case "unblock" set objCon = server.createobject("adodb.connection") objCon.open datastore strSQL = "delete from pgd_address WHERE mem = "&Clng(memID)&" AND In_Group = 1 "&_ " AND contactID = "&Clng(request.queryString("memID")) objCon.execute strSQL, , adCmdText + adExecuteNoRecords objCon.close set objCon = nothing Call GetBlockedList(memID) response.clear response.redirect (request("http_referer")) Case "delete" dim grouping grouping = request.queryString("grouping") 'special name assigned set objCon = server.createobject("adodb.connection") objCon.open datastore strSQL = "delete from pgd_address WHERE mem = "&Clng(memID)&" AND In_Group = "&Clng(grouping)&_ " AND contactID in ("&CheckDelimitedFormat(request.form("addtolist"),",")&") " objCon.execute strSQL, , adCmdText + adExecuteNoRecords objCon.close set objCon = nothing Call GetBlockedList(memID) response.clear response.redirect (request("http_referer")) Case "addgroup" Dim addedGroup:addedGroup = trim(request.queryString("addedGroup")) if addedGroup<>"" then set objCom = server.createobject("adodb.command") With objCom .activeConnection = datastore .commandText = dbOwnerPrefix&"spAddressGroupAdd" .commandType = adCmdStoredProc .Parameters.Append .Createparameter("@mem", adInteger, adParamInput, 0, memID) .Parameters.Append .Createparameter("@GroupName", adVarChar, adParamInput, 50, addedGroup) .execute , , adExecuteNoRecords End With set objCom = nothing end if response.clear response.redirect ("address.asp") Case "editgroup" if request.form="" then %>
<%= AddressGroupEditDesc %>
> " name="groupname"> " name="groupID">

<% else groupName = trim(request.form("groupName")) groupID = request.form("groupID") if groupName<>"" then strSQL = "Update pgd_addressgroup set groupName='"&SQLAccessInput(left(""&groupName,50))&"' WHERE mem="&Clng(memID)&" AND groupID="&Clng(groupID) set objCon = server.createobject("adodb.connection") objCon.open datastore objCon.execute strSQL, , adCmdText + adExecuteNoRecords objCon.close set objCon = nothing response.write ("") else response.write ("") end if end if Case "deletegroup" strSQL = " delete from pgd_address WHERE mem="&Clng(memID)&" AND in_group = "&Clng(groupID)&_ " delete from pgd_addressgroup WHERE mem="&Clng(memID)&" AND groupID = "&Clng(groupID) set objCon = server.createobject("adodb.connection") objCon.open datastore objCon.execute strSQL, , adCmdText + adExecuteNoRecords objCon.close set objCon = nothing response.clear response.redirect ("address.asp") Case else Dim arrGroups, iGroup, groupName, arrGroupMembers groupName = request.queryString("groupName") if groupID="" then groupID = 0 end if SELECT Case groupID Case "0" groupName = AddressDesc Case "1" groupName = AddressBlock End Select set objRS = server.createobject("adodb.recordset") With objRS .open dbOwnerPrefix&"spShowAddress ("&memID&", '"&AddressDesc&"', '"&AddressBlock&"', "&groupId&")", datastore, , , adCmdStoredProc if not (.eof and .bof) then arrGroups = .getrows Set objRS = .nextRecordset if not (objRS.eof and objRS.bof) then arrGroupMembers = objRS.getrows objRS.close objRS.open dbOwnerPrefix&"spOnlineBuddyList ("&memID&")", datastore, , , adCmdStoredProc Dim arrOnlineBuddy if not (objRS.eof or objRS.bof) then arrOnlineBuddy = objRS.getrows objRS.close end with set objRS = nothing %> <% call headerHTML() %>
<% if ubound(arrGroups)>1 then for iGroup = 2 to ubound(arrGroups,2) %> <% next end if %>
<%= AddressGroup %>
> <%= HTMLEncode(AddressDesc) %> (<%= arrGroups(2,0) %>)
> <%= HTMLEncode(AddressBlock) %> (<%= arrGroups(2,1) %>)
>
<%= HTMLEncode(""&arrGroups(1,iGroup)) %> (<%= arrGroups(2,iGroup) %>) <%= PMEdit %> | <%= PMDelete %>



<% if isArray(arrGroupMembers) then %> <% for iGroup = 0 to ubound(arrGroupMembers,2) %> <% next %> <% else %> <% end if %>
<%= HTMLEncode(""&groupName) %>
> <%= HTMLEncode(""&arrGroupMembers(1,iGroup)) %> >
>   >
class="subhead" colspan=2> <%= AddressNoMember %>





<% call footerHTML() %> <% End SELECT %>