% Response.Expires = 0 %>
<% REM Advanced Page add/edit pop-up window %>
<% REM Get variables %>
<% REM svr = Server name %>
<% REM a = Action to be performed by server-side code (add,save,new,edit) %>
<% REM SecListTypeGranted = Access type %>
<% REM SecAddress = IP address %>
<% REM SecMask = Subnet mask %>
<%
L_ADD_TEXT = "add" 'internal string do NOT localize
L_SAVE_TEXT = "save" 'REM internal string do NOT localize
L_DEFAULTMASK_TEXT = "255.255.255.255" ' REM internal string do NOT localize
L_NEW_TEXT = "new" ' REM internal string do NOT localize
L_SINGLE_TEXT = "single" 'REM internal string do NOT localize
L_GROUP_TEXT = "group" ' REM internal string do NOT localize
<%
L_DENY_TEXT = "Deny "
L_GRANT_TEXT = "Grant "
L_ACCESSON_TEXT = "Access On"
L_SINGLECOMPUTER_TEXT = "Single computer"
L_GROUPCOMP_TEXT = "Group of computers"
L_IPADDRESS_TEXT = "IP address:"
L_SUBNETMASK_TEXT = "Subnet mask:"
L_CANCEL_TEXT = "Cancel"
%>
<% svr = Request("svr") %>
<% a = Request("a") %>
<% SecListTypeGranted = Request("SecListTypeGranted") %>
<% SecAddress = Request("SecAddress") %>
<% SecMask = Request("SecMask") %>
<% if (cont = true) then %>
<% if (SecListTypeGranted = "0") then %><% = L_DENY_TEXT %><% else %><% = L_GRANT_TEXT %><% end if %><% = L_ACCESSON_TEXT %>
<% REM Perform actions %>
<% if ((a = L_ADD_TEXT) OR (a = L_SAVE_TEXT))then %>
<% set nntp = Server.CreateObject("MSWC.Nntp") %>
<% txtSecAddress = Request("txtSecAddress") %>
<% txtSecMask = Request("txtSecMask") %>
<% if (a = L_ADD_TEXT) then %>
<% if (SecListTypeGranted = "0") then %>
<% nntp.SecTypeGranted = FALSE %>
<% else %>
<% nntp.SecTypeGranted = TRUE %>
<% end if %>
<% nntp.SecAddress = txtSecAddress %>
<% if (Request("rdoSecAddressType") = L_SINGLE_TEXT) then %>
<% nntp.SecMask = L_DEFAULTMASK_TEXT %>
<% else %>
<% nntp.SecMask = txtSecMask %>
<% end if %>
<% error = nntp.SecAdd %>
<% elseif (a = L_SAVE_TEXT) then %>
<% error = nntp.SecEnumerate %>
<% if (SecListTypeGranted = "0") then %>
<% nntp.SecTypeGranted = FALSE %>
<% else %>
<% nntp.SecTypeGranted = TRUE %>
<% end if %>
<% nntp.SecAddress = Request("hdnSecAddress") %>
<% error = nntp.SecGetInfo %>
<% nntp.SecAddress = txtSecAddress %>
<% if (Request("rdoSecAddressType") = L_SINGLE_TEXT) then %>
<% nntp.SecMask = L_DEFAULTMASK_TEXT %>
<% else %>
<% nntp.SecMask = txtSecMask %>
<% end if %>
<% error = nntp.SecSetInfo %>
<% end if %>
<% if (error <> 0) then %>
<% else %>
<% end if %>
<% elseif (a = L_NEW_TEXT) then %>
<% rdoSecAddressType = L_SINGLE_TEXT %>
<% elseif (a = L_EDIT_TEXT) then %>
<% if (SecMask = L_DEFAULTMASK_TEXT) then %>
<% rdoSecAddressType = L_SINGLE_TEXT %>
<% else %>
<% rdoSecAddressType = L_GROUP_TEXT %>
<% end if %>
<% end if %>
<% end if %>