<!--#include virtual="NRConfig/LicenseConfig/CNCASPPageManager_LicenseConfig.inc"-->
<%
' ********************************************************************
' Copyright (C) 2001 Microsoft Corporation.  All rights reserved.
'
'	IMPORTANT.  Please read the legal.txt file, located in the
'	"<MCMS Install Directory>\Server\httpexec\WBC\Internals"
'	directory, governing the use of this internal file."
' ********************************************************************

' ********************************************************************
' File:		/SCA/ConfigLicense/CNCTabRenderer_SCALicenseConfig.inc		
'
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Responsible for Creat a license tab head and content of license tab
'
' Public Methods and Properties Exposed:
'	- Sub RenderActiveHead()
'	- Sub RenderInactiveHead()
'	- Sub RenderContent()
'	
' ********************************************************************

'Define CNCTabRenderer license class
Class CNCTabRenderer_SCALicense
 
    
    Private m_pASPPageManager	 
    Private m_pUIASPPageManager
    
    ' ---- [Private] Standard Class_Initialize
    
    Private Sub Class_Initialize()
		'-- init all member with value

		'-- Create an instance of CNCASPPageManager_LicenseConfig
		Set m_pASPPageManager = New CNCASPPageManager_LicenseConfig
		Call m_pASPPageManager.InitManager 	

		' -- Create am instance of CNCASPPageUI_LicenseConfig
		Set m_pUIASPPageManager = New CNCASPPageUI_LicenseConfig
		Call m_pUIASPPageManager.InitClass(m_pASPPageManager)	
		

    End Sub
    
    '*************************************************
    'Purpose: 	Render an active head in tab control 
    '         	(Using HTML) 
    'Input:		None
    '
    'Output:    Render an active tab head of user security property
    '************************************************* 
   
    Public Sub RenderTabActiveHead()
    %>
	<img border="0"  src="<%=IDS_ACTIVE_TAB_HEAD6_IMAGE_PATH%>" alt="<%=IDS_TAB_HEAD5_IMAGE_ALT_ON%>" width="<% = IDS_TAB_HEAD_IMAGE_WIDTH %>" height="<% = IDS_TAB_HEAD_IMAGE_HEIGHT %>">
    <%
    End Sub
	
    '*************************************************
    'Purpose: 	Render an inactive head in tab control 
    '         	(Using HTML) 
    'Input:		None
    '
    'Output:    Render an inactive tab head of user security property
    '************************************************* 
    
    Public Sub RenderTabInactiveHead()
    %>
    <img  name="licenseTabHead"  border="0" src="<%=IDS_INACTIVE_TAB_HEAD6_IMAGE_PATH%>"  width="<% = IDS_TAB_HEAD_IMAGE_WIDTH %>" alt="<%=IDS_TAB_HEAD6_IMAGE_ALT_OFF%>" height="<% = IDS_TAB_HEAD_IMAGE_HEIGHT %>" 
					onMouseOut="SCA_swapImgRestore()" onMouseOver="SCA_swapImage('licenseTabHead','','<%=IDS_INACTIVE_TAB_HEAD6_IMAGE_ON%>',0)" >

    <%
    End Sub

    '*************************************************
    'Purpose: 	Render tab content in tab control 
    '         	(Using HTML) 
    'Input:		None
    '
    'Output:    Render tab content of user security property
    '************************************************* 
    Public Sub RenderTabContent()
    %>
	<div id = "Security" class = "SCAStyleTabContent">
		<div id="SystemAccount" class="SCAStyleSysAccount">
			<table border = "0" width = "670" cellspacing="3" cellpadding="3">

				<tr>
					<td width= "140" class ="SCAStyleTitle"><b><%=IDS_UI_LICENSED_USER_NAME%></b> 
					</td>
					<td width="340" class="SCAStyleText">
						
						<%= Server.HTMLEncode(m_pUIASPPageManager.UserName)%>

					</td>
				</tr>
				
				<tr>
					<td class ="SCAStyleTitle"><b><%=IDS_UI_LICENSED_COMPANY_NAME%></b>
					</td>
					<td class="SCAStyleText">

						<%= Server.HTMLEncode(m_pUIASPPageManager.CompanyName) %>

					</td>
				</tr>

				<tr>	
					<td class ="SCAStyleTitle"><b><%=IDS_UI_LICENSED_PRODUCT_ID%></b>
					</td>
					<td class="SCAStyleText">

						<%= m_pUIASPPageManager.ProductKey%>

					</td>
				</tr>


				<tr>
					<td>&nbsp;
					</td>
					<td>&nbsp;
					</td>
				</tr>

				<tr>
					<td class ="SCAStyleTitle"><b><%=IDS_UI_LICENSED_TYPE%></b>
					</td>
					<td class="SCAStyleText">

						<%= m_pUIASPPageManager.ServerLicenseType %>

					</td>
				</tr>

	
<%			If m_pUIASPPageManager.ShowExpirationDate Then %>
				
				<tr>
					<td class ="SCAStyleTitle"><b><%=IDS_UI_LICENSED_EXPIRES%></b>
					</td>
					<td class="SCAStyleText">
					<%	
						If m_pUIASPPageManager.CorruptEvaluation Then 
							Response.Write(IDS_UI_LICENSE_INVALID_PERIOD)  
						Else
							Response.Write(FormatDateTime(m_pUIASPPageManager.ProductExpiryDate))
						End If 
					%>
					</td>
				</tr>
				
<%			End If %>

			</table>			
		</div>
	</div>
	<%
		'-- Get error message if any
		If m_pUIASPPageManager.Error <> IDS_OK_NO_ERROR Then
			 Call RenderMsgboxForTabControl(IDS_ERROR_MESSAGE_ID_LICENSE_TAB, _
											IDS_UI_WARNING_MESSAGE_TITLE_LICENSE_TAB, _
											m_pUIASPPageManager.Error, _
											m_pUIASPPageManager.ErrorDetails)
				
		End If
    End Sub
	
End Class
%>


