home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / ims.cab / smsec.asp < prev    next >
Text File  |  1997-10-15  |  3KB  |  118 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <%'----------------------------------------------------------------------------
  3. '
  4. '
  5. '   File: smsec.asp
  6. '
  7. '   Description: Directory Security property sheet for SMTP
  8. '
  9. '   Copyright (C) 1997 Microsoft Corporation
  10. '
  11. '------------------------------------------------------------------------------%>
  12.  
  13. <% 
  14. Const L_ACCESSCONTROL_TEXT    = "Anonymous Access and Authentication Control"
  15. Const L_ENABLEANON_TEXT        = "Enable anonymous access and edit the authentication methods for this resource."
  16. Const L_SECCOMM_TEXT        = "Secure Communictions"
  17. Const L_VIEWSECOMM_TEXT        = "View or set the secure communications method used when the virtual server is accessed."
  18. Const L_EDIT_TEXT            = "Edit..."
  19.  
  20. 'Check for non-NT security
  21. On Error Resume Next
  22. Dim fDefaultSecurity
  23. Dim MemAdminObj
  24. Dim ServiceInstance
  25. Dim SercurityMode
  26.  
  27. if Session("ServiceInstance") = "" then
  28.     ServiceInstance = 1
  29. else
  30.     ServiceInstance = Session("ServiceInstance")
  31. end if
  32.  
  33. fDefaultSecurity = true
  34. Set MemAdminObj = CreateObject("MemAdmin.BrokServers")
  35. If Err = 0 then
  36.     MemAdminObj.Init 'According to object authors, Init() Errors can be ignored
  37.     SecurityMode = MemAdminObj.GetSecurityMode("smtpsvc", ServiceInstance)
  38.     if Err = 0 then
  39.         fDefaultSecurity = CBool(SecurityMode)
  40.     else
  41.         Err.Clear()
  42.     end if
  43. else
  44.     Err.Clear() 'object not installed
  45. end if
  46. %>
  47.  
  48. <HTML>
  49. <HEAD>
  50. <SCRIPT LANGUAGE="JavaScript">
  51.  
  52.     
  53.     function popBox(title, width, height, filename){
  54.         thefile=(filename + ".asp");
  55.         //thefile="smpop.asp?pg="+thefile;
  56.         <% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE")=0 then %>
  57.             width=width +25;
  58.             height=height + 50;
  59.         <% end if %>
  60.  
  61.         popbox=window.open(thefile,title,"toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  62.         if(popbox !=null)
  63.         {
  64.             if (popbox.opener==null)
  65.             {
  66.                 popbox.opener=self;
  67.             }
  68.         }
  69.     }
  70.  
  71. </SCRIPT>
  72.  
  73.     <TITLE></TITLE>
  74. </HEAD>
  75.  
  76. <BODY BGCOLOR="#CCCCCC" TOPMARGIN=5 TEXT="#000000" LINK="#000000" VLINK="#000000">
  77. <!-- STYLE="font-face: Helv; font-size: 8pt;"> -->
  78. <FORM NAME="userform">
  79. <% if fDefaultSecurity then %>
  80. <TABLE CELLSPACING=0 CELLPADDING=2>
  81. <TR><TD><FONT SIZE=1 FACE="Helv"><B><%= L_ACCESSCONTROL_TEXT %></B><P></FONT></TD></TR>
  82.  
  83. <TR><TD>
  84.  
  85. <TABLE CELLSPACING=0 CELLPADDING=2>
  86.  
  87.     <TR>
  88.         <TD>  </TD>
  89.         <TD WIDTH=50 VALIGN="middle"><IMG SRC="images/handshk.gif" WIDTH=32 HEIGHT=28 BORDER=0></TD>
  90.         <TD WIDTH=400 VALIGN="top"><FONT SIZE=1 FACE="Helv"><%= L_ENABLEANON_TEXT %></FONT></TD>
  91.         <TD VALIGN="middle"><INPUT TYPE="button" VALUE="<%= L_EDIT_TEXT %>" NAME="btnAuthenticate" onClick="popBox('access',600,430, 'smaccess')"></TD>
  92.     </TR>
  93. </TABLE>
  94.  
  95. </TD></TR>
  96. </TABLE>
  97. <HR>
  98. <% end if %>
  99. <TABLE CELLSPACING=0 CELLPADDING=2>
  100. <TR><TD><FONT SIZE=1 FACE="Helv"><B><%= L_SECCOMM_TEXT %></B><P></FONT></TD></TR>
  101. <TR><TD>
  102.  
  103. <TABLE CELLSPACING=0 CELLPADDING=2>
  104.     <TR>
  105.         <TD>  </TD>
  106.         <TD WIDTH=50 VALIGN="middle"><IMG SRC="images/key.gif" WIDTH=32 HEIGHT=28 BORDER=0></TD>
  107.         <TD WIDTH=400 VALIGN="top"><FONT SIZE=1 FACE="Helv"><%= L_VIEWSECOMM_TEXT %></FONT></TD>
  108.         <TD VALIGN="middle"><INPUT TYPE="button" VALUE="<%= L_EDIT_TEXT %>" NAME="btnCommunication" onClick="popBox('secure',400,410, 'smcomm')"></TD>
  109.     </TR>
  110. </TABLE>
  111. </TD></TR>
  112. </TABLE>
  113.  
  114. </FORM>
  115. </BODY>
  116.  
  117. </HTML>
  118.