<%@ LANGUAGE = VBScript %> <% Option Explicit %> <% Const MD_UNLIMITED_FILESIZE = "&HFFFFFFFF" Const ISM_FILESIZE_DEFAULT = "512" Const EXTW3SVCPATH = "IIS://localhost/w3svc" Const EXTMSFTPSVCPATH = "IIS://localhost/msftpsvc" Const CUSTOMLOGPATH = "IIS://localhost/Logging/Custom Logging" Const CUSTOMLOGKEYTYPE = "IISCustomLogModule" 'On Error Resume Next Dim path, currentobj, lfSize, svctype, svrname, ExtSvcPath,objExtSVC path=Session("spath") Session("path")=path Session("SpecObj")="" Session("SpecProps")="" Set currentobj=GetObject(path) if Session("stype") = "www" then ExtSvcPath = EXTW3SVCPATH else ExtSvcPath = EXTMSFTPSVCPATH end if svctype = Mid(path, InStr(7,path, "/")+1) if Instr(svctype,"/") then svctype = Mid(svctype,1,Instr(svctype, "/")-1) end if svrname = Mid(path, InStrRev(path, "/")+1) %> <% ' Do not use top.title.Global.update flag if page is loaded into a dialog bUpdateGlobal = false %> <% if Session("canBrowse") then %> <% end if %> "ODBC" then %>onLoad="setLogFile(document.userform.LogFilePeriod.value);"<% end if %>> <%= sFont("","","",True) %> <% if Session("setLogUI") = "ODBC" then %>
>
<%= sFont("","","",True) %> <%= L_ODBCOPTIONS_TEXT %>

<%= sFont("","","",True) %> <%= L_ODBCDSNAME_TEXT %>
<%= text("LogOdbcDataSource",L_ODBCTEXTFIELDS_NUM,"","", "",False,False) %>

<%= L_TABLE_TEXT %>
<%= text("LogOdbcTableName",L_ODBCTEXTFIELDS_NUM,"","", "",False,False) %>

<%= L_USER_TEXT %>
<%= text("LogOdbcUserName",L_ODBCTEXTFIELDS_NUM,"","", "",False,False) %>

<%= L_PASSWORD_TEXT %>
<%= pword("LogOdbcPassword",L_ODBCTEXTFIELDS_NUM,"hdnLogODBCPassword.value='';","", "",False,False) %>

<%= L_CONFIRMPASSWORD_TEXT %>
<%= inputbox(0,"PASSWORD","hdnLogODBCPassword", currentobj.LogOdbcPassword,L_ODBCTEXTFIELDS_NUM,"","","chkPassword(this,LogOdbcPassword);",False,False,False) %>

<% else %>
>
<%= sFont("","","",True) %> <%= L_GENERAL_TEXT %> (<%= Session("LogName") %>)

<%= sFont("","","",True) %> <%= L_NEWTIMEPERIOD_TEXT %> HEIGHT=2 BORDER=0 ALIGN="middle">

<%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 4, "setLogFile(4);",False) %> <%= L_HOURLY_TEXT %>
<%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 1, "setLogFile(1);",False) %> <%= L_DAILY_TEXT %>
<%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 2, "setLogFile(2);",False) %> <%= L_WEEKLY_TEXT %>
<%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 3, "setLogFile(3);",False) %> <%= L_MONTHLY_TEXT %>
<%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 0 and currentobj.LogFileTruncateSize = CLng(MD_UNLIMITED_FILESIZE), "setLogFile(0);document.userform.LogFileTruncateSize.value='" & CLng(MD_UNLIMITED_FILESIZE) & "';",False) %> <%= L_UNLIMITED_TEXT %>
<%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 0 and currentobj.LogFileTruncateSize <> CLng(MD_UNLIMITED_FILESIZE), "setLogFile(0);document.userform.LogFileTruncateSize.value=document.userform.hdnLogFileTruncateSize.value * 1048576;",False) %> <%= L_LIMITED_TEXT %>  <% ' Set the defualt value for the hdnLogFileTruncateSize text box if currentobj.LogFileTruncateSize = CLng(MD_UNLIMITED_FILESIZE) then lfSize = ISM_FILESIZE_DEFAULT else lfSize = currentobj.LogFileTruncateSize/1048576 end if %> <%= inputbox(0,"text", "hdnLogFileTruncateSize",lfSize,L_FILESIZETEXT_NUM,"","", "calcLFSize(this);",True,False,False) %> <%= L_MB_TEXT %>
<% if Session("setLogUI") = "EXT" then %> <%= checkbox("LogFileLocaltimeRollover","",False) %>  <%= L_LOCALTIME_TEXT %> <% mainWriteLoggingFields Sub mainWriteLoggingFields() 'On Error Resume Next Dim objExtCustomLogging, objExtCustomModule, objExtW3SVC, sOutputScript Set objExtSVC = GetObject(EXTSVCPATH) Set objExtCustomLogging = GetObject(CUSTOMLOGPATH) 'Run through all of our custom modules, looking for new fields sOutputScript = writeCustomLogField(objExtCustomLogging, objExtSVC, 0, "") Response.write "" End Sub Function writeCustomLogField(objExtCustomModule, objExtSVC, itemCounter, lastField) 'On Error Resume Next Dim objExtAttributes, objCustomProp, thisOutputScript Dim foundit, service if objExtCustomModule.KeyType = EXTCUSTOMLOGKEYTYPE then 'Response.write objExtCustomModule.Name & "
" foundit = false for each service in objExtCustomModule.LogCustomPropertyServicesString if (UCase(service) = UCase(objExtSVC.Name)) then foundit = true exit for end if next if foundit then if objExtCustomModule.LogCustomPropertyID <> 0 then Set objExtAttributes = objExtSVC.getPropertyAttribObj(objExtCustomModule.LogCustomPropertyID) if InStr(lastField,objExtAttributes.PropName)<= 0 then thisOutputScript = "aHiddenFields[" & itemCounter & "] = '" & objExtAttributes.PropName & "';" Response.write "" itemCounter = itemCounter + 1 lastField = lastField & "," & objExtAttributes.PropName end if end if For Each objCustomProp In objExtCustomModule thisOutputScript = thisOutputScript & writeCustomLogField(objCustomProp, objExtSVC, itemCounter, lastField) Next end if end if writeCustomLogField = thisOutputScript End Function %>

<% end if %> <%= L_LOGFILEPROPS_TEXT %> HEIGHT=2 BORDER=0 ALIGN="middle">

<%= sFont("","","",True) %> <%= L_LOGDIR_TEXT %> <%= sFont("","","",True) %> <%= text("LogFileDirectory",L_LOGDIRTEXT_NUM,"","", "noUNCPaths(this);",False,False) %>
<% if Session("canBrowse") then %> );"> <% end if %>
 
<%= sFont("","","",True) %> <%= L_LOGFILE_TEXT %> <%= sFont("","","",True) %> DISABLED onChange="setLogFile(document.userform.LogFilePeriod.value);" <%= Session("DEFINPUTSTYLE") %>>

<% if Session("setLogUI") = "EXT" then %> >
<%= sFont("","","",True) %> <%= L_EXTPROPERTIES_TEXT %>

  <% if Session("IsIE") then %> <% else %> <% end if %>

<% end if %> <% end if %>