<% Response.Expires = 0 %> <% REM Directories Page add/edit pop-up %> <% L_EDITDIRECTORYPROP_TEXT = "Edit Directory Properties" L_ADDDIRECTORY_TEXT = "Add Directory" L_NEWSGROUPSUBTREE_TEXT = "Newsgroup subtree:" L_EDITDIRECTORYON_TEXT = "Edit Directory on" L_ADDDIRECTORYON_TEXT = "Add Directory on" L_PATH_TEXT = "Path:" L_ACCOUNTINFORMATION_TEXT = "Account Information" L_USERNAME_TEXT = "User name:" L_PASSWORD_TEXT = "Password:" L_ACCESS_TEXT = "Access" L_ALLOWPOSTING_TEXT = "Allow posting" L_REQUIRESECURE_TEXT = "Require secure channel" L_REQUIRE128_TEXT = "Require 128 Bit Encryption" L_RESTRICTGROUP_TEXT = "Restrict Group Visibility" L_OK_TEXT = "OK" L_CANCEL_TEXT = "Cancel" L_HELP_TEXT = "Help" L_ENTERDIRECTORYNAME_TEXT = "Please enter a directory name." L_ENTERSUBTREENAME_TEXT = "Please enter a subtree root." L_HOMEDIRECTORY_TEXT = "A home directory already exists for this service. Do you want to replace it?" L_ENTERDIRNAME_TEXT = "Please enter a directory name." L_SUBTREEROOT_TEXT = "Please enter a subtree root." L_SUBTREEROOT_ERRORMESSAGE = "The subtree root syntax is incorrect." L_REQUIRESECURECHANNEL_TEXT = "Require Secure Channel must be enabled to Require 128-bit Encryption\nDo you want to enable Require Secure Channel?" L_UNCPATHACCOUNT_TEXT = "Account user name and password are only valid for UNC paths." L_EDIT_TEXT = "edit" ' Internal String Do NOT localize L_SAVE_TEXT = "save" ' Internal String Do NOT localize L_NEW_TEXT = "new" ' Internal String Do NOT localize L_ADD_TEXT = "add" ' Internal String Do NOT localize L_ON_TEXT = "on" ' Internal String Do NOT localize %> <% REM Get variables %> <% REM svr = Server name %> <% REM a = Action to be performed by server-side code (new/add,edit/save) %> <% REM DirRoot = Directory root being edited %> <% REM DirHome = Whether a home directory already exists for service %> <% svr = Session("svr") %> <% a = Request("a") %> <% DirRoot = Request("DirRoot") %> <% DirHome = Request("DirHome") %> <% VRootIndex = Request("index") %> <% REM Include _cnst file to force logon by anonymous users (if access denied, body of file ignored) %> <% if (cont = true) then %> <% On Error Resume Next %> <% Set admin = Server.CreateObject("Nntpadm.Admin.1") %> <% if (Err <> 0) then %> <% end if %> <% On Error Resume Next %> <% Set VServer = CreateObject("NntpAdm.VirtualServer") %> <% if (Err <> 0) then %> <% end if %> <% REM Set Server %> <% On Error Resume Next %> <% VServer.Server = svr %> <% if (Err <> 0) then %> <% end if %> <% REM Set Service Instance %> <% On Error Resume Next %> <% VServer.ServiceInstance = Session("ServiceInstance") %> <% if (Err <> 0) then %> <% end if %> <% On Error Resume Next %> <% set Vroots = VServer.VirtualRoots %> <% if (Err <> 0) then %> <% end if %> <% REM Set Server %> <% On Error Resume Next %> <% Vroots.Server = svr %> <% if (Err <> 0) then %> <% end if %> <% REM Set Service Instance %> <% On Error Resume Next %> <% Vroots.ServiceInstance = Session("ServiceInstance") %> <% if (Err <> 0) then %> <% end if %> <% REM Enumerate Virtual Roots %> <% On Error Resume Next %> <% Vroots.Enumerate %> <% if (Err <> 0) then %> <% end if %> <% REM Generic Javascript function nnisFull returns alert if field is empty %> <% if (a = L_EDIT_TEXT) then %> <% = L_EDITDIRECTORYPROP_TEXT %> <% elseif (a = L_NEW_TEXT) then %> <% = L_ADDDIRECTORY_TEXT %> <% end if %> <% if ((a = L_ADD_TEXT) OR (a = L_SAVE_TEXT)) then %> <% DirDirectory = Cstr(Request("newDirectory")) %> <% DirDirectory = Replace(DirDirectory,"%5C","\") %> <% DirDirectory = Replace(DirDirectory,"%3A",":") %> <% DirRoot = Request("txtDirRoot") %> <% originalDirRoot = Request("txtOriginalDirRoot") %> <% DirAccountName = Request("txtDirAccountName") %> <% DirAccountPassword = Request("hdnDirAccountPassword") %> <% if (Request("chkDirAccessPosting") = L_ON_TEXT) then %> <% DirAccessPosting = 1 %> <% else %> <% DirAccessPosting = 0 %> <% end if %> <% if (Request("chkDirAccessSsl") = L_ON_TEXT) then %> <% DirAccessSsl = 1 %> <% else %> <% DirAccessSsl = 0 %> <% end if %> <% if (Request("chkDir128BitSsl") = L_ON_TEXT) then %> <% Require128BitSsl = 1 %> <% else %> <% Require128BitSsl = 0 %> <% end if %> <% if (Request("DirAccessRestrictVisibility") = L_ON_TEXT) then %> <% DirAccessRestrictVisibility = 1 %> <% else %> <% DirAccessRestrictVisibility = 0 %> <% end if %> <% if (a = L_ADD_TEXT) then %> <% On Error Resume Next %> <% set thisVroot = Server.CreateObject("nntpadm.VirtualRoot") %> <% if (Err <> 0) then %> <% end if %> <% thisVroot.NewsgroupSubtree = DirRoot %> <% thisVroot.Directory = DirDirectory %> <% thisVroot.UNCUserName = DirAccountName %> <% thisVroot.UNCPassword = DirAccountPassword %> <% thisVroot.AllowPosting = DirAccessPosting %> <% thisVroot.RequireSsl = DirAccessSsl %> <% thisVroot.Require128BitSsl = Require128BitSsl %> <% thisVroot.RestrictGroupVisibility = DirAccessRestrictVisibility %> <% On Error Resume Next %> <% Vroots.AddDispatch(thisVroot) %> <% if (Err <> 0) then %> <% end if %> <% elseif (a = L_SAVE_TEXT) then %> <% if (originalDirRoot <> DirRoot) then %> <% REM Create a new virtual root to copy new values into %> <% On Error Resume Next %> <% set thisVroot = Server.CreateObject("nntpadm.VirtualRoot") %> <% if (Err <> 0) then %> <% end if %> <% else %> <% REM Get pointer to existing virtual root directory %> <% On Error Resume Next %> <% set thisVroot = Vroots.Item(Cint(VRootIndex)) %> <% if (Err <> 0) then %> <% end if %> <% end if %> <% thisVroot.NewsgroupSubtree = DirRoot %> <% thisVroot.Directory = DirDirectory %> <% thisVroot.UNCUserName = DirAccountName %> <% thisVroot.UNCPassword = DirAccountPassword %> <% thisVroot.AllowPosting = DirAccessPosting %> <% thisVroot.RequireSsl = DirAccessSsl %> <% thisVroot.Require128BitSsl = Require128BitSsl %> <% thisVroot.RestrictGroupVisibility = DirAccessRestrictVisibility %> <% if (originalDirRoot <> DirRoot) then %> <% On Error Resume Next %> <% Vroots.AddDispatch(thisVroot) %> <% if (Err <> 0) then %> <% else %> <% Vroots.Remove(Cint(vRootIndex)) %> <% end if %> <% else %> <% On Error Resume Next %> <% Vroots.SetDispatch VRootIndex, thisVroot %> <% if (Err <> 0) then %> <% end if %> <% end if %> <% end if %> <% end if %> <% if (a = L_NEW_TEXT) then %> <% On Error Resume Next %> <% set thisVroot = Server.CreateObject("nntpadm.VirtualRoot") %> <% if (Err <> 0) then %> <% end if %> <% thisVroot.Directory = "" %> <% thisVroot.NewsgroupSubtree = L_NEW_TEXT %> <% thisVroot.UNCUserName = "" %> <% thisVroot.UNCPassword = "" %> <% thisVroot.AllowPosting = 1 %> <% thisVroot.RestrictGroupVisibility = 0 %> <% thisVroot.RequireSsl = 0 %> <% thisVroot.Require128BitSsl = 0 %> <% elseif (a = L_EDIT_TEXT) then %> <% REM Get a pointer to the Virtual Root we are editing %> <% On Error Resume Next %> <% set thisVroot = Vroots.ItemDispatch(VRootIndex) %> <% if (Err <> 0) then %> <% end if %> <% end if %>

  <% if (a = L_EDIT_TEXT) then %> <% = L_EDITDIRECTORYON_TEXT %> <% elseif (a = L_NEW_TEXT) then %> <% = L_ADDDIRECTORYON_TEXT %> <% end if %> <% = svr %>
<% = L_NEWSGROUPSUBTREE_TEXT %>
<% = L_PATH_TEXT %>
<% = L_ACCOUNTINFORMATION_TEXT %>
<% = L_USERNAME_TEXT %>  
<% = L_PASSWORD_TEXT %> <% if (thisVroot.UNCPassword <> "") then %> <% else %> <% end if %>
<% = L_ACCESS_TEXT %>
<% if (thisVroot.AllowPosting = 1) then %> <% else %> <% end if %>   <% = L_ALLOWPOSTING_TEXT %>

<% if (thisVroot.RequireSSL = 1) then %> <% else %> <% end if %>   <% = L_REQUIRESECURE_TEXT %>

<% if (thisVroot.Require128BitSsl = 1) then %> <% else %> <% end if %>   <% = L_REQUIRE128_TEXT %>

<% if (thisVroot.RestrictGroupVisibility = 1) then %> <% else %> <% end if %>   <% = L_RESTRICTGROUP_TEXT %>

<% = L_OK_TEXT %>
<% = L_CANCEL_TEXT %>
<% = L_HELP_TEXT %>
 

<% end if %>