home *** CD-ROM | disk | FTP | other *** search
Wrap
<% 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") %> <!--#include file="_cnst.asp" --> <% if (cont = true) then %> <HTML> <HEAD> <SCRIPT LANGUAGE="javascript"> <% REM Javascript function onOK submits form when "OK" link is clicked %> function onOk() { <% if (a = L_NEW_TEXT) then %> document.userform.a.value = "<% = L_ADD_TEXT %>"; <% else %> document.userform.a.value = "<% = L_SAVE_TEXT %>"; <% end if %> document.userform.submit(); } <% REM Javascript function maintainChk fills/clears "Mask" field accordingly when "Group" radio is clicked %> function maintainChk(group) { if (group) { if (document.userform.hdnSecMask.value != "<% = L_DEFAULTMASK_TEXT %>") { document.userform.txtSecMask.value = document.userform.hdnSecMask.value; } document.userform.txtSecMask.focus(); } else { document.userform.txtSecMask.value = ""; } } <% REM Javascript function maintainTxt checks "Groups" radio button when "Mask" field is filled %> function maintainTxt() { document.userform.hdnSecMask.value = document.userform.txtSecMask.value; if (!(document.userform.rdoSecAddressType[1].checked)) { document.userform.rdoSecAddressType[1].checked = true; } } </SCRIPT> <TITLE><% if (SecListTypeGranted = "0") then %><% = L_DENY_TEXT %><% else %><% = L_GRANT_TEXT %><% end if %><% = L_ACCESSON_TEXT %></TITLE> </HEAD> <% 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 %> <SCRIPT LANGUAGE="javascript"> alert("<% = nntp.ErrorToString (error) %>"); self.location = "nnadved.asp?svr=<% = svr %>&SecAddress=<% = hdnSecAddress %>&SecMask=<% = txtSecMask %>"; </SCRIPT> <% else %> <SCRIPT LANGUAGE="javascript"> opener.location = "nnadvhd.asp?svr=<% = svr %>"; self.close(); </SCRIPT> <% 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 %> <BODY background="\images\black.gif" BGCOLOR="#CCCCCC" TEXT="#000000" TOPMARGIN=15 LINK="#000000" VLINK="#000000" ALINK="#000000"> <FORM NAME="userform" ACTION="nnadved.asp" onSubmit="return false;" METHOD="post"> <INPUT TYPE="hidden" NAME="svr" VALUE="<% = svr %>"> <INPUT TYPE="hidden" NAME="SecListTypeGranted" VALUE="<% = SecListTypeGranted %>"> <INPUT TYPE="hidden" NAME="a" VALUE="<% = a %>"> <P> <TABLE BORDER=1 BGCOLOR="#CCCCCC" WIDTH=100% CELLPADDING=10> <TR><TD> <FONT SIZE=2 FACE="Arial"> <B><IMG SRC="images/gnicttl.gif" ALIGN="textmiddle" HEIGHT=10 WIDTH=10> <% if (SecListTypeGranted = "0") then %>Deny <% else %>Grant <% end if %>Access On</B> <% if (rdoSecAddressType = L_SINGLE_TEXT) then %> <P><INPUT NAME="rdoSecAddressType" TYPE="radio" onClick="maintainChk(false);" VALUE="<% = L_SINGLE_TEXT %>"CHECKED><% = L_SINGLECOMPUTER_TEXT %> <P><INPUT NAME="rdoSecAddressType" TYPE="radio" onClick="maintainChk(true);" VALUE="<% = L_GROUP_TEXT %>"><% = L_GROUPCOMP_TEXT %> <% else %> <P><INPUT NAME="rdoSecAddressType" TYPE="radio" onClick="maintainChk(false);" VALUE="<% = L_SINGLE_TEXT %>"><% = L_SINGLECOMPUTER_TEXT %> <P><INPUT NAME="rdoSecAddressType" TYPE="radio" onClick="maintainChk(true);" VALUE="<% = L_GROUP_TEXT %>" CHECKED><% = L_GROUPCOMP_TEXT %> <% end if %> <P> <TABLE WIDTH=250> <TR> <TD WIDTH=125><FONT SIZE=2 FACE="Arial"><% = L_IPADDRESS_TEXT %></TD> <TD WIDTH=125><INPUT NAME="txtSecAddress" TYPE="text" VALUE="<% = SecAddress %>" SIZE=15></TD> <INPUT NAME="hdnSecAddress" TYPE="hidden" VALUE="<% = SecAddress %>"> </TR> <TR> <TD HEIGHT=4 COLSPAN=2></TD> </TR> <TR> <TD WIDTH=125><FONT SIZE=2 FACE="Arial"><% = L_SUBNETMASK_TEXT %></TD> <% if (SecMask <> L_DEFAULTMASK_TEXT) then %> <TD WIDTH=125><INPUT NAME="txtSecMask" TYPE="text" VALUE="<% = SecMask %>" SIZE=15 onChange="maintainTxt();"> <% else %> <TD WIDTH=125><INPUT NAME="txtSecMask" TYPE="text" VALUE="" SIZE=15 onChange="maintainTxt();"> <% end if %> <INPUT TYPE="hidden" NAME="hdnSecMask" VALUE="<% = SecMask %>"> </TD> </TR> </TABLE> </TD></TR> </TABLE> <P> <TABLE ALIGN="right" CELLPADDING=1 CELLSPACING=1> <TR> <TD><TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0 BGCOLOR="#FFCC00"> <TR> <TD VALIGN="middle"> <FONT FACE="Arial" SIZE=2> <B><A HREF="javascript:onOk();"> <IMG SRC="images/gnicok.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16></A> <A HREF="javascript:onOk();"><% = L_OK_TEXT %></A></B> </FONT> </TD> </TR> </TABLE></TD> <P> <TD><TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0 BGCOLOR="#FFCC00"> <TR> <TD VALIGN="middle"> <FONT FACE="Arial" SIZE=2> <B><A HREF="javascript:close();"> <IMG SRC="images/gniccncl.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16></A> <A HREF="javascript:close();"><% = L_CANCEL_TEXT %></A></B> </FONT> </TD> </TR> </TABLE></TD> <TD> </TD> </TR> </TABLE> </TD></TR> </TABLE> </FORM> </BODY> </HTML> <% end if %>