Leaked source code of windows server 2003
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.

61 lines
1.6 KiB

  1. function PageInit()
  2. {
  3. var oUser = top.window.g_oSelectedUser;
  4. top.window.PopulateLeftPane(null, idLearnAboutContent.innerHTML);
  5. var szTitle = top.window.IsSelf() ? idPageTitle.innerHTML : idAltPageTitle.innerHTML;
  6. idPageTitle.innerHTML = szTitle.replace(/%1/g, top.window.GetUserDisplayName(oUser));
  7. // ILogonUser account types are
  8. // 0 == Guest
  9. // 1 == Limited
  10. // 2 == Standard (deprecated)
  11. // 3 == Owner
  12. var iAccountType = oUser.setting("AccountType");
  13. // convert iAccountType to index into idRadioGroup
  14. switch (iAccountType)
  15. {
  16. case 0:
  17. case 2:
  18. default:
  19. iAccountType = -1;
  20. break;
  21. case 1:
  22. // nothing
  23. break;
  24. case 3:
  25. iAccountType = 0;
  26. break;
  27. }
  28. // If the selected account is the only owner (other than the
  29. // Administrator account), then don't allow the type to change.
  30. if (iAccountType == 0 && top.window.CountOwners() < 2)
  31. {
  32. idLimited.disabled = true;
  33. idCantChange.style.display = 'block';
  34. idOK.disabled = 'true';
  35. }
  36. AttachAccountTypeEvents(iAccountType);
  37. var aRadioButtons = idRadioGroup.children;
  38. if (iAccountType >= 0 && iAccountType <= aRadioButtons.length)
  39. {
  40. var selection = aRadioButtons[iAccountType].firstChild;
  41. selection.click();
  42. selection.focus();
  43. }
  44. else
  45. aRadioButtons[0].firstChild.focus();
  46. }
  47. function ApplyNewAccountType()
  48. {
  49. SetAccountType(top.window.g_oSelectedUser);
  50. top.window.g_Navigator.navigate("mainpage.htm", true);
  51. }