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.

147 lines
5.5 KiB

  1. <%@ Language=VBScript EnableSessionState=False%>
  2. <%
  3. 'Copyright (c) 1999 - 2000 Microsoft Corporation. All rights reserved.
  4. Dim strPage
  5. Dim objRet
  6. Dim objItem
  7. Dim objElements
  8. Dim rc
  9. On Error Resume Next
  10. Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
  11. strSourceName = "sakitmsg.dll"
  12. if Err.number <> 0 then
  13. Response.Write "Error in localizing the web content "
  14. Response.End
  15. end if
  16. '-----------------------------------------------------
  17. 'START of localization content
  18. DIM L_ELEMENTMGRTEST_TEXT
  19. DIM L_SERVER_TEXT
  20. DIM L_CONTAINER_TEXT
  21. DIM L_ELEMENTCOUNT_TEXT
  22. DIM L_ELEMENTID_TEXT
  23. DIM L_TRIMMEDELEMENTID_TEXT
  24. DIM L_TEXT
  25. DIM L_CAPTIONRID_TEXT
  26. DIM L_DESCRIPTIONRID_TEXT
  27. DIM L_URL_TEXT
  28. DIM L_MERIT_TEXT
  29. DIM L_ELEMENTGRAPHIC_TEXT
  30. DIM L_OBJECTCLASS_TEXT
  31. DIM L_OBJECTKEY_TEXT
  32. DIM L_ISEMBEDDED_TEXT
  33. DIM L_NAME_TEXT
  34. DIM L_DEVICEID_TEXT
  35. DIM L_TYPE_TEXT
  36. L_ELEMENTMGRTEST_TEXT = objLocMgr.GetString(strSourceName, "&H40010053",varReplacementStrings)
  37. L_SERVER_TEXT = objLocMgr.GetString(strSourceName, "&H40010054",varReplacementStrings)
  38. L_CONTAINER_TEXT = objLocMgr.GetString(strSourceName, "&H40010055",varReplacementStrings)
  39. L_ELEMENTCOUNT_TEXT = objLocMgr.GetString(strSourceName, "&H40010056",varReplacementStrings)
  40. L_ELEMENTID_TEXT = objLocMgr.GetString(strSourceName, "&H40010057",varReplacementStrings)
  41. L_TRIMMEDELEMENTID_TEXT = objLocMgr.GetString(strSourceName, "&H40010058",varReplacementStrings)
  42. L_TEXT = objLocMgr.GetString(strSourceName, "&H40010059",varReplacementStrings)
  43. L_CAPTIONRID_TEXT = objLocMgr.GetString(strSourceName, "&H4001005A",varReplacementStrings)
  44. L_DESCRIPTIONRID_TEXT = objLocMgr.GetString(strSourceName, "&H4001005B",varReplacementStrings)
  45. L_URL_TEXT = objLocMgr.GetString(strSourceName, "&H4001005C",varReplacementStrings)
  46. L_MERIT_TEXT = objLocMgr.GetString(strSourceName, "&H4001005D",varReplacementStrings)
  47. L_ELEMENTGRAPHIC_TEXT = objLocMgr.GetString(strSourceName, "&H4001005E",varReplacementStrings)
  48. L_OBJECTCLASS_TEXT= objLocMgr.GetString(strSourceName, "&H4001005F",varReplacementStrings)
  49. L_OBJECTKEY_TEXT= objLocMgr.GetString(strSourceName, "&H40010060",varReplacementStrings)
  50. L_ISEMBEDDED_TEXT= objLocMgr.GetString(strSourceName, "&H40010061",varReplacementStrings)
  51. L_NAME_TEXT = objLocMgr.GetString(strSourceName, "&H40010062",varReplacementStrings)
  52. L_DEVICEID_TEXT = objLocMgr.GetString(strSourceName, "&H40010063",varReplacementStrings)
  53. L_TYPE_TEXT = objLocMgr.GetString(strSourceName, "&H40010064",varReplacementStrings)
  54. 'End of localization content
  55. '-----------------------------------------------------
  56. On Error Resume Next
  57. strPage = Request.Form("Page")
  58. %>
  59. <HTML>
  60. <!-- Copyright (c) 1999 - 2000 Microsoft Corporation. All rights reserved-->
  61. <HEAD>
  62. </HEAD>
  63. <BODY bgcolor="silver">
  64. <FORM action="elementmgr.asp" method=POST>
  65. <strong><% =L_ELEMENTMGRTEST_TEXT %></strong><BR>
  66. <BR>
  67. <% =L_SERVER_TEXT %><% =GetServerName %>
  68. <BR><BR>
  69. <% =L_CONTAINER_TEXT %>&nbsp;<INPUT type=text name="Page" value="<% =strPage %>">
  70. <BR>
  71. <BR>
  72. <INPUT type=submit value="Go get 'em" id=P3_ID01>
  73. <BR>
  74. <HR>
  75. <BR>
  76. <%
  77. Set objRet = Server.CreateObject("Elementmgr.ElementRetriever")
  78. 'response.write "Ret type: " & TypeName(objRet) & "<BR>"
  79. Set objElements = objRet.GetElements(1, strPage)
  80. 'response.write "objElements type: " & TypeName(objElements) & "<BR>"
  81. response.write L_ELEMENTCOUNT_TEXT & objElements.Count & "<BR><BR>"
  82. response.write "<OL>"
  83. For Each objItem in objElements
  84. response.write "<LI>"
  85. response.write L_ELEMENTID_TEXT & objItem.GetProperty("ElementID") & "<BR>"
  86. Dim strElementID
  87. strElementID = objItem.GetProperty("ElementID")
  88. objItem.GetProperty("ObjectClass")
  89. If Err.Number = 0 Then
  90. Response.Write L_TRIMMEDELEMENTID_TEXT & Left(strElementID, InStrRev(strElementID, "_")-1) & "<BR>"
  91. Else
  92. Err.Clear
  93. End If
  94. response.write L_CAPTIONRID_TEXT & objItem.GetProperty("CaptionRID") & "<BR>"
  95. response.write L_DESCRIPTIONRID_TEXT & objItem.GetProperty("DescriptionRID") & "<BR>"
  96. response.write L_URL_TEXT & objItem.GetProperty("URL") & "<BR>"
  97. response.write L_MERIT_TEXT & objItem.GetProperty("Merit") & "<BR>"
  98. response.write L_ELEMENTGRAPHIC_TEXT & objItem.GetProperty("ElementGraphic") & "<BR>"
  99. response.write L_OBJECTCLASS_TEXT & objItem.GetProperty("ObjectClass") & "<BR>"
  100. response.write L_OBJECTKEY_TEXT & objItem.GetProperty("ObjectKey") & "<BR>"
  101. response.write L_ISEMBEDDED_TEXT & objItem.GetProperty("IsEmbedded") & "<BR>"
  102. response.write L_NAME_TEXT & objItem.GetProperty("Name") & "<BR>"
  103. response.write L_DEVICEID_TEXT & objItem.GetProperty("DeviceID") & "<BR>"
  104. response.write L_TYPE_TEXT & objItem.GetProperty("Type") & "<BR><BR>"
  105. Err.clear
  106. Next
  107. Set objElements = Nothing
  108. Set objRet = Nothing
  109. Set objItem = Nothing
  110. %>
  111. </form>
  112. </BODY>
  113. </HTML>
  114. <%
  115. '=========================================
  116. Function GetServerName()
  117. On Error Resume Next
  118. GetServerName = Request.ServerVariables("SERVER_NAME")
  119. End Function
  120. %>