302 lines
9.2 KiB
HTML
302 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">
|
||
|
<style>
|
||
|
<!--
|
||
|
body, input {font-size: 9pt; font-family: "MS Sans Serif, sans-serif"}
|
||
|
-->
|
||
|
</style>
|
||
|
</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) and (err.number <> &h8000500D) then
|
||
|
alert("Get fullname 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
|
||
|
|
||
|
'DsObj.Put "userFullName", (document.forms(0).fullname.value)
|
||
|
|
||
|
if err.number <> 0 then
|
||
|
alert("Put fullname failed with error " & hex(err.number) & " " &_
|
||
|
err.description)
|
||
|
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.description)
|
||
|
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.description)
|
||
|
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.description)
|
||
|
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.description)
|
||
|
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.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>
|
||
|
|
||
|
<div style="position:absolute; top:0.4em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Account Expires:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=expires>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:2.7em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Account Disable:</div>
|
||
|
<INPUT TYPE=radio class=PageInput value="Yes" style="position:absolute; top:0.4em; left:10em;" name=disable>
|
||
|
<div style="position:absolute; top:0.3em; left:11.5em;">Yes</div>
|
||
|
<INPUT TYPE=radio class=PageInput value="No" style="position:absolute; top:0.4em; left:15em;" name=disable>
|
||
|
<div style="position:absolute; top:0.3em; left:16.5em;">No</div>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:5em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Bad Password Attemps:</div>
|
||
|
<div style="position:absolute; top:0.3em; left:10em; height:1.6em; width:15em;">
|
||
|
<span id=BadPwAttempt>0</span></div>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:7.3em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Home Directory:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=HomeDir>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:9.6em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Home Drive:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=HomeDrive>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:11.9em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Login Script:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=LoginScript>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:14.2em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Logon Workstation:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=LogonWksta>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:16.5em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Storage Max Bytes:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=MaxBytes>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:18.8em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Locale ID:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=LocaleID>
|
||
|
</div>
|
||
|
|
||
|
<div style="position:absolute; top:21.1em; left:0.3em; height:2em; width:29em;">
|
||
|
<div style="position:absolute; top:0.3em; left:0em;">Preferred OU:</div>
|
||
|
<INPUT TYPE=text class=PageInput value="" style="position:absolute; top:0.2em; left:9em; height:1.6em; width:15em;" name=PreferOU>
|
||
|
</div>
|
||
|
|
||
|
</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.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
|
||
|
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.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>
|