<% Response.Expires = 0 %> <% REM LOCALIZATION L_SERVICE_ERRORMESSAGE = "Service Error is: " L_PAGETITLE_TEXT = "Microsoft Internet Service Manager" L_TCPPORTCHANGE_TEXT = "The change in port number will not take effect until the service has been restarted." L_PATHHEADERFIELDNAME_ERRORMESSAGE = "Invalid Path Header Field name." L_MENUTITLE_TEXT = "News Admin" L_SERVER_TEXT = "Services" L_VIRTSERVER_TEXT = "NNTP Site" L_SESSIONS_TEXT = "Sessions" L_GENERAL_TEXT = "NNTP Settings" L_FEEDS_TEXT = "Feeds" L_EXPIRATION_TEXT = "Expiration Policies" L_GROUPS_TEXT = "Groups" L_DIRECTORIES_TEXT = "Directories" L_DIRSECURITY_TEXT = "Security" L_HOMEDIRECTORY_TEXT="Home Directory" L_UNSAVEDPROPERTYCHANGES_TEXT = "You have unsaved property changes. Do you want to save them now?" L_FALSE_TEXT = "false" 'internal string do NOT localize L_CHANGE_TEXT = "change"'internal string do NOT localize L_TRUE_TEXT = "true"'internal string do NOT localize L_APPLY_TEXT = "apply"'internal string do NOT localize REM END LOCALIZATION %> <% REM Conversion Variables %> <% ONE_KILOBYTE = 1024 %> <% ONE_MEGABYTE = 1024 * 1024 %> <% REM Get variables %> <% REM svr = Server name %> <% REM a = Action to be performed by server-side code (apply) %> <% REM pg = Current page in main frame %> <% save = Request("save") %> <% svr = Session("svr") %> <% pg = Request("pg") %> <% REM Set or Get find from Session Object if it exists to maintain %> <% REM the search value for the groups page %> <% if (Session("find") = "") then %> <% Session("find") = Request("txtFindNewsgroup") %> <% end if %> <% find = Session("find") %> <% if (find = "") then %> <% find = "*" %> <% end if %> <% REM If no main page is selected, set to Service page %> <% if (pg = "") then %> <% pg = "nnser" %> <% end if %> <% REM Determine browser type (MS Internet Explorer or NS Navigator) %> <% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"IE") then %> <% browser = "ms" %> <% else %> <% browser = "ns" %> <% end if %> <% 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 nntpService = Server.CreateObject("Nntpadm.VirtualServer.1") %> <% if (Err <> 0 ) then %> <% end if %> <% REM Get pointer to Virtual Roots Object %> <% set vrObj = nntpService.virtualroots %> <% REM Set Virtual Root Server %> <% vrObj.server = Session("svr") %> <% REM Set Virtual Root Service Instance %> <% vrObj.ServiceInstance = Session("ServiceInstance") %> <% REM Enumerate Virtual Roots %> <% vrObj.Enumerate %> <% REM Get Default Virtual Root (at index 0) %> <% set vr = vrObj.Item(0) %> <% REM Set nntp Service Server %> <% On Error Resume Next %> <% nntpService.Server = svr %> <% if (Err <> 0 ) then %> <% end if %> <% REM Set nntp Service Service Instance %> <% On Error Resume Next %> <% nntpService.ServiceInstance = Session("ServiceInstance") %> <% if (Err <> 0 ) then %> <% end if %> <% = L_PAGETITLE_TEXT %> <% REM Display navigational links %> <% REM If browser is IE, use floating frame nav arrow; if Netscape, use image replacement nav arrow %> <% if (browser = "ms") then %> <% else %> <% end if %> <% REM Perform "apply" action %> <% if (save = L_APPLY_TEXT) then %> <% REM Get Service Properties %> <% On Error Resume Next %> <% nntpService.Get %> <% if ( Err <> 0 ) then %> <% end if %> <% REM Get pointer to bindings object %> <% On Error Resume Next %> <% set binding = nntpService.Bindings %> <% if (Err <> 0 ) then %> <% end if %> <% REM Get pointer to bindings item %> <% On Error Resume Next %> <% set bindings = nntpService.Bindings.Item(0) %> <% if (Err <> 0 ) then %> <% end if %> <% REM next 2 properties are part of "Bindings" object %> <% bindings.IPAddress = Request("txtIPAddress") %> <% bindings.TCPPort = Request("txtTCPPort") %> <% bindings.SSLPort = Request("txtSSLPort") %> <% REM Change binding to new values. Method takes index of %> <% REM bindings item and a pointer to the bindings item %> <% On Error Resume Next %> <% binding.ChangeBinding 0, bindings %> <% if (Err <> 0 ) then %> <% end if %> <% REM Set Service page properties %> <% nntpService.Comment = Request("txtDescription") %> <% nntpService.UucpName = Request("txtPathHeaderField") %> <% nntpService.MaxConnections = Request("txtMaxConnections") %> <% nntpService.ConnectionTimeout = Request("txtConnectionTimeout") %> <% nntpService.SecurePort = Request("txtSSLPort") %> <% REM Set General page properties %> <% REM Script must check for blank Path Header Field (Unique Path ID) %> <% REM because SSO doesn't throw out illegal value %> <% REM Blank value will cause script to crash; call ConfigGetInfo %> <% REM to default to original value %> <% PathHeaderField = Request("txtPathHeaderField") %> <% if (PathHeaderField <> "") then %> <% nntpService.UucpName = Request("txtPathHeaderField") %> <% end if %> <% REM Convert kbytes and Mbytes to bytes %> <% cnvClientPostSoftLimit = ((Request("txtConfigServerPostSoftLimit")) * ONE_KILOBYTE) %> <% cnvClientPostHardLimit = ((Request("txtConfigServerPostHardLimit")) * ONE_MEGABYTE) %> <% cnvFeedPostSoftLimit = ((Request("txtConfigServerFeedSoftLimit")) * ONE_KILOBYTE) %> <% cnvFeedPostHardLimit = ((Request("txtConfigServerFeedHardLimit")) * ONE_MEGABYTE) %> <% nntpService.AllowClientPosts = Request("chkConfigAllowClientPosting") %> <% nntpService.ClientPostSoftLimit = cnvClientPostSoftLimit %> <% nntpService.ClientPostHardLimit = cnvClientPostHardLimit %> <% nntpService.AllowFeedPosts = Request("chkConfigAllowFeedPosting") %> <% nntpService.FeedPostSoftLimit = cnvFeedPostSoftLimit %> <% nntpService.FeedPostHardLimit = cnvFeedPostHardLimit %> <% nntpService.AllowControlMsgs = Request("chkConfigAllowControlMessages") %> <% nntpService.SmtpServer = Request("txtConfigSmtpServerAddress") %> <% nntpService.DefaultModeratorDomain = Request("txtConfigDefaultModeratorDomain") %> <% nntpService.EnableLogging = Request("txtEnableLogging") %> <% nntpService.AdminEmail = Request("txtAdministratorEmail") %> <% REM Update Home Directory Page Values (through virtualroots interface) %> <% vr.Directory = Request("txtDirectory") %> <% vr.AllowPosting = Request("chkAllowPosting") %> <% vr.LogAccess = Request("chkLogAccess") %> <% vr.UNCPassword = Request("txtUNCPassword") %> <% vr.UNCUserName = Request("txtUNCUserName") %> <% vr.RestrictGroupVisibility = Request("chkRestrictGroupVisibility") %> <% vr.RequireSsl = Request("chkRequireSsl") %> <% vr.Require128BitSsl = Request("chkRequire128BitSsl") %> <% vr.IndexContent = Request("txtIndexContent") %> <% REM Update Security Property Page Values %> <% nntpService.AuthAnonymous = Request("chkAuthAnonymous") %> <% nntpService.AuthBasic = Request("chkAuthBasic") %> <% nntpService.AuthMCISBasic = Request("chkAuthMCISBasic") %> <% nntpService.AuthNT = Request("chkAuthNT") %> <% nntpService.EnableLogging = Request("txtEnableLogging") %> <% nntpService.AdminEmail = Request("txtAdministratorEmail") %> <% On Error Resume Next %> <% vrObj.SetDispatch 0, vr %> <% if (Err <> 0) then %> <% end if %> <% REM Set Service Properties %> <% On Error Resume Next %> <% nntpService.Set %> <% if (Err <> 0) then %> <% end if %> <% end if %> <% REM Get Service Properties to populate hiddenform %> <% On Error Resume Next %> <% nntpService.Get %> <% if (Err <> 0 ) then %> <% end if %> <% REM Get pointer to bindings object %> <% On Error Resume Next %> <% set bindings = nntpService.Bindings.Item(0) %> <% if (Err <> 0 ) then %> <% end if %>
<% REM Globals used by the webadmin %> <% REM helpfilename: Help file URL to load when "Help" button is clicked in head frame (changed by changePage function) %> <% REM updated: Whether user has made changes to userform (true/false) %> <% REM tcpUpdated: Whether user has made changes to Tcp Port field (if true, will display message on Save) %> <% REM loadmain: Whether to load main page (false when changes are saved as result of frameset unloading %> <% REM Variables used by Sessions and Newsgroup Pages %> <% REM nSessionListStart %> <% REM nNewsgroupListStart %> <% REM txtFindNewsgroup %> <% REM next two entries are part of "Bindings" object %> <% REM Write General page properties into hiddenform %> <% REM Convert bytes to kbytes and Mbytes %> <% ClientPostSoftLimit = (nntpService.ClientPostSoftLimit / ONE_KILOBYTE) %> <% ClientPostHardLimit = (nntpService.ClientPostHardLimit / ONE_MEGABYTE) %> <% FeedPostSoftLimit = (nntpService.FeedPostSoftLimit / ONE_KILOBYTE) %> <% FeedPostHardLimit = (nntpService.FeedPostHardLimit / ONE_MEGABYTE) %> <% REM Home Directory Property Page values %> <% REM Security Property Page values %>
<% end if %>