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.

238 lines
6.3 KiB

  1. <%@ Language=VBScript %>
  2. <% '==================================================
  3. ' Microsoft Server Appliance
  4. '
  5. ' About Page
  6. '
  7. ' Copyright (c) Microsoft Corporation. All rights reserved.
  8. '================================================== %>
  9. <% Option Explicit %>
  10. <!-- #include file="inc_framework.asp" -->
  11. <%
  12. Const ABOUT_BOX_CONTAINER = "AboutBox"
  13. '-----------------------------------------------------
  14. 'START of localization content
  15. Dim L_PAGETITLE_TEXT
  16. Dim L_ABOUTLBL_TEXT
  17. Dim L_MIC_WINDOWS_TEXT
  18. Dim L_VERSION_TEXT
  19. Dim L_COPYRIGHT_TEXT
  20. Dim L_WIN2K_COPYRIGHT
  21. Dim L_PRODUCTID_TEXT
  22. Dim L_WARNING_TEXT
  23. Dim L_OS_BUILD_NUMBER
  24. Dim m_strResourceDLL
  25. Dim m_strAboutResourceDLL
  26. m_strResourceDLL = "sakitmsg.dll"
  27. L_PAGETITLE_TEXT = GetLocString(m_strResourceDLL, "&H40010005", "")
  28. L_ABOUTLBL_TEXT = GetLocString(m_strResourceDLL, "&H40010006", "")
  29. L_MIC_WINDOWS_TEXT = GetLocString(m_strResourceDLL, "&H40010007", "")
  30. L_COPYRIGHT_TEXT = GetLocString(m_strResourceDLL, "&H40010009", "")
  31. L_PRODUCTID_TEXT = GetLocString(m_strResourceDLL, "&H4001000A", "")
  32. L_WARNING_TEXT = GetLocString(m_strResourceDLL, "&H4001000B", "")
  33. L_OS_BUILD_NUMBER = GetLocString(m_strResourceDLL, "&H40010038", "")
  34. L_WIN2K_COPYRIGHT = GetLocString(m_strResourceDLL, "&H400107D0", "")
  35. 'End of localization content
  36. '-----------------------------------------------------
  37. ServeAbout()
  38. Function ServeAbout()
  39. Dim objAM
  40. Dim objOS
  41. Dim objHelper
  42. Dim obj
  43. Dim strOSName
  44. Dim strOSBuildNumber
  45. Dim strBuildNum
  46. Dim strPID
  47. Dim iSP
  48. Dim strReturnURL
  49. Dim aBuildNumber(1)
  50. Dim repStrings
  51. on error resume next
  52. Err.Clear
  53. strReturnURL = Request("ReturnURL")
  54. Set objAM = GetObject("WINMGMTS:" & SA_GetWMIConnectionAttributes() &"!\\" & GetServerName & "\root\cimv2:Microsoft_SA_Manager=@" )
  55. If ( Err.Number <> 0 ) Then
  56. Call SA_TraceOut(SA_GetScriptFileName(), "Get Microsoft_SA_Manager failed: " + CStr(Hex(Err.Number)) + " " + Err.Description)
  57. Exit Function
  58. End If
  59. set objOS = GetObject("WINMGMTS:" & SA_GetWMIConnectionAttributes() &"!\\" & GetServerName & "\root\cimv2:Win32_OperatingSystem").Instances_
  60. If ( Err.Number <> 0 ) Then
  61. Call SA_TraceOut(SA_GetScriptFileName(), "Get Win32_OperatingSystem failed: " + CStr(Hex(Err.Number)) + " " + Err.Description)
  62. Exit Function
  63. End If
  64. for each obj in objOS
  65. strOSName = obj.Caption
  66. strOSBuildNumber = obj.BuildNumber
  67. iSP = obj.ServicePackMajorVersion
  68. exit for
  69. next
  70. Dim strWinOS
  71. strWinOS = GetLocString("sacoremsg.dll", "40200BC6", "")
  72. if strOSName = strWinOS then
  73. if iSP = 1 then
  74. Err.Clear
  75. set objHelper = Server.CreateObject("ServerAppliance.SAHelper")
  76. if Err.Number = 0 then
  77. if objHelper.IsWindowsPowered() = true then
  78. strOSName = GetLocString("sacoremsg.dll", "40200BC7", "")
  79. end if
  80. set objHelper = Null
  81. end if
  82. end if
  83. end if
  84. aBuildNumber(0) = objAM.CurrentBuildNumber
  85. strPID = objAM.ProductId
  86. Set objAM = Nothing
  87. repStrings = aBuildNumber
  88. L_VERSION_TEXT = GetLocString(m_strResourceDLL, "&H40010008", repStrings)
  89. %>
  90. <html>
  91. <!-- Copyright (c) Microsoft Corporation. All rights reserved.-->
  92. <head>
  93. <meta http-equiv="Content-Type" content="text/html; charset=<%=GetCharSet()%>">
  94. <script language=JavaScript src="<%=m_VirtualRoot%>sh_page.js"></script>
  95. <%
  96. Call SA_EmitAdditionalStyleSheetReferences("")
  97. %>
  98. <title><% = L_PAGETITLE_TEXT %></title>
  99. </head>
  100. <BODY onDragDrop="return false;" xoncontextmenu="return false;" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" class="AREAPAGEBODY">
  101. <br><div align=center><IMG src="<%=m_VirtualRoot%>images/aboutbox_logo.gif" border=0></div>
  102. <div class=PageBodyIndent>
  103. <% Call ServeStandardHeaderBar(L_ABOUTLBL_TEXT,"") %>
  104. <table class="AreaText" cellpadding=10 border=0>
  105. <tr>
  106. <td>
  107. <%=strOSName%>&nbsp;<%if iSP<>0 then response.write "SP " & iSP end if %>&nbsp;(<%=L_OS_BUILD_NUMBER%>&nbsp;<%=strOSBuildNumber%>)<BR>
  108. <%=L_PRODUCTID_TEXT%> <% =strPID %><br>
  109. <%=L_WIN2K_COPYRIGHT%><br><br>
  110. <%=L_WARNING_TEXT%><br><br>
  111. </td>
  112. </tr>
  113. <% ServeComponentList() %>
  114. </table>
  115. <br>
  116. <DIV ID="PropertyPageButtons" class="ButtonBar" align="left">
  117. <%
  118. Call SA_ServeOnClickButton(L_FOKBUTTON_TEXT, "images/butGreenArrow.gif", "JavaScript:window.close();", 50,28, SA_DEFAULT)
  119. %>
  120. </div>
  121. &nbsp;&nbsp;
  122. </div>
  123. <br>
  124. </BODY>
  125. </html>
  126. <%
  127. End Function
  128. Function ServeComponentList()
  129. Dim objElements
  130. Dim objElement
  131. Dim sCaptionID
  132. Dim sCaption
  133. Dim sVersionID
  134. Dim sVersion
  135. Dim sCopyrightID
  136. Dim sCopyright
  137. Dim sResourceDLL
  138. on error resume next
  139. Err.Clear
  140. Set objElements = GetElements(ABOUT_BOX_CONTAINER)
  141. Response.Flush
  142. For each objElement in objElements
  143. If objElement.GetProperty("IsEmbedded") Then
  144. Response.Write("<tr><td>"+vbCrLf)
  145. Dim sURL
  146. sURL = Trim(objElement.GetProperty("URL"))
  147. If ( Err.Number <> 0 ) Then
  148. Response.Clear()
  149. Elseif ( Len(sURL) <= 0 ) Then
  150. Response.Clear()
  151. Else
  152. Server.Execute(sURL)
  153. Response.Write("</td></tr>"+vbCrLf)
  154. Response.Flush()
  155. End If
  156. Else
  157. Response.Write("<tr><td>"+vbCrLf)
  158. '
  159. ' Get Element RID's for Caption, Copyright, and Version
  160. '
  161. sCaptionID = objElement.GetProperty("CaptionRID")
  162. sVersionID = objElement.GetProperty("VersionRID")
  163. sCopyrightID = objElement.GetProperty("CopyrightRID")
  164. sResourceDLL = objElement.GetProperty("Source")
  165. If ( Len(Trim(sCaptionID)) > 0 ) Then
  166. sCaption = GetLocString(sResourceDLL, sCaptionID, "")
  167. Response.Write(sCaption + "<br>" + vbCrLf)
  168. End If
  169. If ( Len(Trim(sVersionID)) > 0 ) Then
  170. sVersion = GetLocString(sResourceDLL, sVersionID, "")
  171. Response.Write(sVersion + "<br>" + vbCrLf)
  172. End If
  173. If ( Len(Trim(sCopyrightID)) > 0 ) Then
  174. sCopyright = GetLocString(sResourceDLL, sCopyrightID, "")
  175. Response.Write(sCopyright + "<br>" + vbCrLf)
  176. End If
  177. Response.Write("</td></tr>"+vbCrLf)
  178. Response.Flush()
  179. End If
  180. Response.Flush
  181. Next
  182. Set objElements = nothing
  183. End Function
  184. %>