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.

301 lines
9.2 KiB

  1. <!--
  2. '------------------------------------------------------------------------------
  3. '
  4. ' Directory Service Administration Property Pages
  5. '
  6. ' Microsoft Windows
  7. ' Copyright (C) Microsoft Corporation, 1992 - 1997.
  8. '
  9. ' File: usrgen.htm
  10. '
  11. ' Contents: User General property page.
  12. '
  13. ' History: 2-11-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. <style>
  22. <!--
  23. body, input {font-size: 9pt; font-family: "MS Sans Serif, sans-serif"}
  24. -->
  25. </style>
  26. </HEAD>
  27. <BODY bgcolor=silver onload="DoOnLoad()">
  28. <OBJECT ID=ActiveDir CLASSID="Clsid:0998BB05-DFFD-11CF-927F-00AA00688A38">
  29. </OBJECT>
  30. <SCRIPT language=vbscript>
  31. dim DsObj
  32. '------------------------------------------------------------------------------
  33. '
  34. ' Subroutine: DoOnLoad
  35. '
  36. ' Synopsis: Bind to the DS object and set the initial control values.
  37. '
  38. '------------------------------------------------------------------------------
  39. sub DoOnLoad
  40. on error resume next
  41. '
  42. ' Extract the object path from the URL params. This assumes that
  43. ' path= immediatly follows the ?
  44. '
  45. strUrl = document.URL
  46. URLlen = len(strUrl)
  47. i = InStr(strUrl, "?")
  48. i = InStr(i, strUrl, "=")
  49. EncodedPath = right(strUrl, URLlen - i)
  50. err.clear
  51. path = ActiveDir.DecodeURL((EncodedPath))
  52. if err.number <> 0 then
  53. alert("ActiveDir.DecodeURL failed with error " & hex(err.number) &_
  54. " " & err.description)
  55. exit sub
  56. end if
  57. '
  58. ' Activate the object.
  59. '
  60. set DsObj = ActiveDir.DSGetObject((path))
  61. if err.number <> 0 then
  62. alert("ActiveDir.DSGetObject failed with error " & hex(err.number) &_
  63. " " & err.description)
  64. exit sub
  65. end if
  66. '
  67. ' Get the object attributes for this page.
  68. '
  69. 'document.forms(0).fullname.value = DsObj.Get("userFullName")
  70. if (err.number <> 0) and (err.number <> &h8000500D) then
  71. alert("Get fullname failed with error " & hex(err.number) & " " &_
  72. err.description)
  73. err.clear
  74. end if
  75. end sub
  76. '------------------------------------------------------------------------------
  77. '
  78. ' Subroutine: DoApply
  79. '
  80. ' Synopsis: Set the DS object to the new control values.
  81. '
  82. '------------------------------------------------------------------------------
  83. sub DoApply
  84. on error resume next
  85. 'DsObj.Put "userFullName", (document.forms(0).fullname.value)
  86. if err.number <> 0 then
  87. alert("Put fullname failed with error " & hex(err.number) & " " &_
  88. err.description)
  89. err.clear
  90. end if
  91. 'DsObj.Put "givenName", (document.forms(0).firstname.value)
  92. if err.number <> 0 then
  93. alert("Put firstname failed with error " & hex(err.number) & " " &_
  94. err.description)
  95. err.clear
  96. end if
  97. 'DsObj.Put "sn", (document.forms(0).lastname.value)
  98. if err.number <> 0 then
  99. alert("Put lastname failed with error " & hex(err.number) & " " &_
  100. err.description)
  101. err.clear
  102. end if
  103. 'DsObj.Put "personalTitle", (document.forms(0).prefix.value)
  104. if err.number <> 0 then
  105. alert("Put prefix failed with error " & hex(err.number) & " " &_
  106. err.description)
  107. err.clear
  108. end if
  109. 'DsObj.Put "generationQualifier", (document.forms(0).suffix.value)
  110. if err.number <> 0 then
  111. alert("Put suffix failed with error " & hex(err.number) & " " &_
  112. err.description)
  113. err.clear
  114. end if
  115. '
  116. ' Email addresses: loop through the list.
  117. '
  118. 'DsObj.Put "description", (document.forms(0).description.value)
  119. if err.number <> 0 then
  120. alert("Put description failed with error " & hex(err.number) & " " &_
  121. err.description)
  122. err.clear
  123. end if
  124. 'DsObj.SetInfo
  125. if err.number <> 0 then
  126. errstr = "SetInfo failed with error " & hex(err.number) & " " &_
  127. err.description
  128. if err.number = &h800704B8 then
  129. errstr = errstr & ". Extended error: " & ActiveDir.DSGetLastError
  130. end if
  131. alert(errstr)
  132. err.clear
  133. end if
  134. end sub
  135. </SCRIPT>
  136. <form>
  137. <div style="position:absolute; top:0.4em; left:0.3em; height:2em; width:29em;">
  138. <div style="position:absolute; top:0.3em; left:0em;">Account Expires:</div>
  139. <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=expires>
  140. </div>
  141. <div style="position:absolute; top:2.7em; left:0.3em; height:2em; width:29em;">
  142. <div style="position:absolute; top:0.3em; left:0em;">Account Disable:</div>
  143. <INPUT TYPE=radio class=PageInput value="Yes" style="position:absolute; top:0.4em; left:10em;" name=disable>
  144. <div style="position:absolute; top:0.3em; left:11.5em;">Yes</div>
  145. <INPUT TYPE=radio class=PageInput value="No" style="position:absolute; top:0.4em; left:15em;" name=disable>
  146. <div style="position:absolute; top:0.3em; left:16.5em;">No</div>
  147. </div>
  148. <div style="position:absolute; top:5em; left:0.3em; height:2em; width:29em;">
  149. <div style="position:absolute; top:0.3em; left:0em;">Bad Password Attemps:</div>
  150. <div style="position:absolute; top:0.3em; left:10em; height:1.6em; width:15em;">
  151. <span id=BadPwAttempt>0</span></div>
  152. </div>
  153. <div style="position:absolute; top:7.3em; left:0.3em; height:2em; width:29em;">
  154. <div style="position:absolute; top:0.3em; left:0em;">Home Directory:</div>
  155. <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=HomeDir>
  156. </div>
  157. <div style="position:absolute; top:9.6em; left:0.3em; height:2em; width:29em;">
  158. <div style="position:absolute; top:0.3em; left:0em;">Home Drive:</div>
  159. <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=HomeDrive>
  160. </div>
  161. <div style="position:absolute; top:11.9em; left:0.3em; height:2em; width:29em;">
  162. <div style="position:absolute; top:0.3em; left:0em;">Login Script:</div>
  163. <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=LoginScript>
  164. </div>
  165. <div style="position:absolute; top:14.2em; left:0.3em; height:2em; width:29em;">
  166. <div style="position:absolute; top:0.3em; left:0em;">Logon Workstation:</div>
  167. <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=LogonWksta>
  168. </div>
  169. <div style="position:absolute; top:16.5em; left:0.3em; height:2em; width:29em;">
  170. <div style="position:absolute; top:0.3em; left:0em;">Storage Max Bytes:</div>
  171. <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=MaxBytes>
  172. </div>
  173. <div style="position:absolute; top:18.8em; left:0.3em; height:2em; width:29em;">
  174. <div style="position:absolute; top:0.3em; left:0em;">Locale ID:</div>
  175. <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=LocaleID>
  176. </div>
  177. <div style="position:absolute; top:21.1em; left:0.3em; height:2em; width:29em;">
  178. <div style="position:absolute; top:0.3em; left:0em;">Preferred OU:</div>
  179. <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=PreferOU>
  180. </div>
  181. </form>
  182. <SCRIPT language=vbscript>
  183. '------------------------------------------------------------------------------
  184. '
  185. ' Subroutine: Filler
  186. '
  187. ' Synopsis: This is here only as a work around for the display bug in the
  188. ' layout engine.
  189. '
  190. '------------------------------------------------------------------------------
  191. sub Filler
  192. on error resume next
  193. DsObj.Put "givenName", document.forms(0).firstname.value
  194. if err.number <> 0 then
  195. alert("Put firstname failed with error " & hex(err.number) & " " &_
  196. err.description)
  197. end if
  198. DsObj.Put "sn", document.forms(0).lastname.value
  199. if err.number <> 0 then
  200. alert("Put lastname failed with error " & hex(err.number) & " " &_
  201. err.description)
  202. end if
  203. DsObj.Put "url", document.forms(0).homepage.value
  204. if err.number <> 0 then
  205. alert("Put homepage failed with error " & hex(err.number) & " " &_
  206. err.description)
  207. end if
  208. DsObj.SetInfo
  209. if err.number <> 0 then
  210. alert("SetInfo failed with error " & hex(err.number) & " " &_
  211. err.description)
  212. end if
  213. end sub
  214. sub Filler1
  215. on error resume next
  216. DsObj.Put "givenName", document.forms(0).firstname.value
  217. if err.number <> 0 then
  218. alert("Put firstname failed with error " & hex(err.number) & " " &_
  219. err.description)
  220. end if
  221. DsObj.Put "sn", document.forms(0).lastname.value
  222. if err.number <> 0 then
  223. alert("Put lastname failed with error " & hex(err.number) & " " &_
  224. err.description)
  225. end if
  226. DsObj.Put "url", document.forms(0).homepage.value
  227. if err.number <> 0 then
  228. alert("Put homepage failed with error " & hex(err.number) & " " &_
  229. err.description)
  230. end if
  231. DsObj.SetInfo
  232. if err.number <> 0 then
  233. alert("SetInfo failed with error " & hex(err.number) & " " &_
  234. err.description)
  235. end if
  236. end sub
  237. </SCRIPT>
  238. </BODY>
  239. </HTML>