324 lines
9.2 KiB
HTML
324 lines
9.2 KiB
HTML
|
<!--
|
||
|
'------------------------------------------------------------------------------
|
||
|
'
|
||
|
' Directory Service Administration Property Pages
|
||
|
'
|
||
|
' Microsoft Windows
|
||
|
' Copyright (C) Microsoft Corporation, 1992 - 1997.
|
||
|
'
|
||
|
' File: usrgen.htm
|
||
|
'
|
||
|
' Contents: User General property page.
|
||
|
'
|
||
|
' History: 2-11-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).fullname.value = DsObj.Get("userFullName")
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Get fullname failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
document.forms(0).firstname.value = DsObj.Get("givenName")
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Get firstname failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
document.forms(0).lastname.value = DsObj.Get("sn")
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Get lastname failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
document.forms(0).prefix.value = DsObj.Get("personalTitle")
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Get prefix failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
document.forms(0).suffix.value = DsObj.Get("generationQualifier")
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Get suffix failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
'
|
||
|
' Email addresses: loop through the list.
|
||
|
'
|
||
|
|
||
|
document.forms(0).description.value = DsObj.Get("description")
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Get description failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
end sub
|
||
|
|
||
|
'------------------------------------------------------------------------------
|
||
|
'
|
||
|
' Subroutine: DoApply
|
||
|
'
|
||
|
' Synopsis: Set the DS object to the new control values.
|
||
|
'
|
||
|
'------------------------------------------------------------------------------
|
||
|
sub DoApply
|
||
|
on error resume next
|
||
|
|
||
|
DsObj.Put "userFullName", document.forms(0).fullname.value
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Put fullname failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
DsObj.Put "givenName", document.forms(0).firstname.value
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Put firstname failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
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.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
DsObj.Put "personalTitle", document.forms(0).prefix.value
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Put prefix failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
DsObj.Put "generationQualifier", document.forms(0).suffix.value
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Put suffix failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
'
|
||
|
' Email addresses: loop through the list.
|
||
|
'
|
||
|
|
||
|
DsObj.Put "description", document.forms(0).description.value
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Put description failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
err.clear
|
||
|
end if
|
||
|
|
||
|
DsObj.SetInfo
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("SetInfo failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
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;">Full Name:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=fullname>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:2.7em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">First Name:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=firstname>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:5em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Last Name:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=lastname>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:7.3em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Name Prefix:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=prefix>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:9.6em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Name Suffix:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=suffix>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:11.9em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Email Addresses*:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=emailname>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:14.2em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Description:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=description>
|
||
|
</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).firstname.value
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Put firstname failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
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.desctiption)
|
||
|
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.desctiption)
|
||
|
end if
|
||
|
|
||
|
DsObj.SetInfo
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("SetInfo failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
end if
|
||
|
end sub
|
||
|
sub Filler1
|
||
|
on error resume next
|
||
|
|
||
|
DsObj.Put "givenName", document.forms(0).firstname.value
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Put firstname failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
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.desctiption)
|
||
|
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.desctiption)
|
||
|
end if
|
||
|
|
||
|
DsObj.SetInfo
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("SetInfo failed with error " & hex(err.number) & " " &_
|
||
|
err.desctiption)
|
||
|
end if
|
||
|
end sub
|
||
|
|
||
|
</SCRIPT>
|
||
|
|
||
|
</BODY>
|
||
|
</HTML>
|