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.

117 lines
2.9 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 Static Ip Page</TITLE>
  10. <%
  11. Dim strStatus
  12. Dim strIp
  13. Dim strMask
  14. Dim strGateway
  15. Dim objSaHelper
  16. Dim objLocMgr
  17. Dim varReplacementStrings
  18. Dim strIpAddressInvalidText
  19. Const IPADDRESS_ERROR_TEXT = "&H4002000A"
  20. On Error Resume Next
  21. Err.Clear
  22. Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
  23. If Err.number = 0 Then
  24. strIpAddressInvalidText = objLocMgr.GetString("salocaluimsg.dll",IPADDRESS_ERROR_TEXT,varReplacementStrings)
  25. Set objLocMgr = Nothing
  26. End If
  27. If strIpAddressInvalidText = "" Then
  28. strIpAddressInvalidText = "IP address entered is invalid."
  29. End If
  30. Err.Clear
  31. strIp = Request.QueryString("Ip")
  32. strMask = Request.QueryString("Mask")
  33. strGateway = Request.QueryString("Gateway")
  34. If strIp = "" or strMask = "" Then
  35. strStatus = strIpAddressInvalidText
  36. Else
  37. Set objSaHelper = Server.CreateObject("ServerAppliance.SAHelper")
  38. On Error Resume Next
  39. objSaHelper.SetStaticIp strIp,strMask,strGateway
  40. If Err.Number <> 0 Then
  41. Session("Static_CurrentIp") = strIp
  42. Session("Static_CurrentMask") = strMask
  43. Session("Static_CurrentGateway") = strGateway
  44. strStatus = strIpAddressInvalidText
  45. Else
  46. Response.Redirect "localui_network.asp"
  47. End If
  48. Set objSaHelper = Nothing
  49. End If
  50. %>
  51. <SCRIPT LANGUAGE="VBScript">
  52. <!--
  53. Option Explicit
  54. public iIdleTimeOut
  55. Sub window_onload()
  56. Dim objKeypad
  57. Set objKeypad = CreateObject("Ldm.SAKeypadController")
  58. objKeypad.Setkey 0,0,FALSE
  59. objKeypad.Setkey 1,0,FALSE
  60. objKeypad.Setkey 2,0,FALSE
  61. objKeypad.Setkey 3,0,FALSE
  62. objKeypad.Setkey 4,27,FALSE
  63. objKeypad.Setkey 5,13,FALSE
  64. Set objKeypad = Nothing
  65. iIdleTimeOut = window.SetTimeOut("IdleHandler()",300000)
  66. End Sub
  67. Sub keydown()
  68. window.clearTimeOut(iIdleTimeOut)
  69. iIdleTimeOut = window.SetTimeOut("IdleHandler()",300000)
  70. If window.event.keycode = 13 or window.event.keycode = 27 Then
  71. window.navigate "localui_static.asp"
  72. End If
  73. End Sub
  74. Sub IdleHandler()
  75. window.navigate "localui_main.asp"
  76. End Sub
  77. -->
  78. </SCRIPT>
  79. </HEAD>
  80. <body RIGHTMARGIN=0 LEFTMARGIN=0 onkeydown="keydown">
  81. <A STYLE="position:absolute; top:0; left:0; font-size:10; font-family=arial;" onkeydown="keydown">
  82. <%=strStatus%>
  83. </A>
  84. </body>
  85. </html>