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.

139 lines
3.7 KiB

  1. <%@ LANGUAGE="VBSCRIPT"%>
  2. <%Response.Expires = 0%>
  3. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HEAD>
  4. <META HTTP-EQUIV="Content-Type"
  5. CONTENT="text/html; CHARSET=iso-8859-1">
  6. <META NAME="GENERATOR"
  7. CONTENT="Microsoft Frontpage 2.0">
  8. <HEAD>
  9. <TITLE>Reboot Confirmation Page</TITLE>
  10. <%
  11. Dim strStatus
  12. Dim strHostName
  13. Dim objSaHelper
  14. Dim bDuplicate
  15. Dim strContinue
  16. Dim objLocMgr
  17. Dim varReplacementStrings
  18. Dim strDuplicateErrorText
  19. Dim strUnknownErrorText
  20. Dim strConfirmRebootText
  21. Const DUPLICATE_ERROR_TEXT = "&H40020002"
  22. Const UNKNOWN_ERROR_TEXT = "&H40020004"
  23. Const CONFIRM_REBOOT_TEXT = "&H40020003"
  24. On Error Resume Next
  25. Err.Clear
  26. Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
  27. If Err.number = 0 Then
  28. strDuplicateErrorText = objLocMgr.GetString("salocaluimsg.dll",DUPLICATE_ERROR_TEXT,varReplacementStrings)
  29. strUnknownErrorText = objLocMgr.GetString("salocaluimsg.dll",UNKNOWN_ERROR_TEXT,varReplacementStrings)
  30. strConfirmRebootText = objLocMgr.GetString("salocaluimsg.dll",CONFIRM_REBOOT_TEXT,varReplacementStrings)
  31. Set objLocMgr = Nothing
  32. End If
  33. If strDuplicateErrorText = "" Then
  34. strDuplicateErrorText = "Host name entered is duplicate with another machine."
  35. End If
  36. If strUnknownErrorText = "" Then
  37. strUnknownErrorText = "Encountered problem in setting host name. The change has been canceled."
  38. End If
  39. If strConfirmRebootText = "" Then
  40. strConfirmRebootText = "Changing host name requires reboot. Do you want to continue?"
  41. End If
  42. Err.Clear
  43. strHostName = Request.QueryString("HostName")
  44. If strHostName <> "" Then
  45. Session("Hostname_Hostname") = strHostName
  46. End If
  47. Set objSaHelper = Server.CreateObject("ServerAppliance.SAHelper")
  48. bDuplicate = objSaHelper.IsDuplicateMachineName(strHostName)
  49. If bDuplicate = true Then
  50. strStatus = strDuplicateErrorText
  51. Else
  52. strStatus = strConfirmRebootText
  53. strContinue = "Continue"
  54. End If
  55. Set objSaHelper = Nothing
  56. %>
  57. <SCRIPT LANGUAGE="VBScript">
  58. <!--
  59. Option Explicit
  60. public iIdleTimeOut
  61. Sub window_onload()
  62. Dim objKeypad
  63. Set objKeypad = CreateObject("Ldm.SAKeypadController")
  64. objKeypad.Setkey 0,0,FALSE
  65. objKeypad.Setkey 1,0,FALSE
  66. objKeypad.Setkey 2,0,FALSE
  67. objKeypad.Setkey 3,0,FALSE
  68. objKeypad.Setkey 4,27,FALSE
  69. objKeypad.Setkey 5,13,FALSE
  70. Set objKeypad = Nothing
  71. iIdleTimeOut = window.SetTimeOut("IdleHandler()",300000)
  72. End Sub
  73. Sub keydown()
  74. If "<%=strContinue%>" <> "Continue" Then
  75. If window.event.keycode = 13 or window.event.keycode = 27 Then
  76. window.navigate "localui_hostname.asp"
  77. End If
  78. Else
  79. If window.event.keycode = 13 Then
  80. window.navigate "localui_sethostname.asp"
  81. End If
  82. If window.event.keycode = 27 Then
  83. window.navigate "localui_tasks.asp"
  84. End If
  85. End If
  86. window.clearTimeOut(iIdleTimeOut)
  87. iIdleTimeOut = window.SetTimeOut("IdleHandler()",300000)
  88. End Sub
  89. Sub IdleHandler()
  90. window.navigate "localui_main.asp"
  91. End Sub
  92. -->
  93. </SCRIPT>
  94. <HEAD>
  95. <body RIGHTMARGIN=0 LEFTMARGIN=0 OnKeyDown="keydown()">
  96. <A STYLE="position:absolute; top:0; left:0; font-size:10; font-family=arial;" OnKeyDown="keydown()">
  97. <%=strStatus%>
  98. </A>
  99. </body>
  100. </html>