Предмет:
Тип роботи:
Реферат
К-сть сторінок:
31
Мова:
Українська
style="text-align: justify;">newUser. Invoke («Put», new object[] { «Description», recordbook. Text }) ;
newUser. Properties[«displayName»]. Value = studname. Text + « « + studsurname. Text;
newUser. Properties[«givenName»]. Value = studname. Text;
newUser. Properties[«sn»]. Value = studsurname. Text;
newUser. Properties[«mail»]. Value = email. Text;
//=======
newUser. CommitChanges () ;
//=======
newUser. Invoke («SetPassword», new object[] { pass. Text }) ;
newUser. Invoke («Put», new object[] { «userPrincipalName», recordbook. Text + «@asoiu. ntu-kpi. kiev. ua» }) ;
//=======
newUser. CommitChanges () ;
//=======
PrincipalContext ctx = new PrincipalContext (ContextType. Domain, «10. 18. 16. 13») ;
UserPrincipal principal = UserPrincipal. FindByIdentity (ctx, recordbook. Text) ;
principal. UserCannotChangePassword = true;
principal. Save () ;
//=======
newUser. Properties[«userAccountControl»]. Value = 0x10002;
newUser. CommitChanges () ;
dirEntry. Close () ;
newUser. Close () ;
MessageBox. Show («Registration was complete») ;
Додаткові значення “userAccountControl”:
UF_TEMP_DUPLICATE_ACCOUNT = 0x0100,
UF_NORMAL_ACCOUNT = 0x0200,
UF_INTERDOMAIN_TRUST_ACCOUNT = 0x0800,
UF_WORKSTATION_TRUST_ACCOUNT = 0x1000,
UF_SERVER_TRUST_ACCOUNT = 0x2000,
UF_DONT_EXPIRE_PASSWD = 0x10000,
UF_SCRIPT = 0x0001,
UF_ACCOUNTDISABLE = 0x0002,
UF_HOMEDIR_REQUIRED = 0x0008,
UF_LOCKOUT = 0x0010,
UF_PASSWD_NOTREQD = 0x0020,
UF_PASSWD_CANT_CHANGE = 0x0040,
UF_ACCOUNT_LOCKOUT = 0X0010,
UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED = 0X0080,
Код форми реєстрації:
function $ (str) { return document. querySelector (str) }
function hasClass (el, name) {
return new RegExp (' (\\s|^) '+name+' (\\s|$) '). test (el. className) ;
}
function addClass (el, name)
{
if (! hasClass (el, name)) { el. className += (el. className? ' ': '') +name; }
}
function removeClass (el, name)
{
if (hasClass (el, name)) {
el. className=el. className. replace (new RegExp (' (\\s|^) '+name+' (\\s|$) '), ' '). replace (/^\s+|\s+$/g, '') ;
}
}
function getXmlHttp () {
var xmlhttp;
try {
xmlhttp = new ActiveXObject («Msxml2. XMLHTTP») ;
} catch (e) {
try {
xmlhttp = new ActiveXObject («Microsoft. XMLHTTP») ;
} catch (E) {
xmlhttp = false;
}
}
if (! xmlhttp && typeof XMLHttpRequest! ='undefined') {
xmlhttp = new XMLHttpRequest () ;
}
return xmlhttp;
}
var Scroller = {
posX: 0,
posY: 0,
content: null,
sizeX: 0,
sizeY: 0,
w: 0,
h: 0,
updatePosition: function () {
with (this) {
content. style. left=-posX*w+'px';
content. style. top=-posY*h+'px';
}
},
left: function () {
with (this) {
posX -= 1;
posX = (posX<0)? 0: posX;
updatePosition ()
}
},
right: function () {
with (this) {
posX += 1;
posX = (posX>sizeX-1)? sizeX-1: posX;
updatePosition ()
}
},
up: function () {
with (this) {
posY -= 1;
posY = (posY<0)? 0: posY;
updatePosition ()
}
},
down: function () {
with (this) {
posY += 1;
posY = (posY>sizeY-1)? sizeY-1: posY;
updatePosition ()
}
},
moveto: function (x, y) {
with (this) {
posY = y
posY = (posY<0)? 0: posY
posY = (posY>sizeY-1)? sizeY-1: posY
posX = x
posX = (posX<0)? 0: posX
posX = (posX>sizeX-1)? sizeX-1: posX
updatePosition ()
}
},
init: function (x, y, sx, sy, width, height, contentSelector) {
with (this) {
posX = x;
posY = y;
sizeX = sx;
sizeY = sy;
content = document. querySelector (contentSelector) ;
content. style. position='relative'
w=width
h=height
}
return this;
}
}
var scroll = null;
function Registration () {
var scriptAddres = 'http: //localhost/index. php',
blocks = {},
selectors = {
'rules': '#rules',
'form': '#regBlock',
'formData': '#regFormData',
'langPanel': '#langPanel',
'confirm': '#confirm',
'nextBtn': '#nextBtn',
'canselBtn': '#CancelBtn',
'wait': '#wait',
'supportBtn': '#support',
'supportBlock': '#supportBlock',
'stepBar': '#stepBar',
'procWaiter': '#waiter',
'procError': '#error',
'procSuccess': '#success',
'support': '#supportBlock',
'backBtn': '#backBtn'
},
fieldSelectors = {
'name': '#Name',
'surname': '#SurName',
'group': '#Group',
'pass': '#Pass',
'pass2': '#CPass',
'mail': '#EMail'
},
fields = {},
warningCodes = {
'name': '',
'surname': '',
'group': '',
'pass': '',
'mail': ''
},
languageData = {
'ua': {
'name': 'Ім\'я',
'surname': 'Прізвище',
'group': 'Номер залікової книжки',
'pass': 'Пароль',
'pass2': 'Підтвердження паролю',
'mail': 'Електронна пошта',
'emptyName': 'Пусте поле ім\'я',
'emptySurName': 'Пусте поле прізвища',