Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
3.6 KiB

  1. <!--#include file="iilogext.str"-->
  2. <%
  3. Const EXTCUSTOMLOGPATH = "IIS://localhost/Logging/Custom Logging"
  4. Const EXTCUSTOMLOGKEYTYPE = "IISCustomLogModule"
  5. Const NOEVENT = ""
  6. Const ALLOWOPERATORS = False
  7. Const ADMINONLY = True
  8. Const LAST = True
  9. Const NOTLAST = False
  10. Const LINES = True
  11. Const NOLINES = False
  12. Const INDENTSIZE = 4
  13. Const MIDDLE = "middle"
  14. Const TOP = "top"
  15. Const BOTTOM = "bottom"
  16. dim PANELBGCOLOR
  17. PANELBGCOLOR= "#FFFFFF"
  18. if not Session("IsIE") then
  19. PANELBGCOLOR= "#FFFFFF"
  20. end if
  21. if Session("stype") = "www" then
  22. ExtSvcPath = EXTW3SVCPATH
  23. else
  24. ExtSvcPath = EXTMSFTPSVCPATH
  25. end if
  26. dim vAlignText
  27. if Session("IsIE") then
  28. vAlignText = "ALIGN=" & TOP
  29. else
  30. vAlignText = "ALIGN=" & MIDDLE
  31. end if
  32. 'On Error Resume Next
  33. function writeTreeItem(fldName,fldMask,onClick,AdminOnly,fldLabel,isLast,drawLines, depth)
  34. dim outputStr
  35. outputStr = chr(13) & "<TR>"
  36. outputStr = outputStr & "<TD VALIGN='middle' HEIGHT=20>" & sFont("","","",True)
  37. drawLines = drawLines and (depth > 0)
  38. outputStr = outputStr & treeLines(isLast, depth, drawLines)
  39. if fldMask <> 0 then
  40. outputStr = outputStr & checkboxmask(fldName,fldMask,onClick,AdminOnly)
  41. else
  42. outputStr = outputStr & "<IMG SRC='images/logicon.gif' HSPACE = 3 >"
  43. end if
  44. outputStr = outputStr & fldLabel
  45. outputStr = outputStr & "</FONT></TD></TR>"
  46. writeTreeItem = outputStr
  47. end function
  48. function treeLines(isLast, depth, drawLines)
  49. dim outputStr
  50. outputStr ="<IMG SRC='images/space.gif' WIDTH=" & (depth * INDENTSIZE) & " HEIGHT=10 BORDER=0 VSPACE=0>"
  51. 'drawLines = false
  52. if drawLines then
  53. outputStr = outputStr & "<IMG SRC='"
  54. if isLast then
  55. outputStr = outputStr & "images/treelinesl.gif"
  56. else
  57. outputStr = outputStr & "images/treelines.gif"
  58. end if
  59. outputStr = outputStr & "' HEIGHT = 22 WIDTH=16 VSPACE = 0 HSPACE = 0 " & vAlignText & ">"
  60. end if
  61. treeLines = outputStr
  62. end function
  63. %>
  64. <FORM NAME="extuserform">
  65. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH = 100% BGCOLOR="<%= PANELBGCOLOR %>">
  66. <%
  67. mainExtLogging
  68. 'this keeps all our vars local to these routines...
  69. Sub mainExtLogging
  70. ' On Error Resume Next
  71. Dim objExtCustomLogging, objExtCustomModule, objExtSVC, foundit, service
  72. Set objExtSVC = GetObject(EXTSVCPATH)
  73. Set objExtCustomLogging = GetObject(EXTCUSTOMLOGPATH)
  74. For Each objExtCustomModule In objExtCustomLogging
  75. foundit = false
  76. for each service in objExtCustomModule.LogCustomPropertyServicesString
  77. if (UCase(service) = UCase(objExtSVC.Name)) then
  78. foundit = true
  79. exit for
  80. end if
  81. next
  82. if foundit then
  83. writeCustomLogItem objExtCustomModule, objExtSVC, 0, not LAST
  84. end if
  85. Next
  86. End Sub
  87. Sub writeCustomLogItem(thisCustomLoggingObj, objExtSVC, depth, isLast)
  88. ' On Error Resume Next
  89. Dim objCustomProp, ThisProp, PropCount, objExtAttributes
  90. if thisCustomLoggingObj.KeyType = EXTCUSTOMLOGKEYTYPE then
  91. 'Response.write thisCustomLoggingObj.Name & "<BR>"
  92. 'Response.write thisCustomLoggingObj.LogCustomPropertyID & "<BR>"
  93. Set objExtAttributes = objExtSVC.getPropertyAttribObj(thisCustomLoggingObj.LogCustomPropertyID)
  94. Response.write writeTreeItem(objExtAttributes.PropName,thisCustomLoggingObj.LogCustomPropertyMask,NOEVENT,ALLOWOPERATORS,thisCustomLoggingObj.LogCustomPropertyName,isLast,LINES, depth)
  95. ThisProp = 1
  96. PropCount = 0
  97. 'Do a quick count, so we'll know when we get to the last item...
  98. For Each objCustomProp In thisCustomLoggingObj
  99. PropCount = PropCount + 1
  100. Next
  101. For Each objCustomProp In thisCustomLoggingObj
  102. writeCustomLogItem objCustomProp, objExtSVC, (depth + 5), (ThisProp = PropCount)
  103. ThisProp = ThisProp + 1
  104. Next
  105. end if
  106. end Sub
  107. %>
  108. </TABLE>
  109. </FORM>