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.

144 lines
4.2 KiB

  1. <% '==================================================
  2. ' Microsoft Server Appliance
  3. ' Resource Viewer page
  4. ' Copyright (c) Microsoft Corporation. All rights reserved.
  5. '==================================================%>
  6. <!-- Copyright (c) Microsoft Corporation. All rights reserved.-->
  7. <!-- #include file="inc_framework.asp" -->
  8. <%
  9. Dim L_NOSTATUS_MESSAGE
  10. Dim L_PAGETITLE
  11. L_PAGETITLE = Request.QueryString("Title")
  12. If ( Len(L_PAGETITLE) <= 0 ) Then
  13. L_PAGETITLE = GetLocString("sacoremsg.dll", "40200BB8", "")
  14. End If
  15. L_NOSTATUS_MESSAGE = GetLocString("sacoremsg.dll", "40200BB9", "")
  16. %>
  17. <HTML>
  18. <meta http-equiv="Content-Type" content="text/html; charset=<%=GetCharSet()%>">
  19. <HEAD>
  20. <TITLE><%=L_PAGETITLE%></TITLE>
  21. <meta HTTP-EQUIV="Refresh" CONTENT="60">
  22. <%
  23. Call SA_EmitAdditionalStyleSheetReferences("")
  24. %>
  25. <SCRIPT LANGUAGE="JavaScript" SRC="<%=m_VirtualRoot%>sh_page.js"></SCRIPT>
  26. </HEAD>
  27. <BODY marginWidth="0" marginHeight="0" onDragDrop="return false;" topmargin="0" LEFTMARGIN="0" oncontextmenu="//return false;">
  28. <%
  29. Call ServeResources()
  30. %>
  31. </BODY>
  32. </HTML>
  33. <%
  34. '----------------------------------------------------------------------------
  35. '
  36. ' Function : ServeResources
  37. '
  38. ' Synopsis : Serves the resources
  39. '
  40. ' Arguments: None
  41. '
  42. ' Returns : None
  43. '
  44. '----------------------------------------------------------------------------
  45. Function ServeResources
  46. Call ServeStandardHeaderBar(L_PAGETITLE, "")
  47. Response.Write("<div class='PageBodyInnerIndent'>")
  48. Call ServeElementBlock(Request.QueryString("ResContainer"), L_NOSTATUS_MESSAGE, True, False, False)
  49. Response.Write("</div>")
  50. End Function
  51. '----------------------------------------------------------------------------
  52. '
  53. ' Function : ServeElementBlock
  54. '
  55. ' Synopsis : Serves elements belonging to the same container
  56. '
  57. ' Arguments: Container(IN) - container whose elements need to be served
  58. ' EmptyMsg(IN) - Msg to display if no elements are found
  59. ' Icons(IN) - Should icons be displayed with text
  60. ' Links(IN) - Should text be displayed as hyperlink
  61. ' NewWindow(IN) - Should this be displayed in a separate browser
  62. ' window or not
  63. '
  64. ' Returns : None
  65. ' this is broken
  66. '----------------------------------------------------------------------------
  67. Function ServeElementBlock(Container, EmptyMsg, Icons, Links, NewWindow)
  68. on error resume next
  69. Dim objElements
  70. Dim objItem
  71. Dim arrTitle()
  72. Dim arrURL()
  73. Dim arrHelpText()
  74. Dim arrIconPath()
  75. Dim blnWroteElement
  76. Dim blnEnabled
  77. Dim i
  78. Set objElements = GetElements(Container)
  79. ReDim arrTitle(objElements.Count)
  80. ReDim arrURL(objElements.Count)
  81. ReDim arrHelpText(objElements.Count)
  82. ReDim arrIconPath(objElements.Count)
  83. i = 0
  84. blnWroteElement = False
  85. Response.Write("<table class=ResourcesBody border=0 width=95% cellspacing=0>"+vbCrLf)
  86. Response.Flush
  87. For Each objItem in objElements
  88. Err.Clear
  89. 'Call SA_TraceOut(SA_GetScriptFileName(), "Found resource: " + objItem.GetProperty("ElementID"))
  90. arrIconPath(i) = m_VirtualRoot + objItem.GetProperty("ElementGraphic")
  91. Response.Write("<tr nowrap>"+vbCrLf)
  92. Dim sResourceURL
  93. sResourceURL = objItem.GetProperty("URL")
  94. If ( Len(Trim(sResourceURL)) > 0 ) Then
  95. '
  96. ' Execute the embedded HTML page
  97. '
  98. 'Call SA_TraceOut(SA_GetScriptFileName(), "Executing Embedded URL: (" + m_VirtualRoot + sResourceURL + ")")
  99. Server.Execute(m_VirtualRoot + sResourceURL)
  100. blnWroteElement = True
  101. End If
  102. Response.Write("</tr>"+vbCrLf)
  103. i = i + 1
  104. Next
  105. Set objElements = Nothing
  106. Set objItem = Nothing
  107. If Not blnWroteElement Then
  108. Response.Write("<tr>"+vbCrLf)
  109. Response.Write("<td width=30 height=28 colspan=2 valign=middle>&nbsp;</td>"+vbCrLf)
  110. Response.Write("<td width=25 height=28 valign=middle>&nbsp;</td>"+vbCrLf)
  111. Response.Write("<td width=314 height=28 valign=middle class=Resource>"+vbCrLf)
  112. Response.Write(EmptyMsg+vbCrLf)
  113. Response.Write("</td>"+vbCrLf)
  114. Response.Write("</tr>"+vbCrLf)
  115. End If
  116. Response.Write("</table>"+vbCrLf)
  117. Response.Flush
  118. End Function
  119. %>