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.

45 lines
1.2 KiB

  1. // These are used frequently in the links on userpage.htm
  2. var _bRunningAsOwner;
  3. var _bRunningAsAdmin;
  4. var _bUserHasPassword;
  5. var _bUserIsAdmin;
  6. var _bUserIsGuest;
  7. var _bUserIsOwner;
  8. function PageInit()
  9. {
  10. var bSelf = window.external.isSelf;
  11. _bRunningAsOwner = window.external.runningAsOwner;
  12. _bRunningAsAdmin = window.external.runningAsAdmin;
  13. _bUserHasPassword = window.external.passwordRequired;
  14. _bUserIsAdmin = window.external.isAdmin;
  15. _bUserIsGuest = window.external.isGuest;
  16. _bUserIsOwner = window.external.isOwner;
  17. // Set the title
  18. var szTitle = bSelf ? idPageTitle.innerHTML
  19. : (_bUserIsGuest ? idGuestPageTitle.innerHTML : idAltPageTitle.innerHTML);
  20. idPageTitle.innerHTML = szTitle.replace(/%1/g, window.external.userDisplayName);
  21. // Create a new user infomation display element
  22. idUser.innerHTML = window.external.createUserDisplayHTML();
  23. // Set the tasks
  24. var aTasks = idSelfTaskLinks;
  25. var cTasks = aTasks.length;
  26. if (!bSelf)
  27. {
  28. aTasks = idTaskLinks;
  29. cTasks = aTasks.length;
  30. }
  31. for (var i = 0; i < cTasks; i++)
  32. {
  33. if (eval(aTasks[i].expression))
  34. aTasks[i].style.display = 'block';
  35. }
  36. }