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.

278 lines
6.5 KiB

  1. <!--
  2. '------------------------------------------------------------------------------
  3. '
  4. ' Directory Service Administration Property Pages
  5. '
  6. ' Microsoft Windows
  7. ' Copyright (C) Microsoft Corporation, 1992 - 1997.
  8. '
  9. ' File: general.htm
  10. '
  11. ' Contents: General property page.
  12. '
  13. ' History: 2-25-97 ericb created.
  14. '
  15. '------------------------------------------------------------------------------
  16. -->
  17. <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN">
  18. <HTML>
  19. <HEAD>
  20. <META http-equiv=Content-Type content="text/html; charset=ANSI_X3.4-1968">
  21. </HEAD>
  22. <OBJECT ID=ActiveDir CLASSID="Clsid:0998BB05-DFFD-11CF-927F-00AA00688A38">
  23. </OBJECT>
  24. <SCRIPT language=vbscript>
  25. dim DsObj
  26. '------------------------------------------------------------------------------
  27. '
  28. ' Subroutine: DoOnLoad
  29. '
  30. ' Synopsis: Bind to the DS object and set the initial control values.
  31. '
  32. '------------------------------------------------------------------------------
  33. sub DoOnLoad
  34. on error resume next
  35. '
  36. ' Extract the object path from the URL params. This assumes that
  37. ' path= immediatly follows the ?
  38. '
  39. strUrl = document.URL
  40. URLlen = len(strUrl)
  41. i = InStr(strUrl, "?")
  42. i = InStr(i, strUrl, "=")
  43. EncodedPath = right(strUrl, URLlen - i)
  44. err.clear
  45. path = ActiveDir.DecodeURL((EncodedPath))
  46. if err.number <> 0 then
  47. alert("ActiveDir.DecodeURL failed with error " & hex(err.number) &_
  48. " " & err.description)
  49. exit sub
  50. end if
  51. '
  52. ' Activate the object.
  53. '
  54. set DsObj = ActiveDir.DSGetObject((path))
  55. if err.number <> 0 then
  56. alert("ActiveDir.DSGetObject failed with error " & hex(err.number) &_
  57. " " & err.description)
  58. exit sub
  59. end if
  60. '
  61. ' Get the object attributes for this page.
  62. '
  63. '
  64. ' Object name
  65. '
  66. DsName = DsObj.Get("name")
  67. if err.number <> 0 then
  68. alert("Get name failed with error " & hex(err.number) & " " &_
  69. err.desctiption)
  70. err.clear
  71. end if
  72. set Element = document.all.item("objname", 0)
  73. if err.number <> 0 then
  74. alert("item(objname) failed with error " & hex(err.number) & " " &_
  75. err.desctiption)
  76. err.clear
  77. end if
  78. set NameRange = document.rangeFromElement(Element)
  79. NameRange.pasteHTML(DsName)
  80. set Element = nothing
  81. set NameRange = nothing
  82. '
  83. ' Class
  84. '
  85. ObjClassList = DsObj.Get("objectClass")
  86. if err.number <> 0 then
  87. alert("Get class failed with error " & hex(err.number) & " " &_
  88. err.desctiption)
  89. err.clear
  90. end if
  91. Const vbString = 8
  92. if VarType(ObjClassList) = vbString then
  93. DsClass = TrimPath(ObjClassList)
  94. else
  95. i = 0
  96. for each obj in ObjClassList
  97. DsClass = obj
  98. if i = 0 then
  99. if obj <> "top" then
  100. exit for
  101. end if
  102. i = i + 1
  103. end if
  104. next
  105. end if
  106. set Element = document.all.item("objclass", 0)
  107. if err.number <> 0 then
  108. alert("item(objclass) failed with error " & hex(err.number) & " " &_
  109. err.desctiption)
  110. err.clear
  111. end if
  112. set ClassRange = document.rangeFromElement(Element)
  113. ClassRange.pasteHTML(DsClass)
  114. end sub
  115. '------------------------------------------------------------------------------
  116. '
  117. ' Subroutine: DoApply
  118. '
  119. ' Synopsis: Set the DS object to the new control values.
  120. '
  121. '------------------------------------------------------------------------------
  122. sub DoApply
  123. end sub
  124. </SCRIPT>
  125. <BODY bgcolor=silver onload="DoOnLoad()">
  126. <font face=Arial size=2>
  127. <table rows=1 cols=2 borders=0 cellpadding=5>
  128. <tr>
  129. <td>
  130. <img src=images\user.gif>
  131. </td>
  132. <td valign=center>
  133. <font face=Arial size=2><span id=objname></span></font>
  134. </td>
  135. </tr>
  136. </table>
  137. <hr>
  138. <table rows=4 cols=2 borders=0 cellpadding=0 width=100%>
  139. <tr>
  140. <td align=left>
  141. <font face=Arial size=2>Type:</font>
  142. </td>
  143. <td align=left>
  144. <font face=Arial size=2><span id=objclass></span></font>
  145. </td>
  146. </tr>
  147. <tr>
  148. <td align=left colspan=2>
  149. <hr>
  150. </td>
  151. </tr>
  152. <tr>
  153. <td align=left>
  154. <font face=Arial size=2>Creation Time:</font>
  155. </td>
  156. <td align=left>
  157. <font face=Arial size=2><span id=createtime>1/1/80 12:00AM</span></font>
  158. </td>
  159. </tr>
  160. <tr>
  161. <td align=left>
  162. <font face=Arial size=2>Last Modified:</font>
  163. </td>
  164. <td align=left>
  165. <font face=Arial size=2><span id=modtime>1/1/80 12:00AM</span></font>
  166. </td>
  167. </tr>
  168. </table>
  169. </font>
  170. <SCRIPT language=vbscript>
  171. '------------------------------------------------------------------------------
  172. '
  173. ' Subroutine: Filler
  174. '
  175. ' Synopsis: This is here only as a work around for the display bug in the
  176. ' layout engine.
  177. '
  178. '------------------------------------------------------------------------------
  179. sub Filler
  180. on error resume next
  181. DsObj.Put "givenName", document.forms(0).firstname.value
  182. if err.number <> 0 then
  183. alert("Put firstname failed with error " & hex(err.number) & " " &_
  184. err.desctiption)
  185. end if
  186. DsObj.Put "sn", document.forms(0).lastname.value
  187. if err.number <> 0 then
  188. alert("Put lastname failed with error " & hex(err.number) & " " &_
  189. err.desctiption)
  190. end if
  191. DsObj.Put "url", document.forms(0).homepage.value
  192. if err.number <> 0 then
  193. alert("Put homepage failed with error " & hex(err.number) & " " &_
  194. err.desctiption)
  195. end if
  196. DsObj.SetInfo
  197. if err.number <> 0 then
  198. alert("SetInfo failed with error " & hex(err.number) & " " &_
  199. err.desctiption)
  200. end if
  201. end sub
  202. sub Filler1
  203. on error resume next
  204. DsObj.Put "givenName", document.forms(0).firstname.value
  205. if err.number <> 0 then
  206. alert("Put firstname failed with error " & hex(err.number) & " " &_
  207. err.desctiption)
  208. end if
  209. DsObj.Put "sn", document.forms(0).lastname.value
  210. if err.number <> 0 then
  211. alert("Put lastname failed with error " & hex(err.number) & " " &_
  212. err.desctiption)
  213. end if
  214. DsObj.Put "url", document.forms(0).homepage.value
  215. if err.number <> 0 then
  216. alert("Put homepage failed with error " & hex(err.number) & " " &_
  217. err.desctiption)
  218. end if
  219. DsObj.SetInfo
  220. if err.number <> 0 then
  221. alert("SetInfo failed with error " & hex(err.number) & " " &_
  222. err.desctiption)
  223. end if
  224. end sub
  225. </SCRIPT>
  226. </BODY>
  227. </HTML>