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.

151 lines
4.0 KiB

  1. <%@ LANGUAGE="VBSCRIPT"%>
  2. <%Response.Expires = 0%>
  3. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
  4. <HTML>
  5. <META HTTP-EQUIV="Content-Type"
  6. CONTENT="text/html; CHARSET=iso-8859-1">
  7. <META NAME="GENERATOR"
  8. CONTENT="Microsoft Frontpage 2.0">
  9. <HEAD>
  10. <TITLE>static ip netry page</TITLE>
  11. <%
  12. Dim objSaHelper
  13. Dim objLocMgr
  14. Dim varReplacementStrings
  15. Dim strWaitText
  16. Const WAIT_TEXT = "&H40020012"
  17. On Error Resume Next
  18. Err.Clear
  19. Set objLocMgr = Server.CreateObject("ServerAppliance.LocalizationManager")
  20. If Err.number = 0 Then
  21. strWaitText = objLocMgr.GetString("salocaluimsg.dll",WAIT_TEXT,varReplacementStrings)
  22. Set objLocMgr = Nothing
  23. End If
  24. Err.Clear
  25. Set objSaHelper = Server.CreateObject("ServerAppliance.SAHelper")
  26. If Session("Static_CurrentIp") = "" Then
  27. Session("Static_CurrentIp") = objSaHelper.IpAddress
  28. End If
  29. If Session("Static_CurrentMask") = "" Then
  30. Session("Static_CurrentMask") = objSaHelper.SubnetMask
  31. End If
  32. If Session("Static_CurrentGateway") = "" Then
  33. Session("Static_CurrentGateway") = objSaHelper.DefaultGateway
  34. If Session("Static_CurrentGateway") = "" Then
  35. Session("Static_CurrentGateway") = "0.0.0.0"
  36. End If
  37. End If
  38. Set objSaHelper = Nothing
  39. 'Since we are in this page, static ip is selected
  40. Session("Network_FocusItem") = "1"
  41. %>
  42. <SCRIPT LANGUAGE="VBScript">
  43. <!--
  44. Option Explicit
  45. public iIdleTimeOut
  46. public iIpEnteredTimeOut
  47. Sub window_onload()
  48. Dim objKeypad
  49. Set objKeypad = CreateObject("Ldm.SAKeypadController")
  50. objKeypad.Setkey 0,38,FALSE
  51. objKeypad.Setkey 1,40,FALSE
  52. objKeypad.Setkey 2,37,FALSE
  53. objKeypad.Setkey 3,39,FALSE
  54. objKeypad.Setkey 4,27,FALSE
  55. objKeypad.Setkey 5,13,FALSE
  56. Set objKeypad = Nothing
  57. iIdleTimeOut = window.SetTimeOut("IdleHandler()",300000)
  58. if (IpAddress.value <> "") then
  59. StaticIpEntry.IpAddress = IpAddress.value
  60. end if
  61. if (SubnetMask.value <> "") then
  62. staticIpEntry.SubnetMask = SubnetMask.value
  63. end if
  64. if (Gateway.value <> "") then
  65. staticIpEntry.Gateway = Gateway.value
  66. end if
  67. StaticIpEntry.focus
  68. End Sub
  69. Sub StaticIpEntry_StaticIpEntered()
  70. waitText.style.display = ""
  71. StaticIpEntry.style.display ="none"
  72. IpAddress.value = StaticIpEntry.IpAddress
  73. SubnetMask.value = staticIpEntry.SubnetMask
  74. Gateway.value = staticIpEntry.Gateway
  75. iIpEnteredTimeOut = window.SetTimeOut("SetIpAddress()",500)
  76. End Sub
  77. Sub SetIpAddress()
  78. window.navigate "localui_setstatic.asp?Ip="+IpAddress.value+"&"+"Mask="+SubnetMask.value+"&"+"Gateway="+Gateway.value
  79. End Sub
  80. Sub StaticIpEntry_OperationCanceled()
  81. window.navigate "localui_network.asp"
  82. End Sub
  83. Sub StaticIpEntry_KeyPressed()
  84. window.clearTimeOut(iIdleTimeOut)
  85. iIdleTimeOut = window.SetTimeOut("IdleHandler()",300000)
  86. End Sub
  87. Sub IdleHandler()
  88. window.navigate "localui_main.asp"
  89. End Sub
  90. -->
  91. </SCRIPT>
  92. </HEAD>
  93. <BODY RIGHTMARGIN=0 LEFTMARGIN=0 onkeydown="keydown">
  94. <OBJECT STYLE="position:absolute; top:0; left=0;WIDTH=128; HEIGHT=64;" onkeydown="keydown"
  95. ID="StaticIpEntry" CLASSID="CLSID:D8A69FA0-25FE-4B9C-BBCE-81D6EBE2FDC0"></OBJECT>
  96. <A id="waitText" STYLE="position:absolute; top:0; left:0; font-size:10; font-family=arial; display=none;" >
  97. <%=strWaitText%>
  98. </A>
  99. <INPUT TYPE=HIDDEN Name="IpAddress" value="<%=Session("Static_CurrentIp")%>">
  100. <INPUT TYPE=HIDDEN Name="SubnetMask" value="<%=Session("Static_CurrentMask")%>">
  101. <INPUT TYPE=HIDDEN Name="Gateway" value="<%=Session("Static_CurrentGateway")%>">
  102. </BODY>
  103. </HTML>