home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / ins.cab / nnsechd.asp < prev    next >
Text File  |  1997-10-12  |  7KB  |  306 lines

  1. <%
  2. L_PWAUTH_TEXT = "Password Authentication Method"
  3. L_AUTHMETHOD_TEXT = "View or set the password authentication method used for non-anonymous access to this resource."
  4.  
  5. L_SECOMM_TEXT = "Secure Communictions"
  6. L_VIEWSECOMM_TEXT = "View or set the secure communications method used when the virtual directory is accessed."
  7. L_EDIT_TEXT = "Edit..."
  8. L_TCPRESTRICT_TEXT = "TCP/IP Access Restrictions"
  9. L_BYDEFAULT_TEXT = "By default, all computers are:"
  10. L_GRANTED_TEXT = "Granted access"
  11. L_DENIED_TEXT = "Denied access"
  12. L_EXCEPTBELOW_TEXT ="Except those listed below:"
  13. L_ENTERANINT_TEXT = "Please enter an integer."
  14. L_NEWAPPLICATION_TEXT = "New Application"
  15. L_AUTHENTICATE_TEXT = "Authenticate"
  16. L_COMMUNICATIONS_TEXT = "Communications"
  17.  
  18. L_ACCESS_TEXT = "Access"
  19. L_IP_TEXT = "IP Address"
  20. L_SUBNET_TEXT = "Subnet Mask"
  21. L_DOMAIN_TEXT = "Domain"
  22. L_ACCESSDENIED_TEXT = "Access Denied"
  23. L_ACCESSDENIEDERROR_TEXT    = "401 access denied"
  24.  
  25.  
  26.  %>
  27. <% If Request.ServerVariables("LOGON_USER") = "" Then %>
  28.     <% Response.Status = L_ACCESSDENIEDERROR_TEXT %>    
  29.     <% Response.write L_ACCESSDENIED_TEXT%>
  30. <% Else %>
  31.  
  32. <%
  33. function heading(width,thestring)
  34.     width = width - len(thestring)
  35.     for i = width to 0 step -1
  36.         thestring = thestring + " "
  37.     next
  38.     heading = thestring
  39. end function
  40.  
  41. REM path = trim(Session("path"))
  42. REM set currentobj = GetObject(path)
  43.  
  44. set currentObj = Server.CreateObject("Nntpadm.VirtualServer.1")
  45. On Error Resume Next 
  46. %>
  47.  
  48. <!--#include file="nnset.inc"-->
  49.  
  50. <HTML>
  51. <HEAD>
  52.  
  53. <SCRIPT LANGUAGE="JavaScript">
  54.  
  55. function isNum(txtcntrl)
  56. {
  57.     str = txtcntrl.value;
  58.     for (var i = 0; i < str.length; i++) 
  59.     {
  60.          var ch = str.substring(i, i + 1);
  61.           if ((ch < "0" || "9" < ch) && ch != ',') 
  62.         {
  63.            alert("<% = L_ENTERANINT_TEXT %>");
  64.         txtcntrl.focus()
  65.         return false;
  66.           }
  67.      }
  68.     return true;
  69. }
  70.  
  71. function setList(){
  72. }
  73.  
  74. function disableDefault(dir,fromCntrl, toCntrl)
  75. {
  76.     if (!dir){
  77.         if (fromCntrl.value != "")
  78.         {
  79.             toCntrl.value = fromCntrl.value;
  80.             fromCntrl.value = "";
  81.         }
  82.     }
  83.     else{
  84.         if (toCntrl.value != "")
  85.         {
  86.             fromCntrl.value = toCntrl.value;
  87.             toCntrl.value = "";
  88.         }
  89.     }
  90. }
  91.  
  92. function enableDefault(chkCntrl)
  93. {
  94.     chkCntrl.checked = true;
  95. }
  96.  
  97.     function setUpdated()
  98.     {
  99.         parent.parent.menu.document.hiddenform.updated.value = "true";
  100.     }
  101.  
  102.     function popBox(title, width, height, filename)
  103.     {
  104.         thefile = (filename + ".asp");
  105.         <% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then %>
  106.         <% else %>
  107.             thefile = "nnpop.asp?pg="+thefile;
  108.             width = width +25;
  109.             height = height + 50;
  110.         <% end if %>
  111.  
  112.         window.open(thefile ,title,"toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  113.     }
  114.  
  115. </SCRIPT>
  116.     <TITLE></TITLE>
  117.     <FONT SIZE=1 FACE="Helv">
  118.  
  119. </HEAD>
  120.  
  121. <BODY BGCOLOR="#CCCCCC" TOPMARGIN=5 TEXT="#000000" onLoad="loadList();"  LINK="#000000" VLINK="#000000">
  122. <FORM NAME="userform">
  123. <TABLE CELLSPACING=0 CELLPADDING=2>
  124. <TR><TD><FONT SIZE=1 FACE="Helv"><B><%=L_PWAUTH_TEXT%></B><P></TD></TR>
  125. <TR><TD>
  126.  
  127. <TABLE CELLSPACING=0 CELLPADDING=2>
  128.     <TR>
  129.         <TD>  </TD>
  130.         <TD WIDTH = 50 ALIGN="middle"><IMG SRC="images/handshk.gif" WIDTH=32 HEIGHT=28 BORDER=0></TD>
  131.         <TD WIDTH = 400 ALIGN="top"><FONT SIZE=1 FACE="Helv"><%=L_AUTHMETHOD_TEXT%></TD>
  132.         <TD ALIGN="middle"><INPUT TYPE="button" VALUE="<%=L_EDIT_TEXT%>" NAME="btnAuthenticate" onClick="popBox('<% = L_AUTHENTICATE_TEXT %>',500,350, 'nnauth')"></TD>
  133.     </TR>
  134. </TABLE>
  135.  
  136. </TD></TR>
  137. </TABLE>
  138. <HR>
  139. <TABLE CELLSPACING=0 CELLPADDING=2>
  140. <TR><TD><FONT SIZE=1 FACE="Helv"><B><% = L_SECOMM_TEXT %></B><P></TD></TR>
  141. <TR><TD>
  142.  
  143. <TABLE CELLSPACING=0 CELLPADDING=2>
  144.     <TR>
  145.         <TD>  </TD>
  146.         <TD WIDTH = 50 ALIGN="middle"><IMG SRC="images/key.gif" WIDTH=32 HEIGHT=28 BORDER=0></TD>
  147.         <TD WIDTH = 400 ALIGN="top"><FONT SIZE=1 FACE="Helv"><%=L_VIEWSECOMM_TEXT%></TD>
  148.         <TD ALIGN="middle"><INPUT TYPE="button" VALUE="<%=L_EDIT_TEXT%>" NAME="btnCommunication" onClick="popBox('<% = L_COMMUNICATIONS_TEXT %>',400,250, 'nncomm')"></TD>
  149.     </TR>
  150. </TABLE>
  151. </TD></TR>
  152. </TABLE>
  153.  
  154. <HR>
  155. <TABLE CELLSPACING=0 CELLPADDING=2>
  156. <TR><TD><FONT SIZE=1 FACE="Helv"><B><%=L_TCPRESTRICT_TEXT%></B></TD></TR>
  157. <TR><TD>
  158. <BLOCKQUOTE>
  159. <TABLE WIDTH = 100% CELLSPACING=0 CELLPADDING=2>
  160.     <TR>
  161.         <TD VALIGN="top">
  162.             <FONT SIZE=1 FACE="Helv">
  163.                     <%=L_BYDEFAULT_TEXT%>
  164.             </FONT>
  165.         </TD>
  166.         <TD VALIGN="top">
  167.             <FONT SIZE=1 FACE="Helv">
  168.                 <IMG SRC="images/smallkey.gif" WIDTH=17 HEIGHT=18 BORDER=0 ALIGN="middle">
  169.                 <INPUT TYPE="radio" NAME="rdoDefaultAccess" CHECKED>
  170.                 <% = L_GRANTED_TEXT %>
  171.                 <P>
  172.                 <IMG SRC="images/lock.gif" WIDTH=16 HEIGHT=18 BORDER=0  ALIGN="middle">
  173.                 <INPUT TYPE="radio" NAME="rdoDefaultAccess">
  174.                 <% = L_DENIED_TEXT%>
  175.             </FONT>
  176.         </TD>
  177.     </TR>
  178.     
  179.     <TR>
  180.         <TD><FONT SIZE=1 FACE="Helv"><%=L_EXCEPTBELOW_TEXT%></TD>
  181.     </TR>
  182. </TABLE>
  183.  
  184. </TD></TR>
  185. </TABLE>
  186. <P>
  187. <TABLE BORDER = 1 BORDERCOLORDARK="#CCCCCC" BORDERCOLORLIGHT="#CCCCCC">
  188. <TR >
  189. <TD BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000" ><FONT SIZE=1 FACE='HELV'>
  190.     <A HREF = "javascript:sortList('fname');">
  191.         <%=heading(18,L_ACCESS_TEXT)%>
  192.     </A>
  193. </TD>
  194. <TD BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000"><FONT SIZE=1 FACE='HELV'>
  195.     <A HREF = "javascript:sortList('fsize');">
  196.         <%=heading(22,L_IP_TEXT)%>
  197.     </A>
  198. </TD>
  199. <TD BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000"><FONT SIZE=1 FACE='HELV'>
  200.     <A HREF = "javascript:sortList('ftype');">
  201.         <%=heading(19,L_SUBNET_TEXT)%>
  202.     </A>
  203. </TD>
  204. <TD BORDERCOLORDARK="#FFFFFF" BORDERCOLORLIGHT="#000000"><FONT SIZE=1 FACE='HELV'>
  205.     <A HREF = "javascript:sortList('ftype');">
  206.         <%=heading(32,L_DOMAIN_TEXT)%>
  207.     </A>
  208. </TD>
  209. </TR>
  210. </TABLE>
  211.  
  212.  
  213. </FORM>
  214. <FORM name="hiddenform">
  215.     <INPUT TYPE="hidden" NAME="index" VALUE=0>
  216. </FORM>
  217.  
  218. <SCRIPT LANGUAGE="JavaScript">
  219.  
  220.     function loadList()
  221.     {
  222.         parent.list.location="nnsecls.asp";
  223.     }
  224.  
  225.     function sortList(sortby, sortasc)
  226.     {
  227.     
  228.     }
  229.  
  230.     function addItem()
  231.     {
  232.         i = testList.length
  233.         testList[i] = new listObj("<% = L_NEWAPPLICATION_TEXT %>", ".new", "\\path", "Low");
  234.         document.hiddenform.index.value = i;
  235.         testList[i].updated = true;    
  236.         testList[i].newitem = true;
  237.         loadList();
  238.     }
  239.  
  240.     function delItem()
  241.     {
  242.         i = eval(document.hiddenform.index.value);
  243.         testList[i].deleted = true;
  244.         testList[i].updated = true;    
  245.          i = i-1;
  246.         
  247.         <% REM run through the list to find the next non-deleted item %>
  248.         for (var j = i; j >=0; j--) {
  249.             if (testList[j].deleted){
  250.             }
  251.             else{
  252.                 break            
  253.             }
  254.         }
  255.  
  256.         document.hiddenform.index.value = j;
  257.         loadList();
  258.     }
  259.  
  260.     function buildListForm()
  261.     {
  262.     }
  263.  
  264.     function setListVals()
  265.     {
  266.     }
  267.  
  268.     function listFuncs()
  269.     {
  270.         this.addItem = addItem;
  271.         this.delItem = delItem;
  272.         this.writeList = buildListForm;
  273.         this.setListVals = setListVals;
  274.     }
  275.  
  276.  
  277.  
  278.     function listObj(a,ip,s,dmn)
  279.     {
  280.         this.access = a;
  281.         this.ip = ip;
  282.         this.subnet=s;
  283.         this.domain=dmn;
  284.         this.deleted = false;
  285.         this.updated = false;
  286.         this.newitem = false;
  287.     }
  288.  
  289.     testList = new Array(2)
  290.     for (var i = 0; i < 2; i++) 
  291.     {
  292.         testList[i] = new listObj(true, "131.112.200.12","255.255.0.0","");
  293.     }
  294.  
  295.  
  296.     listFunc = new listFuncs();
  297.  
  298.     //parent.parent.tool.location = "nntl2.asp?list=1"
  299.  
  300.  
  301. </SCRIPT>
  302. </BODY>
  303. <% end if %>
  304. </HTML>
  305.  
  306.