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.
|
|
<!--
'------------------------------------------------------------------------------ ' ' Directory Service Administration Property Pages ' ' Microsoft Windows ' Copyright (C) Microsoft Corporation, 1992 - 1997. ' ' File: usrorg.htm ' ' Contents: User Organization property page. ' ' History: 2-19-97 ericb created. ' '------------------------------------------------------------------------------ --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN"> <HTML> <HEAD> <META http-equiv=Content-Type content="text/html; charset=ANSI_X3.4-1968"> </HEAD>
<BODY bgcolor=silver onload="DoOnLoad()">
<OBJECT ID=ActiveDir CLASSID="Clsid:0998BB05-DFFD-11CF-927F-00AA00688A38"> </OBJECT>
<SCRIPT language=vbscript> dim DsObj
'------------------------------------------------------------------------------ ' ' Subroutine: DoOnLoad ' ' Synopsis: Bind to the DS object and set the initial control values. ' '------------------------------------------------------------------------------ sub DoOnLoad on error resume next
' ' Extract the object path from the URL params. This assumes that ' path= immediatly follows the ? ' strUrl = document.URL
URLlen = len(strUrl) i = InStr(strUrl, "?") i = InStr(i, strUrl, "=") EncodedPath = right(strUrl, URLlen - i)
err.clear
path = ActiveDir.DecodeURL((EncodedPath))
if err.number <> 0 then alert("ActiveDir.DecodeURL failed with error " & hex(err.number) &_ " " & err.description) exit sub end if
' ' Activate the object. ' set DsObj = ActiveDir.DSGetObject((path))
if err.number <> 0 then alert("ActiveDir.DSGetObject failed with error " & hex(err.number) &_ " " & err.description) exit sub end if
' ' Get the object attributes for this page. ' document.forms(0).title.value = DsObj.Get("title")
if (err.number <> 0) and (err.number <> &h8000500D) then alert("Get title failed with error " & hex(err.number) & " " &_ err.description) err.clear end if
document.forms(0).department.value = DsObj.Get("department")
if (err.number <> 0) and (err.number <> &h8000500D) then alert("Get department failed with error " & hex(err.number) & " " &_ err.description) err.clear end if
document.forms(0).manager.value = DsObj.Get("manager")
if (err.number <> 0) and (err.number <> &h8000500D) then alert("Get manager failed with error " & hex(err.number) & " " &_ err.description) err.clear end if end sub
'------------------------------------------------------------------------------ ' ' Subroutine: DoApply ' ' Synopsis: Set the DS object to the new control values. ' '------------------------------------------------------------------------------ sub DoApply on error resume next if not isobject(DsObj) then alert("DsObject is not active on entry to DoApply subroutine!") end if err.clear
DsObj.Put "title", (document.forms(0).title.value)
if err.number <> 0 then alert("Put title failed with error " & hex(err.number) & " " &_ err.description) err.clear end if
DsObj.Put "department", (document.forms(0).department.value)
if err.number <> 0 then alert("Put department failed with error " & hex(err.number) & " " &_ err.description) err.clear end if
' BUGBUG: Need a 'person-picker' to do DS DN properties like this. 'DsObj.Put "manager", (document.forms(0).manager.value)
if err.number <> 0 then alert("Put manager failed with error " & hex(err.number) & " " &_ err.description) err.clear end if
DsObj.Put "company", (document.forms(0).company.value)
if err.number <> 0 then alert("Put company failed with error " & hex(err.number) & " " &_ err.description) err.clear end if
DsObj.SetInfo
if err.number <> 0 then errstr = "SetInfo failed with error " & hex(err.number) & " " &_ err.description if err.number = &h800704B8 then errstr = errstr & ". Extended error: " & ActiveDir.DSGetLastError end if alert(errstr) err.clear end if end sub </SCRIPT>
<form> <font face=Arial size=2>
<div style="position:absolute; top:0.4em; left:0.3em; height:2em; width:29em;"> <div style="position:absolute; top:0.3em; left:0em;">Title:</div> <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=title> </div>
<div style="position:absolute; top:2.7em; left:0.3em; height:2em; width:29em;"> <div style="position:absolute; top:0.3em; left:0em;">Department:</div> <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=department> </div>
<div style="position:absolute; top:5em; left:0.3em; height:2em; width:29em;"> <div style="position:absolute; top:0.3em; left:0em;">Manager*:</div> <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=manager> </div>
<div style="position:absolute; top:7.3em; left:0.3em; height:2em; width:29em;"> <div style="position:absolute; top:0.3em; left:0em;">Company:</div> <INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=company> </div>
<div style="position:absolute; top:9.6em; left:0.3em; height:2em; width:29em;"> </div>
<div style="position:absolute; top:11.9em; left:0.3em; height:2em; width:29em;"> </div>
<div style="position:absolute; top:14.2em; left:0.3em; height:2em; width:29em;"> </div>
<div style="position:absolute; top:16.5em; left:0.3em; height:2em; width:29em;"> </div>
<div style="position:absolute; top:19.5em; left:0.3em; height:2em; width:29em;"> </div>
</font> </form>
<SCRIPT language=vbscript>
'------------------------------------------------------------------------------ ' ' Subroutine: Filler ' ' Synopsis: This is here only as a work around for the display bug in the ' layout engine. ' '------------------------------------------------------------------------------ sub Filler on error resume next
DsObj.Put "givenName", (document.forms(0).title.value)
if err.number <> 0 then alert("Put title failed with error " & hex(err.number) & " " &_ err.description) end if
DsObj.Put "sn", (document.forms(0).lastname.value)
if err.number <> 0 then alert("Put lastname failed with error " & hex(err.number) & " " &_ err.description) end if
DsObj.Put "url", (document.forms(0).homepage.value)
if err.number <> 0 then alert("Put homepage failed with error " & hex(err.number) & " " &_ err.description) end if
DsObj.SetInfo
if err.number <> 0 then alert("SetInfo failed with error " & hex(err.number) & " " &_ err.description) end if end sub
</SCRIPT>
</BODY> </HTML>
|