<%@ Language=VBScript %> <% '================================================== ' Microsoft Server Appliance ' ' Server Restarting Dialog ' ' Copyright (c) Microsoft Corporation. All rights reserved. '================================================== %> <% Option Explicit %> <% Const THREE_MINUTES = 180000 Const FIFTEEN_SECONDS = 15000 Dim strTitle Dim strMessage Dim strTitleID Dim strMsgID Dim strMessageDLL Dim dwInitialWaitTime Dim dwWaitTime Dim strOption Randomize() Dim g_sURLAdminPage Dim g_sURLTestImage Dim sURLBase Dim L_STATUS_TEXT L_STATUS_TEXT = GetLocString("sacoremsg.dll", "40200BC5", "") sURLBase = Request.QueryString("URLBase") If ( Len(sURLBase) > 0 ) Then g_sURLAdminPage = sURLBase + "default.asp" Call SA_MungeURL(g_sURLAdminPage, "R", CStr(Int(Rnd()*10000))) g_sURLTestImage = sURLBase + "images/arrow_green.gif" Call SA_MungeURL(g_sURLTestImage, "R", CStr(Int(Rnd()*10000))) Else g_sURLAdminPage = m_VirtualRoot + "default.asp" Call SA_MungeURL(g_sURLAdminPage, "R", CStr(Int(Rnd()*10000))) g_sURLTestImage = m_VirtualRoot + "images/arrow_green.gif" Call SA_MungeURL(g_sURLTestImage, "R", CStr(Int(Rnd()*10000))) End If Call SA_MungeURL(g_sURLAdminPage, SAI_FLD_PAGEKEY, SAI_GetPageKey()) strOption = Request.QueryString("Option") Select Case UCase(strOption) Case "SHUTDOWN" strTitle = GetLocString("sacoremsg.dll", "40200BEC", "") strMessage = GetLocString("sacoremsg.dll", "40200BED", "") Case "RESTART" strTitle = GetLocString("sacoremsg.dll", "40200BEA", "") strMessage = GetLocString("sacoremsg.dll", "40200BEB", "") Case "RESTARTING" strTitle = GetLocString("sacoremsg.dll", "40200BEA", "") strMessage = GetLocString("sacoremsg.dll", "40200BEB", "") Case Else Call SA_TraceErrorOut(SA_GetScriptFileName(), "Unrecognized restarting option: " + strOption) strTitle = GetLocString("sacoremsg.dll", "40200BEA", "") strMessage = GetLocString("sacoremsg.dll", "40200BEB", "") End Select strMessageDLL = Request.QueryString("Resrc") If ( Len(Trim(strMessageDLL)) > 0 ) Then strTitleID = Request.QueryString("Title") If ( Len(Trim(strTitleID)) > 0 ) Then strTitle = GetLocString(strMessageDLL, strTitleID, "") End If strMsgID = Request.QueryString("Msg") If ( Len(Trim(strMsgID)) > 0 ) Then strMessage = GetLocString(strMessageDLL, strMsgID, "") End If End If dwInitialWaitTime = 0 If ( Len(Trim(Request.QueryString("T1"))) > 0 ) Then dwInitialWaitTime = Int(Trim(Request.QueryString("T1"))) End If If ( dwInitialWaitTime <= 0 ) Then dwInitialWaitTime = GetDefaultInitialWaitTime() End If dwWaitTime = 0 If ( Len(Trim(Request.QueryString("T2"))) > 0 ) Then dwWaitTime = Int(Trim(Request.QueryString("T2"))) End If If ( dwWaitTime <= 0 ) Then dwWaitTime = GetDefaultRetryWaitTime() End If %> <%=Server.HTMLEncode(strTitle)%> <% Call SA_EmitAdditionalStyleSheetReferences("") %> <% Call ServeStatusBar(False, L_STATUS_TEXT&": "&strTitle, "StatusCritical") Call SA_ServeEmptyTabBar() %>
<% Call ServeStandardHeaderBar(strTitle, "images/critical_error.gif") %>
 
<%=Server.HTMLEncode(strMessage)%>
<% Private Function GetDefaultInitialWaitTime() on error resume next Dim oRegistry Set oRegistry = RegConnection() GetDefaultInitialWaitTime = GetRegkeyValue( objRegistry, _ "SOFTWARE\Microsoft\ServerAppliance\WebFramework",_ "RestartInitialDelay", CONST_DWORD) If ( GetDefaultInitialWaitTime <= 0 ) Then GetDefaultInitialWaitTime = THREE_MINUTES End If Set oRegistry = Nothing End Function Private Function GetDefaultRetryWaitTime() on error resume next Dim oRegistry Set oRegistry = RegConnection() GetDefaultRetryWaitTime = GetRegkeyValue( objRegistry, _ "SOFTWARE\Microsoft\ServerAppliance\WebFramework",_ "RestartRetryDelay", CONST_DWORD) If ( GetDefaultRetryWaitTime <= 0 ) Then GetDefaultRetryWaitTime = FIFTEEN_SECONDS End If Set oRegistry = Nothing End Function %>