Leaked source code of windows server 2003
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.

165 lines
4.4 KiB

  1. <%@ Language=VBScript %>
  2. <% Option Explicit %>
  3. <%
  4. '-------------------------------------------------------------------------
  5. ' Server Appliance Help Table of contents
  6. ' Copyright (c) Microsoft Corporation. All rights reserved.
  7. '-------------------------------------------------------------------------
  8. Call SAI_EnablePageCaching(TRUE)
  9. %>
  10. <!-- #include file="inc_framework.asp" -->
  11. <%
  12. '-------------------------------------------------------------------------
  13. ' Global Variables
  14. '-------------------------------------------------------------------------
  15. Dim rc
  16. Dim page
  17. '-------------------------------------------------------------------------
  18. ' Global Form Variables
  19. '-------------------------------------------------------------------------
  20. '======================================================
  21. ' Entry point
  22. '======================================================
  23. Dim L_PAGETITLE
  24. L_PAGETITLE = SA_GetLocString("sacoremsg.dll", "40200FA0", "")
  25. '
  26. ' Create Page
  27. rc = SA_CreatePage( L_PAGETITLE, "", PT_AREA, page )
  28. '
  29. ' Show page
  30. rc = SA_ShowPage( page )
  31. '======================================================
  32. ' Web Framework Event Handlers
  33. '======================================================
  34. '---------------------------------------------------------------------
  35. ' Function: OnInitPage
  36. '
  37. ' Synopsis: Called to signal first time processing for this page. Use this method
  38. ' to do first time initialization tasks.
  39. '
  40. ' Returns: TRUE to indicate initialization was successful. FALSE to indicate
  41. ' errors. Returning FALSE will cause the page to be abandoned.
  42. '
  43. '---------------------------------------------------------------------
  44. Public Function OnInitPage(ByRef PageIn, ByRef EventArg)
  45. OnInitPage = TRUE
  46. End Function
  47. '---------------------------------------------------------------------
  48. ' Function: OnServeAreaPage
  49. '
  50. ' Synopsis: Called when the page needs to be served. Use this method to
  51. ' serve content.
  52. '
  53. ' Returns: TRUE to indicate not problems occured. FALSE to indicate errors.
  54. ' Returning FALSE will cause the page to be abandoned.
  55. '
  56. '---------------------------------------------------------------------
  57. Public Function OnServeAreaPage(ByRef PageIn, ByRef EventArg)
  58. Dim sURL
  59. Dim sFirstHelpURL
  60. Dim sTOCWidth
  61. Dim sTOCHeight
  62. Dim sContentWidth
  63. Dim sContentHeight
  64. sURL = m_VirtualRoot + "sh_tree.asp"
  65. Call SA_MungeURL(sURL, "TreeContainer", "HelpTOC")
  66. Call SA_MungeURL(sURL, SAI_FLD_PAGEKEY, SAI_GetPageKey())
  67. sFirstHelpURL = GetFirstHelpPage("HelpTOC")
  68. Call SA_MungeURL(sFirstHelpURL, SAI_FLD_PAGEKEY, SAI_GetPageKey())
  69. If ( SA_IsIE() ) Then
  70. sTOCWidth = "100%"
  71. sTOCHeight = "500px"
  72. sContentWidth = "100%"
  73. sContentHeight = "500px"
  74. Else
  75. sTOCWidth = "200px"
  76. sTOCHeight = "500px"
  77. sContentWidth = "600px"
  78. sContentHeight = "500px"
  79. End If
  80. %>
  81. <script>
  82. function Init()
  83. {
  84. }
  85. </script>
  86. <BODY>
  87. <table width=97% border=0>
  88. <tr>
  89. <td xclass=HelpTOC width=25% nowrap valign=top align=left>
  90. <IFRAME src='<%=sURL%>' border=0 frameborder=0 name=IFrameHelpMain width='<%=sTOCWidth%>' height='<%=sTOCHeight%>'>
  91. </IFRAME>
  92. </td>
  93. <td class=HelpTOC width=10px nowrap valign=top>
  94. &nbsp;
  95. </td>
  96. <td width=75% valign=top align=left>
  97. <IFRAME border=0 frameborder=0 name=IFrameHelpContent src='<%=sFirstHelpURL%>' width='<%=sContentWidth%>' height='<%=sContentHeight%>'>")
  98. </IFRAME>
  99. </td>
  100. </tr>
  101. </table>
  102. </BODY>
  103. <%
  104. OnServeAreaPage = TRUE
  105. End Function
  106. '======================================================
  107. ' Private Functions
  108. '======================================================
  109. Private Function GetFirstHelpPage(ByVal sContainer)
  110. on error resume next
  111. Err.Clear
  112. Dim sURL
  113. Dim sHelpLoc
  114. Dim oContainer
  115. Dim oElement
  116. GetFirstHelpPage = ""
  117. Set oContainer = GetElements(sContainer)
  118. If ( Err.Number <> 0 ) Then
  119. Call SA_TraceOut("HelpTOC", "GetFirstHelpPage : GetElements("+sContainer+") returned error: " + CStr(Hex(Err.Number)) )
  120. Err.Clear
  121. Exit Function
  122. End If
  123. Call SA_GetHelpRootDirectory(sHelpLoc)
  124. For each oElement in oContainer
  125. Dim sHelpURL
  126. sHelpURL = sHelpLoc+oElement.GetProperty("URL")
  127. GetFirstHelpPage = sHelpURL
  128. Set oContainer = Nothing
  129. Exit Function
  130. Next
  131. Set oContainer = Nothing
  132. End Function
  133. %>