<!--#include virtual="/NR/System/WBC/Internals/Main/WBCApp.inc"-->
<!-- #include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/MLSDisplayConfig/ResourceBrowserConfig.inc" -->
<!--#include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/UIStringConstants/ResMgntUIStrings.inc" -->
<!--#include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Management/InternalProgrammingConstants.inc" -->


<!--#include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Common/ResourceBrowserCommon.inc"-->
<!--#include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Management/ResourcePropertiesShowHelper.inc"-->

<%
' ********************************************************************
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
'	IMPORTANT.  Please read the legal.txt file, located in the
'	"<CMS Install Directory>\Server\httpexec\WBC\Internals"
'	directory, governing the use of this internal file."
' ********************************************************************

' ********************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/
'			Management/ResourceProperties/
'			CNCASPPageManager_ResourceReplace.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Encapsulate the ASP logic associated with ResourceProperties.asp
'
' Implements the INCASPPageManager interface:
'	- Sub InitManager()
'	- Property Error
'
' Exposes the following methods/properties:
'	- Property ASPUtilsObject
'	- Property CodePage
'	- Property Charset
'	- Property Resource
'	- Property URLFormPostAction
' ********************************************************************

Class CNCASPPageManager_ResourceReplace

	' -- MLS info
	Public ASPUtilsObject
	Public CodePage
	Public Charset

	' -- objects needed in the ASP page
	Public Resource
	Public URLFormPostAction
	Public Error

	Private m_strResourceGUID

	' ---- [Private] Standard Class_Initialize
	Private Sub Class_Initialize()
		Set ASPUtilsObject = Nothing
		Set Resource = Nothing
		URLFormPostAction = "#"
		Error = ""
	End Sub

	' ---- [Public] InitManager will take care of all programming logic in the ASP page
	Public Sub InitManager()
		' -- set up Gallery context and its associated MLS info
		Call SetupBrowseContext()
		If (Resource Is Nothing) Then
			Error = IDS_ERR_RESOURCE_NOT_FOUND
			Exit Sub
		End If
		Call SetupMLSInfo()

		' -- Set up URL needed for links in the ASP page
		Call SetupLinksURL()
	End Sub

	' ---- [Private] Sets up the browsing context (Resource)
	Private Sub SetupBrowseContext()
		m_strResourceGUID = GetGuidFromQueryString(IDS_QPARAM_RESOURCE)
		Set Resource = AutoSession.Searches.GetByGUID(m_strResourceGUID)
	End Sub

	' ---- [Private] Set up the MLS info this ASP page will be running under
	Private Sub SetupMLSInfo()
		Set ASPUtilsObject = GetInitializedASPUtils()
		CodePage = GetCodePageForResource( Resource.Parent, ASPUtilsObject )
		Charset = GetCharacterSetForResource( Resource.Parent )
	End Sub

	' ---- [Private] Set up URL needed for links in the ASP page
	Private Sub SetupLinksURL()

		URLFormPostAction = "ResourceReplaceAcceptor.asp?" & "NRMODE=UPDATE&" & _
								IDS_QPARAM_RESOURCE & "=" & m_strResourceGUID

	End Sub


End Class

%>