home *** CD-ROM | disk | FTP | other *** search
- <% Response.Expires = 0 %>
- <%
- REM LOCALIZATION
-
- L_PAGETITLE_TEXT = "Microsoft Internet Service Manager"
-
- REM END LOCALIZATION
- %>
-
- <% REM Logging Page %>
-
- <% REM Get variables %>
- <% REM svr = Server name %>
- <% REM lgt = Logging type passed from menu frame (0 -- disabled, 1 -- file, 2-- database) %>
-
- <% svr = Request("svr") %>
- <% lgt = Request("lgt") %>
-
- <HTML>
- <HEAD>
- <TITLE><% = L_PAGETITLE_TEXT %></TITLE>
-
- <SCRIPT LANGUAGE="javascript">
-
-
- <% 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 = parent.menu.document.hiddenform;
- uform = document.userform;
- <% if (lgt = "0") then %>
- return;
- <% elseif (lgt = "1") then %>
- uform.txtLogFileDirectory.value = hform.txtLogFileDirectory.value;
- getLogPeriod();
- <% elseif (lgt = "2") then %>
- uform.txtLogDatasource.value = hform.txtLogDataSource.value;
- uform.txtLogTableName.value = hform.txtLogTableName.value;
- uform.txtLogUserName.value = hform.txtLogUserName.value;
- uform.hdnLogPassword.value = hform.txtLogPassword.value;
- <% end if %>
- }
-
-
-
- <% REM Javascript function writeForm sets values in hiddenform %>
-
- function writeForm() {
- hform = parent.menu.document.hiddenform;
- uform = document.userform;
- <% if (lgt = "0") then %>
- hform.rdoLogType.value = "0";
- <% elseif (lgt = "1") then %>
- hform.rdoLogType.value = "1";
- hform.rdoLogPeriod.value = uform.hdnLogPeriod.value;
- hform.txtLogSizeForTruncation.value = uform.txtLogSizeForTruncation.value;
- hform.txtLogFileDirectory.value = uform.txtLogFileDirectory.value;
- <% elseif (lgt = "2") then %>
- hform.rdoLogType.value = "2";
- hform.txtLogDatasource.value = uform.txtLogDatasource.value;
- hform.txtLogTableName.value = uform.txtLogTableName.value;
- hform.txtLogUserName.value = uform.txtLogUserName.value;
- hform.txtLogPassword.value = uform.hdnLogPassword.value;
- if (hform.txtLogPassword.value != "")
- {
- uform.txtLogPassword.value = "**************";
- }
- <% end if %>
- }
-
-
- <% REM Javascript function getLogPeriod sets period radio buttons, "When file size reaches" fields %>
-
- function getLogPeriod()
- {
- hform = parent.menu.document.hiddenform;
- uform = document.userform;
- LogSizeForTruncation = hform.txtLogSizeForTruncation.value;
- if ((LogSizeForTruncation == "-1") || (LogSizeForTruncation == "0") || (LogSizeForTruncation == ""))
- {
- uform.hdnLogSizeForTruncation.value = "4";
- }
- else {
- uform.hdnLogSizeForTruncation.value = LogSizeForTruncation;
- }
- LogPeriod = hform.rdoLogPeriod.value;
- for (i=1; i<4; i++)
- {
- if (LogPeriod == i)
- {
- uform.chkLogAutoOpen.checked = "true";
- uform.rdoLogPeriod[i-1].checked = "true";
- }
- }
- if ((LogSizeForTruncation != "-1") && (LogPeriod == "0"))
- {
- uform.chkLogAutoOpen.checked = "true";
- uform.rdoLogPeriod[3].checked = "true";
- uform.txtLogSizeForTruncation.value = uform.hdnLogSizeForTruncation.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 changeLogType reloads page with disabled, file, or database logging parameter %>
-
- function changeLogType(lgt)
- {
- self.location = "nnlg.asp?svr=<% = svr %>&lgt=" + lgt;
- }
-
-
- <% REM Javascript function changeLogPeriod fills/clears "When file size reaches" field according to which radio button is checked%>
-
- function changeLogPeriod(t)
- {
- var txtLogSizeForTruncation = document.userform.txtLogSizeForTruncation;
- var hdnLogSizeForTruncation = document.userform.hdnLogSizeForTruncation;
- if (t == 0)
- {
- txtLogSizeForTruncation.value = hdnLogSizeForTruncation.value;
- }
- else {
- if (txtLogSizeForTruncation.value != "")
- {
- hdnLogSizeForTruncation.value = txtLogSizeForTruncation.value;
- }
- txtLogSizeForTruncation.value = "";
- }
- if (!(document.userform.chkLogAutoOpen.checked))
- {
- document.userform.chkLogAutoOpen.checked = true;
- }
- document.userform.hdnLogPeriod.value = t;
- }
-
-
- <% REM Javascript function maintainChk clears period fields when "Automatically open" is unchecked %>
-
- function maintainChk()
- {
- if (document.userform.chkLogAutoOpen.checked == false)
- {
- for (i=0; i > 4; i++) {
- document.userform.rdoLogPeriod[i].checked = false;
- }
- document.userform.txtLogSizeForTruncation.value = "";
- document.userform.hdnLogPeriod.value = "4";
- }
- else {
- getLogPeriod();
- }
- }
-
-
- <% REM Javascript function maintainTxt checks "When file size reaches" field and checks corresponding radio button %>
-
- function maintainTxt()
- {
- var txtLogSizeForTruncation = document.userform.txtLogSizeForTruncation;
- if ((!(isNum(txtLogSizeForTruncation.value))) || (!(isFull(txtLogSizeForTruncation.value))))
- {
- txtLogSizeForTruncation.value = "";
- txtLogSizeForTruncation.focus();
- }
- else {
- if (txtLogSizeForTruncation.value > 4095)
- {
- txtLogSizeForTruncation.value = 4095;
- }
- document.userform.hdnLogSizeForTruncation.value = txtLogSizeForTruncation.value;
- if (!(document.userform.rdoLogPeriod[3].checked))
- {
- document.userform.rdoLogPeriod[3].checked = true;
- top.menu.document.hiddenform.rdoLogPeriod.value = "0";
- }
- }
- }
-
-
- <% REM Javascript function setPassword replaces text in password field with asterisks, transfers value to hidden field %>
-
- function setPassword()
- {
- txtLogPassword = document.userform.txtLogPassword;
- if (txtLogPassword.value != "")
- {
- document.userform.hdnLogPassword.value = txtLogPassword.value;
- txtLogPassword.value = "**************";
- }
- }
-
-
-
-
- </SCRIPT>
-
- <% REM Generic Javascript functions isNum and isFull %>
- <!-- # include file="nnisnum.htm" -->
- <!-- # include file="nnisfull.htm" -->
-
- </HEAD>
-
- <BODY BGCOLOR="#CCCCCC" TEXT="#000000" TOPMARGIN=10 onLoad="readCache();">
-
- <P><IMG SRC="images/gnicttl.gif" ALIGN="textmiddle" HEIGHT=10 WIDTH=10> <FONT SIZE=2 FACE="Arial"><B>Logging Properties for </B></FONT><FONT SIZE=3 FACE="Times New Roman"><I><% = svr %></I></FONT>
-
- <FONT SIZE=2 FACE="Arial">
-
- <FORM NAME="userform" onSubmit="return false;">
-
-
- <% REM If logging is enabled, display Enable logging checkbox as checked %>
-
- <% if (lgt <> "0") then %>
-
- <P>
- <INPUT TYPE="checkbox" NAME="chkLogEnable" onClick="changeLogType(0);setUpdated();" CHECKED> Enable logging
-
-
- <% REM If logging to file, display file fields %>
-
- <% if (lgt = "1") then %>
-
- <P><B>Log To</B>
-
- <BLOCKQUOTE>
-
- <TABLE WIDTH=325>
- <TR>
- <TD WIDTH=125><FONT SIZE=2 FACE="Arial"><INPUT TYPE="radio" NAME="rdoLogType" VALUE="1" CHECKED> File</FONT></TD>
- <TD WIDTH=200><FONT SIZE=2 FACE="Arial"><INPUT TYPE="radio" NAME="rdoLogType" VALUE="2" onClick="changeLogType(2);setUpdated();"> SQL/ODBC database</FONT></TD>
- </TR>
- </TABLE>
-
- </BLOCKQUOTE>
-
- <P><B>Log File Properties</B>
-
- <BLOCKQUOTE>
-
- <P><INPUT TYPE="checkbox" NAME="chkLogAutoOpen" onClick="maintainChk();setUpdated();"> Automatically open new log
- <INPUT TYPE="hidden" NAME="hdnLogPeriod" VALUE="">
-
- <P>
- <BLOCKQUOTE>
-
- <INPUT TYPE="radio" NAME="rdoLogPeriod" onClick="changeLogPeriod('1');setUpdated();"> Daily
- <P><INPUT TYPE="radio" NAME="rdoLogPeriod" onClick="changeLogPeriod('2');setUpdated()"> Weekly
- <P><INPUT TYPE="radio" NAME="rdoLogPeriod" onClick="changeLogPeriod('3');setUpdated();"> Monthly
- <P><INPUT TYPE="radio" NAME="rdoLogPeriod" onClick="changeLogPeriod('0');setUpdated();"> When file size reaches
- <INPUT TYPE="text" SIZE=5 NAME="txtLogSizeForTruncation" onChange="maintainTxt();setUpdated();" VALUE=""> MB
- <INPUT TYPE="hidden" NAME="hdnLogSizeForTruncation" VALUE="">
-
- </BLOCKQUOTE>
-
- <P>Log file directory: <INPUT TYPE="text" SIZE=45 NAME="txtLogFileDirectory" VALUE="" onChange="setUpdated();">
-
- </BLOCKQUOTE>
-
- <% REM If logging to database, display database fields %>
-
- <% elseif (lgt = "2") then %>
-
- <P><B>Log To</B>
-
- <BLOCKQUOTE>
-
- <TABLE WIDTH=325>
- <TR>
- <TD WIDTH=125>
- <FONT SIZE=2 FACE="Arial"><INPUT TYPE="radio" NAME="rdoLogType" VALUE="1" onClick="changeLogType(1);setUpdated();"> File</FONT>
- </TD>
- <TD WIDTH=200>
- <FONT SIZE=2 FACE="Arial"><INPUT TYPE="radio" NAME="rdoLogType" VALUE="2" CHECKED> SQL/ODBC database</FONT>
- </TD>
- </TR>
- </TABLE>
-
- </BLOCKQUOTE>
-
- <P><B>SQL/ODBC Database Properties</B>
-
- <BLOCKQUOTE>
-
- <P>
- <TABLE BORDER=0>
- <TR>
- <TD><FONT SIZE=2 FACE="Arial">ODBC datasource name (DSN): </FONT></TD>
- <TD><INPUT TYPE="text" SIZE=25 NAME="txtLogDatasource" VALUE="" onChange="setUpdated();"></TD>
- </TR>
- <TR>
- <TD HEIGHT=4></TD>
- </TR>
- <TR>
- <TD><FONT SIZE=2 FACE="Arial">Table:</FONT></TD>
- <TD><INPUT TYPE="text" SIZE=25 NAME="txtLogTableName" VALUE="" onChange="setUpdated();"></TD>
- </TR>
- <TR>
- <TD HEIGHT=4></TD>
- </TR>
- <TR>
- <TD><FONT SIZE=2 FACE="Arial">Username:</FONT></TD>
- <TD><INPUT TYPE="text" SIZE=25 NAME="txtLogUserName" VALUE="" onChange="setUpdated();"></TD>
- </TR>
- <TR>
- <TD HEIGHT=4></TD>
- </TR>
- <TR>
- <TD><FONT SIZE=2 FACE="Arial">Password:</FONT></TD>
- <TD><INPUT TYPE="text" SIZE=25 NAME="txtLogPassword" VALUE="" onChange="setPassword();setUpdated();">
- <INPUT TYPE="hidden" NAME="hdnLogPassword" VALUE=""></TD>
- </TR>
- </TABLE>
-
- </BLOCKQUOTE>
-
- <% end if %>
-
- <% REM If logging is disabled, display checkbox as unchecked and show explanatory message %>
-
- <% else %>
-
- <P><INPUT TYPE="checkbox" NAME="chkLogEnable" onClick="changeLogType(1);setUpdated();"> Enable logging
-
- <BR>
- <BR>
-
- <P>
- Check <B>Enable Logging</B> to start or stop logging. Logging provides valuable information
- about how the Microsoft Internet News Server is used. Send log data to files or to a SQL/ODBC
- (Open Data Base Connectivity) supported database.
-
- <% end if %>
-
- </FORM>
-
- </BODY>
- </HTML>
-
-