home *** CD-ROM | disk | FTP | other *** search
Wrap
<% 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) %> <!--#include file="_cnst.asp" --> <% if (cont = true) then %> <% On Error Resume Next %> <% set nntpService = Server.CreateObject("Nntpadm.VirtualServer.1") %> <% if (Err <> 0 ) then %> <script language="javascript"> alert("<% = L_SERVICE_ERRORMESSAGE%><% = Err.description %>"); </script> <% 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 %> <script language="javascript"> alert("<% = L_SERVICE_ERRORMESSAGE%><% = Err.description %>"); </script> <% end if %> <% REM Set nntp Service Service Instance %> <% On Error Resume Next %> <% nntpService.ServiceInstance = Session("ServiceInstance") %> <% if (Err <> 0 ) then %> <script language="javascript"> alert("<% = L_SERVICE_ERRORMESSAGE%><% = Err.description %>"); </script> <% end if %> <HTML> <HEAD> <SCRIPT LANGUAGE="javascript"> var uForm = new Object(); uForm.saveValues = saveValues; uForm.writeCache = writeCache; function saveValues() { document.hiddenform.submit(); } <% REM Javascript function loadMain loads main page (false only when changes are saved as result of frameset unloading) %> function loadMain() { <% if (Request("loadmain") = L_FALSE_TEXT) then %> return; <% else %> top.frames[3].location = "nntl.asp?svr=<% = svr %>&pg=<% = pg %>"; parent.frames[2].location = "nnredir.asp?svr=<% = svr %>&pg=<% = pg %>&find=<% = find %>"; <% end if %> } <% REM Javascript function writeCache checks "updated" flag and confirms whether changes should be saved %> <% REM The "type" argument ("change", when moving from page to page, or "unload", when unloading frameset) determines whether to set "loadMain" flag %> <% REM The "pg" argument will load correct main page upon reload %> function writeCache(type,pg) { if (type == "<% = L_CHANGE_TEXT %>") { if (hform.updated.value == "<% = L_TRUE_TEXT %>") { hform.updated.value = "<% = L_FALSE_TEXT %>"; if (confirm("<% = L_UNSAVEDPROPERTYCHANGES_TEXT %>")) { if (hform.pg.value == "nnadv") { parent.main.body.uForm.writeForm(); } else { parent.main.uForm.writeForm(); } hform.pg.value = pg; hform.helpfilename.value = "help/" + pg + "h.htm"; hform.save.value = "apply"; document.hiddenform.submit(); //return true; } } return false; } else { return false; // unload case currently undefined due to bug } } <% REM Javascript function changePage %> function changePage(pg) { hform = document.hiddenform; if (pg != hform.pg.value) { if (writeCache('change',pg) == false) { hform.pg.value = pg; hform.helpfilename.value = "help/" + pg + "h.htm"; if (changeToolbar(pg)) { parent.frames[3].location = "nntl.asp?svr=<% = svr %>&pg=" + pg; } parent.frames[2].location = "nnredir.asp?svr=<% = svr %>&pg=" + pg + "&find=<% = find %>"; } } } <% REM Javascript function changeToolbar checks toolbar identifier "tlpg" against page to be loaded ("pg") to determine if a new toolbar needs to be loaded %> function changeToolbar(pg) { tlpg = top.frames[3].document.hiddenform.pg.value; if (tlpg != pg) { if (((pg == "nnsec") || (pg == "nnser") || (pg == "nngen") || (pg == "nnexppl")) && ((tlpg != "nnsec") && (tlpg != "nnser") && (tlpg != "nngen") && (tlpg != "nnexppl"))) { return true; } else { if (((pg == "nnbld") || (pg == "nnf") || (pg == "nnexp") || (pg == "nndir") || (pg == "nnexpg")) && ((tlpg != "nnbld") && (tlpg != "nnf") && (tlpg != "nnexp") && (tlpg != "nndir") && (tlpg != "nnexpg"))) { return true; } else { if (((pg == "nnvs") && (tlpg != "nnvs")) || ((pg == "nnses") && (tlpg != "nnses")) || ((pg == "nngrp") && (tlpg != "nngrp")) || ((pg == "nnadv") && (tlpg != "nnadv"))) { return true; } } } } return false; } <% REM Javascript function changeSrv returns to tree control interface %> function changeSrv() { top.location = "nnadv.asp?svr=<% = svr %>"; } <% REM Javascript function imgAct controls movement of red navigation arrow %> <% REM If browser is IE, use floating frame nav arrow; if Netscape, use image replacement nav arrow %> <% if (browser = "ms") then %> function imgAct(num) { document.toc.location = "nnmnus.asp?sel=" + num; } <% else %> function imgAct(pg) { document.nnser.src = "images/gnictoc0.gif"; document.nnses.src = "images/gnictoc0.gif"; document.nngen.src = "images/gnictoc0.gif"; document.nnexp.src = "images/gnictoc0.gif"; document.nngrp.src = "images/gnictoc0.gif"; document.nndir.src = "images/gnictoc0.gif"; document.nnsec.src = "images/gnictoc0.gif"; document.nnvs.src = "images/gnictoc0.gif"; document[pg].src = "images/gnictoc1.gif"; } <% end if %> </SCRIPT> <TITLE><% = L_PAGETITLE_TEXT %></TITLE> </HEAD> <BODY BACKGROUND="images/gnback.gif" BGCOLOR="#000000" LEFTMARGIN=10 TOPMARGIN=10 TEXT="#CCCCCC" LINK="#FFCC00" ALINK="#FFCC00" VLINK="#FFCC00" onLoad="loadMain();" onUnload="writeCache('unload','');"> <% 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 %> <!--#include file="nnmnums.asp"--> <% else %> <!--#include file="nnmnuns.asp"--> <% 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 %> <script language="javascript"> alert( "<% = L_SERVICE_ERRORMESSAGE %><% = Err.description %>"); </script> <% end if %> <% REM Get pointer to bindings object %> <% On Error Resume Next %> <% set binding = nntpService.Bindings %> <% if (Err <> 0 ) then %> <script language="javascript"> alert("<% = Err.description %>"); </script> <% end if %> <% REM Get pointer to bindings item %> <% On Error Resume Next %> <% set bindings = nntpService.Bindings.Item(0) %> <% if (Err <> 0 ) then %> <script language="javascript"> alert("<% = Err.description %>"); </script> <% 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 %> <script language="javascript"> alert("<% = Err.description %>"); </script> <% 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 %> <script language="javascript"> alert("<% = Err.description %>"); </script> <% end if %> <% REM Set Service Properties %> <% On Error Resume Next %> <% nntpService.Set %> <% if (Err <> 0) then %> <SCRIPT LANGUAGE="javascript"> alert("<% = L_SERVICE_ERRORMESSAGE %><% = Err.description %>"); </SCRIPT> <% end if %> <% end if %> <% REM Get Service Properties to populate hiddenform %> <% On Error Resume Next %> <% nntpService.Get %> <% if (Err <> 0 ) then %> <script language="javascript"> alert("<% = Err.description %>"); </script> <% end if %> <% REM Get pointer to bindings object %> <% On Error Resume Next %> <% set bindings = nntpService.Bindings.Item(0) %> <% if (Err <> 0 ) then %> <script language="javascript"> alert("<% = Err.description %>"); </script> <% end if %> <FORM NAME="hiddenform" METHOD="get" ACTION="nnmnu.asp"> <% 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 %> <INPUT TYPE="hidden" NAME="svr" VALUE="<% = svr %>"> <INPUT TYPE="hidden" NAME="save" VALUE=""> <INPUT TYPE="hidden" NAME="pg" VALUE="<% = pg %>"> <INPUT TYPE="hidden" NAME="helpfilename" VALUE="help/<% = pg %>h.htm"> <INPUT TYPE="hidden" NAME="updated" VALUE="false"> <INPUT TYPE="hidden" NAME="tcpUpdated" VALUE="false"> <INPUT TYPE="hidden" NAME="loadmain" VALUE="true"> <% REM Variables used by Sessions and Newsgroup Pages %> <% REM nSessionListStart %> <% REM nNewsgroupListStart %> <% REM txtFindNewsgroup %> <INPUT TYPE="hidden" NAME="nSessionListStart" VALUE = "0"> <INPUT TYPE="hidden" NAME="nNewsgroupListStart" VALUE = "0"> <INPUT TYPE="hidden" NAME="txtFindNewsgroup" VALUE="<% = find %>"> <% REM next two entries are part of "Bindings" object %> <INPUT TYPE="hidden" NAME="txtIPAddress" VALUE="<% = bindings.IPAddress %>"> <INPUT TYPE="hidden" NAME="txtTCPPort" VALUE="<% = bindings.TCPPort %>"> <% 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) %> <INPUT TYPE="hidden" NAME="txtPathHeaderField" VALUE="<% = nntpService.UUCPName %>"> <INPUT TYPE="hidden" NAME="txtDescription" VALUE="<% = nntpService.Comment %>"> <INPUT TYPE="hidden" NAME="chkConfigAllowClientPosting" VALUE="<% = nntpService.AllowClientPosts %>"> <INPUT TYPE="hidden" NAME="txtConfigServerPostSoftLimit" VALUE="<% = ClientPostSoftLimit %>"> <INPUT TYPE="hidden" NAME="txtConfigServerPostHardLimit" VALUE="<% = ClientPostHardLimit %>"> <INPUT TYPE="hidden" NAME="chkConfigAllowFeedPosting" VALUE="<% = nntpService.AllowFeedPosts %>"> <INPUT TYPE="hidden" NAME="txtConfigServerFeedSoftLimit" VALUE="<% = FeedPostSoftLimit %>"> <INPUT TYPE="hidden" NAME="txtConfigServerFeedHardLimit" VALUE="<% = FeedPostHardLimit %>"> <INPUT TYPE="hidden" NAME="chkConfigAllowControlMessages" VALUE="<% = nntpService.AllowControlMsgs %>"> <INPUT TYPE="hidden" NAME="txtConfigSmtpServerAddress" VALUE="<% = nntpService.SmtpServer %>"> <INPUT TYPE="hidden" NAME="txtConfigDefaultModeratorDomain" VALUE="<% = nntpService.DefaultModeratorDomain %>"> <INPUT TYPE="hidden" NAME="txtSSLPort" VALUE="<% = nntpService.SecurePort %>"> <INPUT TYPE="hidden" NAME="txtMaxConnections" VALUE="<% = nntpService.MaxConnections %>"> <INPUT TYPE="hidden" NAME="txtConnectionTimeout" VALUE="<% = nntpService.ConnectionTimeout %>"> <% REM Home Directory Property Page values %> <INPUT TYPE="hidden" NAME="txtDirectory" VALUE="<% = vr.Directory %>"> <INPUT TYPE="hidden" NAME="chkLogAccess" VALUE="<% = vr.LogAccess %>"> <INPUT TYPE="hidden" NAME="chkAllowPosting" VALUE="<% = vr.AllowPosting %>"> <INPUT TYPE="hidden" NAME="txtUNCPassword" VALUE="<% = vr.UNCPassword %>"> <INPUT TYPE="hidden" NAME="txtUNCUserName" VALUE="<% = vr.UNCUserName %>"> <INPUT TYPE="hidden" NAME="chkRestrictGroupVisibility" VALUE="<% = vr.RestrictGroupVisibility %>"> <INPUT TYPE="hidden" NAME="chkRequire128BitSsl" VALUE="<% = vr.Require128BitSsl %>"> <INPUT TYPE="hidden" NAME="chkRequireSsl" VALUE="<% = vr.RequireSsl %>"> <% REM Security Property Page values %> <INPUT TYPE="hidden" NAME="chkAuthAnonymous" VALUE="<% = nntpService.AuthAnonymous %>"> <INPUT TYPE="hidden" NAME="chkAuthBasic" VALUE="<% = nntpService.AuthBasic %>"> <INPUT TYPE="hidden" NAME="chkAuthMCISBasic" VALUE="<% = nntpService.AuthMCISBasic %>"> <INPUT TYPE="hidden" NAME="chkAuthNT" VALUE="<% = nntpService.AuthNT %>"> <INPUT TYPE="hidden" name="txtEnableLogging" Value="<% = nntpService.EnableLogging %>"> <INPUT TYPE="hidden" name="txtAdministratorEmail" value="<% = nntpService.AdminEmail %>"> <INput type="hidden" name="txtIndexNewsContent" value = "<% = vr.IndexContent %>"> </FORM> </BODY> </HTML> <% end if %>