home *** CD-ROM | disk | FTP | other *** search
- <% Response.Expires = 0 %>
-
- <%
- REM LOCALIZATION
-
- L_PAGETITLE_TEXT = "Microsoft NNTP Server Administration"
- L_SVCINSTNCPROPS_TEXT = "Virtual Directory Properties for"
- L_PATHTYPE_TEXT = "Path Type:"
- L_PATH_TEXT = "Path:"
- L_ALLOWPOSTING_TEXT = "Allow Posting"
- L_LOGACCESS_TEXT = "Log access to this virtual directory"
- L_EDITBUTTON_TEXT = " Edit... "
- L_ACCESS_TEXT = "Access"
- L_RESTRICT_TEXT = "Restrict Group Visibility"
- L_ACCOUNTINFO_TEXT = "Account Information"
- L_SECURECOMM_TEXT = "Secure Communications"
- L_REQUIRESECURECHANNEL_TEXT = "Require Secure Channel"
- L_REQUIRE128BIT_TEXT = "Require 128-bit Encryption"
- L_INDEXNEWSCONTNET_TEXT = "Index News Content"
- L_USERNAME_TEXT = "User name:"
- L_PASSWORD_TEXT = "Password:"
- L_ACCOUNTUNC_TEXT = "Account user name and password are only valid for UNC paths."
- L_ENTERINTEGER_ERRORMESSAGE = "Please enter an integer between 0 and "
- L_DIRECTORYSYNTAX_TEXT = "The directory syntax is incorrect."
- L_REQUIRESECURECHANNEL128_TEXT = "Require Secure Channel must be enabled to Require 128-bit Encryption\nDo you want to enable Require Secure Channel?"
-
-
- REM END LOCALIZATION
- %>
-
- <% REM Virtual Server Home Directory Page %>
-
- <% REM Get variables %>
- <% REM svr = Server name %>
-
- <% svr = Request("svr") %>
-
- <HTML>
- <HEAD>
- <TITLE><% = L_PAGETITLE_TEXT %></TITLE>
- </HEAD>
-
- <SCRIPT LANGUAGE="javascript">
-
- <% REM Determine browser to set pop-up window size %>
- <% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then %>
- winstr = "width=390,height=200,directories=no,status=no,scrollbars=no,resize=no";
- <% else %>
- winstr = "width=420,height=270,menubar=no,directories=no,status=no,scrollbars=no,resize=no";
- <% end if %>
-
- <% REM Create uForm object and methods %>
-
- uForm = new Object();
- uForm.writeForm = writeForm;
- uForm.readCache = readCache;
-
- <% REM Javascript function readCache loads fields from hiddenform in sidebar %>
-
- function readCache()
- {
- hform = top.menu.document.hiddenform;
- uform = document.userform;
- uform.txtDirectory.value = hform.txtDirectory.value;
- uform.chkLogAccess.checked = (hform.chkLogAccess.value == "1");
- uform.chkAllowPosting.checked = (hform.chkAllowPosting.value == "1");
- uform.txtUNCUserName.value = hform.txtUNCUserName.value;
- uform.txtUNCPassword.value = hform.txtUNCPassword.value;
- uform.hdnUNCPassword.value = hform.txtUNCPassword.value;
- uform.chkRestrictGroupVisibility.checked = (hform.chkRestrictGroupVisibility.value == "1");
- uform.chkRequire128BitSsl.checked = (hform.chkRequire128BitSsl.value == "1");
- uform.chkRequireSsl.checked = (hform.chkRequireSsl.value == "1");
- uform.hdnRequire128BitSsl.value = hform.chkRequireSsl.value;
- uform.chkIndexNewsContent.checked = txtToChk(hform.txtIndexNewsContent);
- }
-
- <% REM Javascript function writeForm sets values in hiddenform %>
-
- function writeForm()
- {
- hform = top.menu.document.hiddenform;
- uform = document.userform;
- hform.txtDirectory.value = uform.txtDirectory.value;
- hform.chkLogAccess.value = chkToTxt(uform.chkLogAccess);
- hform.chkAllowPosting.value = chkToTxt(uform.chkAllowPosting);
- hform.txtUNCUserName.value = uform.txtUNCUserName.value;
- hform.txtUNCPassword.value = uform.hdnUNCPassword.value;
- hform.chkRestrictGroupVisibility.value = chkToTxt(uform.chkRestrictGroupVisibility);
- hform.chkRequireSsl.value = chkToTxt(uform.chkRequireSsl);
- hform.chkRequire128BitSsl.value = chkToTxt(uform.chkRequire128BitSsl);
- hform.txtIndexNewsContent.value = chkToTxt(uform.chkIndexNewsContent);
- }
-
- <% REM Javascript function chkToTxt converts checkbox bools to text value for hiddenform %>
-
- function chkToTxt(chkControl)
- {
- if (chkControl.checked)
- {
- return "1";
- }
- else
- {
- return "0";
- }
- }
-
- function txtToChk(txtControl)
- {
- if ((txtControl.value == "0") || (txtControl.value == ""))
- {
- return false;
- }
- else
- {
- return true;
- }
- }
- <% REM Javascript function setPassword %>
-
- function setPassword()
- {
- if (document.userform.txtUNCPassword.value != "")
- {
- document.userform.hdnUNCPassword.value = document.userform.txtUNCPassword.value;
- document.userform.txtUNCPassword.value = "**************";
- }
- }
-
- <% REM Javascript function chkUNC %>
-
- function chkUNC(thisControl)
- {
- dirstr = document.userform.txtDirectory.value;
- if (dirstr.substring(1,2) != "\\")
- {
- alert("<% = L_ACCOUNTUNC_TEXT %>");
- thisControl.value = "";
- }
- else
- {
- setPassword();
- }
- }
-
- <% REM Javascript function setUNCAccount %>
-
- function setUNCAccount(dirString)
- {
- if (dirString.substring(1,2)!= "\\")
- {
- document.userform.txtUNCUserName.value = "";
- document.userform.txtUNCPassword.value = "";
- }
- }
-
- <% REM Javascript function setUpdated sets "updated" flag in hiddenform when a field is changed %>
-
- function setUpdated() {
- top.menu.document.hiddenform.updated.value = "true";
- }
-
- <% REM Javascript function checkRange checks values between 0 and specified range %>
-
- function checkRange(thisControl,range)
- {
- if (isFull(thisControl.value) && isNum(thisControl.value))
- {
- if (thisControl.value > range)
- {
- alert("<% = L_ENTERINTEGER_ERRORMESSAGE %>" + range + ".");
- thisControl.focus();
- }
- }
- }
-
- <% REM Ensures that characters in directory text input field are valid %>
- function chkChar(txtfield)
- {
- txtvalue = txtfield.value
- i = (txtvalue.indexOf("'") + txtvalue.indexOf('"'));
- i = (i + txtvalue.indexOf("<") + txtvalue.indexOf('>') + txtvalue.indexOf('%'));
- i = (i + txtvalue.indexOf("&") + txtvalue.indexOf("#") + txtvalue.indexOf("("));
- i = (i + txtvalue.indexOf("+") + txtvalue.indexOf(")") + txtvalue.indexOf("@"));
- i = (i + txtvalue.indexOf("~") + txtvalue.indexOf("`") + txtvalue.indexOf("!"));
- i = (i + txtvalue.indexOf("^") + txtvalue.indexOf("*") + txtvalue.indexOf("="));
- i = (i + txtvalue.indexOf("|") + txtvalue.indexOf(";"));
- i = (i + txtvalue.indexOf(",") + txtvalue.indexOf("?"));
- if (i != -21)
- {
- alert("<% = L_DIRECTORYSYNTAX_TEXT %>");
- document.userform.txtDirectory.value = top.menu.document.hiddenform.txtDirectory.value;
- document.userform.txtDirectory.focus();
- return false;
- }
- else
- {
- return true;
- }
- }
-
- <% REM Javascript function maintainChk %>
- function maintainChk()
- {
- uform = document.userform;
- if (uform.chkRequireSsl.checked)
- {
- uform.chkRequire128BitSsl.checked = (uform.hdnRequire128BitSsl.value == "1");
- }
- else
- {
- uform.hdnRequire128BitSsl.value = chkToTxt(uform.chkRequire128BitSsl);
- uform.chkRequire128BitSsl.checked = false;
- }
- }
-
- function chkSsl()
- {
- if (!uform.chkRequireSsl.checked)
- {
- if(confirm("<% = L_REQUIRESECURECHANNEL128_TEXT %>"))
- {
- uform.chkRequireSsl.checked = true;
- uform.chkRequire128BitSsl.checked = true;
- return true;
- }
- else
- {
- uform.chkRequire128BitSsl.checked = false;
- return false;
- }
- }
- }
-
-
- <% REM Javascript function editItem %>
- function editItem()
- {
- win = window.open("nnvsed.asp?svr=<% = svr %>","PropWindow",winstr)
- if (win.opener == null)
- {
- win.opener = self;
- }
- }
-
- </SCRIPT>
- <% REM Generic Javascript functions %>
-
- <!--#include file="nnisnum.htm" -->
- <!--#include file="nnisfull.htm" -->
-
- <BODY BGCOLOR="#CCCCCC" TEXT="#000000" TOPMARGIN="10">
- <FORM NAME="userform" onSubmit="return false;">
- <P>
- <IMG SRC="images/gnicttl.gif" ALIGN="textmiddle" HEIGHT=10 WIDTH=10> <FONT SIZE=2 FACE="Arial"><B><% = L_SVCINSTNCPROPS_TEXT %> </B></FONT><FONT FACE="Times New Roman" SIZE=3><I><% = svr %></I></FONT>
- <FONT FACE="Arial" SIZE=2>
- <P>
- <P>
- <P>
- <P>
- <BLOCKQUOTE>
- <TABLE BORDER="0" WIDTH="400">
- <TR>
- <TD COLSPAN="2" HEIGHT="10">
-
- </TD>
- </TR>
- <TR>
- <TD WIDTH=80>
- <FONT SIZE=2 FACE="Arial"><B><% = L_PATH_TEXT %></B></FONT>
- </TD>
- <TD WIDTH=220>
- <INPUT TYPE="text" NAME="txtDirectory" value="" size="25" onBlur="setUpdated();setUNCAccount(this.value);chkChar(this);" onChange="setUpdated();setUNCAccount(this.value);chkChar(this);">
- </TD>
- </TR>
- <TR>
- <TD COLSPAN=2 HEIGHT=10></TD>
- </TR>
- <TR>
- <TD COLSPAN=2>
- <FONT FACE="Arial" SIZE=2>
- <B><% = L_ACCOUNTINFO_TEXT %></B>
- </FONT>
- </TD>
- </TR>
- <TR>
- <TD COLSPAN=2>
- <BLOCKQUOTE>
- <TABLE>
- <TR>
- <TD><FONT SIZE=2 FACE="Arial"><% = L_USERNAME_TEXT %> </TD>
- <TD><INPUT TYPE="text" NAME="txtUNCUserName" SIZE = 25 VALUE="" onBlur="chkUNC(this);" onChange="chkUNC(this);"></TD></TR>
- <TR>
- <TD COLSPAN=2 HEIGHT=4></TD>
- </TR>
- <TR>
- <TD>
- <FONT SIZE=2 FACE="Arial"><% = L_PASSWORD_TEXT %>
- </TD>
- <TD>
- <% if (UNCPassword <> "") then %>
- <INPUT TYPE="text" NAME="txtUNCPassword" SIZE=25 VALUE="**************" onBlur="chkUNC(this);" onChange="chkUNC(this);">
- <% else %>
- <INPUT TYPE="text" NAME="txtUNCPassword" SIZE=25 VALUE="" onBlur="chkUNC(this);" onChange="chkUNC(this);">
- <% end if %>
- <INPUT TYPE="hidden" NAME="hdnUNCPassword" VALUE=""></TD>
- </TR>
- </TABLE>
-
- </BLOCKQUOTE>
- <TR>
- <TD COLSPAN=2 HEIGHT=4></TD>
- </TR>
- <TR>
- <TD COLSPAN=2>
- <FONT FACE="Arial" SIZE=2>
- <B><% = L_ACCESS_TEXT %></B>
- </FONT>
- </TD>
- </TR>
- <TR>
- <TD COLSPAN=2>
- <BLOCKQUOTE>
- <TABLE>
- <TR>
- <TD>
-
- </TD>
- <TD>
- <INPUT NAME="chkAllowPosting" TYPE="checkbox" onClick="setUpdated();"> <FONT SIZE=2 FACE="Arial"><% = L_ALLOWPOSTING_TEXT %></FONT>
-
- </TD>
- </TR>
- <TR>
- <TD HEIGHT=4>
- </TD>
- </TR>
- <TR>
- <TD>
-
- </TD>
- <TD>
- <INPUT NAME="chkLogAccess" TYPE="checkbox" onClick="setUpdated();"> <FONT SIZE=2 FACE="Arial"><% = L_LOGACCESS_TEXT %></FONT>
-
- </TD>
- </TR>
- <TR>
- <TD HEIGHT=4>
- </TD>
- </TR>
- <TR>
- <TD>
-
- </TD>
- <TD>
- <INPUT NAME="chkRestrictGroupVisibility" TYPE="checkbox" onClick="setUpdated();"> <FONT SIZE=2 FACE="Arial"><% = L_RESTRICT_TEXT %></FONT>
-
- </TD>
- </TR><TR>
- <td> </td>
- <TD>
- <INPUT NAME="chkIndexNewsContent" type="checkbox" OnClick="setUpdated();"> <FONT SIZE=2 FACE="Arial"><% = L_INDEXNEWSCONTNET_TEXT %></FONT>
- </TD>
- </TR>
- </TABLE>
- </BLOCKQUOTE>
- <TR>
- <TD COLSPAN=2 HEIGHT=4></TD>
- </TR>
- <TR>
- <TD COLSPAN=2>
- <FONT FACE="Arial" SIZE=2>
- <B><% = L_SECURECOMM_TEXT %></B>
- </FONT>
- </TD>
- </TR>
- <TR>
- <TD COLSPAN=2>
- <BLOCKQUOTE>
- <TABLE>
- <TR>
- <TD>
-
- </TD>
- <TD>
- <INPUT NAME="chkRequireSsl" TYPE="checkbox" onClick="maintainChk();setUpdated();"> <FONT SIZE=2 FACE="Arial"><% = L_REQUIRESECURECHANNEL_TEXT %></FONT>
-
- </TD>
- </TR>
- <TR>
- <TD HEIGHT=4>
- </TD>
- </TR>
- <TR>
- <TD>
-
- </TD>
- <TD>
- <INPUT NAME="chkRequire128BitSsl" TYPE="checkbox" onClick="chkSsl();setUpdated();"> <FONT SIZE=2 FACE="Arial"><% = L_REQUIRE128BIT_TEXT %></FONT>
- <INPUT NAME="hdnRequire128BitSsl" TYPE="hidden" VALUE="">
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- </BLOCKQUOTE>
- </FORM>
- <script language="javascript">
- readCache();
- </script>
- </BODY>
- </HTML>
-