<%@ Language=VBScript %> <% Option Explicit %> <% '================================================== ' Terminal Services Web Client ' ' Copyright (c) Microsoft Corporation. All rights reserved. ' '================================================== %> <% Function GetPathToHost() GetPathToHost = m_VirtualRoot End Function Function GetUserName() Dim domainAndUser Dim loginUser Dim user loginUser = Request.ServerVariables("LOGON_USER") domainAndUser = Split(loginUser, "\") If IsArray(domainAndUser) Then GetUserName = domainAndUser(UBound(domainAndUser)) Else GetUserName = loginUser End If End Function %> <% Dim WinNTSysInfo 'Getting object Dim strComputerName(1) 'Computer name DIM L_PAGETITLE_TEXT DIM L_WINCLIENT_ERROR L_WINCLIENT_ERROR = GetLocString("tserver.dll", "40420005", "") Set WinNTSysInfo = CreateObject("WinNTSystemInfo") strComputerName(0) = WinNTSysInfo.ComputerName L_PAGETITLE_TEXT = GetLocString("tserver.dll", "40420004", strComputerName ) Dim L_ERRMSG_TITLE Dim L_ERRMSG_PROMPT Dim L_TSERVER_LOADOCX_ERROR_MSG L_ERRMSG_TITLE = GetLocString("tserver.dll", "40420007", "") L_ERRMSG_PROMPT = GetLocString("tserver.dll", "40420006", strComputerName) L_TSERVER_LOADOCX_ERROR_MSG = GetLocString("tserver.dll", "40420008", "") ServePage %> <% Function ServeContent() %> <% If ( IsIE() AND InStr( Request.ServerVariables("HTTP_USER_AGENT"), "Windows")) Then %> <% End If %>
<% If ( IsIE() AND InStr( Request.ServerVariables("HTTP_USER_AGENT"), "Windows")) Then %> 1600 Then resWidth = 800 End If Response.Write("WIDTH="+CStr(resWidth)+" ") Dim resHeight resHeight = Request.QueryString("rH") If resHeight < 200 or resHeight > 1200 Then resHeight = 600 End If Response.Write("HEIGHT="+CStr(resHeight) + " " ) %> <% End If %>
<% End Function %> <% Sub ServePage %> <%=L_PAGETITLE_TEXT%> <% Call SA_EmitAdditionalStyleSheetReferences("") %> <% Dim bIsSupported bIsSupported = false ' ' The Terminal Server ActiveX control is only supported on Windows Clients ' running Internet Explorer. ' If IsIE() Then If InStr( Request.ServerVariables("HTTP_USER_AGENT"), "Windows") Then bIsSupported = true End If End If If ( bIsSupported ) Then ServeContent Else Response.Write("
") Response.Write("

"+Server.HTMLEncode(L_WINCLIENT_ERROR)+"

") Response.Write("
") End If %> <% End Sub %>