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.

102 lines
2.4 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>Set Dynamic Ip Page</TITLE>
  10. <%
  11. Dim strStatus
  12. Dim objSaHelper
  13. Dim objLocMgr
  14. Dim varReplacementStrings
  15. Dim strAutoIpErrorText
  16. Const AUTOIP_ERROR_TEXT = "&H40020007"
  17. On Error Resume Next
  18. Err.Clear
  19. Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
  20. If Err.number = 0 Then
  21. strAutoIpErrorText = objLocMgr.GetString("salocaluimsg.dll",AUTOIP_ERROR_TEXT,varReplacementStrings)
  22. Set objLocMgr = Nothing
  23. End If
  24. If strAutoIpErrorText = "" Then
  25. strAutoIpErrorText = "Encountered problem in confinguring network. The change has been canceled."
  26. End If
  27. Err.Clear
  28. Set objSaHelper = Server.CreateObject("ServerAppliance.SAHelper")
  29. objSaHelper.SetDynamicIp
  30. if Err.Number <> 0 then
  31. strStatus = strAutoIpErrorText
  32. else
  33. Response.Redirect "localui_network.asp"
  34. end if
  35. Set objSaHelper = Nothing
  36. %>
  37. <SCRIPT LANGUAGE="VBScript">
  38. <!--
  39. Option Explicit
  40. public iIdleTimeOut
  41. Sub window_onload()
  42. Dim objKeypad
  43. Set objKeypad = CreateObject("Ldm.SAKeypadController")
  44. objKeypad.Setkey 0,0,FALSE
  45. objKeypad.Setkey 1,0,FALSE
  46. objKeypad.Setkey 2,0,FALSE
  47. objKeypad.Setkey 3,0,FALSE
  48. objKeypad.Setkey 4,27,FALSE
  49. objKeypad.Setkey 5,13,FALSE
  50. Set objKeypad = Nothing
  51. iIdleTimeOut = window.SetTimeOut("IdleHandler()",300000)
  52. End Sub
  53. Sub keydown()
  54. window.clearTimeOut(iIdleTimeOut)
  55. iIdleTimeOut = window.SetTimeOut("IdleHandler()",300000)
  56. If window.event.keycode = 13 or window.event.keycode = 27 Then
  57. window.navigate "localui_network.asp"
  58. End If
  59. End Sub
  60. Sub IdleHandler()
  61. window.navigate "localui_main.asp"
  62. End Sub
  63. -->
  64. </SCRIPT>
  65. </HEAD>
  66. <body RIGHTMARGIN=0 LEFTMARGIN=0 onkeydown="keydown">
  67. <A STYLE="position:absolute; top:0; left:0; font-size:10; font-family=arial;" onkeydown="keydown">
  68. <%=strStatus%>
  69. </A>
  70. </body>
  71. </html>