<!--#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/ResourceDelete/CNCASPPageManager_ResourceCreate.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Encapsulate the ASP logic associated with ResourceDelete.asp
'
' Implements the INCASPPageManager interface:
'	- Sub InitManager()
'	- Property Error
'
' Exposes the following methods/properties:
' 	- Property ASPUtils
'	- Property CodePage
'	- Property Charset
'	- Property ResourceGallery
'	- Property URLFormPostAction
' ********************************************************************

Class CNCASPPageManager_ResourceCreate

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

	Private m_strGalleryGUID

	' -- Property that exposes the ASP utility object for the page
	Private m_pASPUtils
		
	' -- Property that exposes the CodePage for the page
	Private m_strCodePage
	
	' -- Property that exposes the Charset for the page
	Private m_strCharset
	
	' ---- [Private] Class standard initialization routine
	Private Sub Class_Initialize()
		Set m_pASPUtils = Nothing
		Set ResourceGallery = Nothing
		m_strCodePage = ""
		m_strCharset = ""
		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 (ResourceGallery Is Nothing) Then
			Error = IDS_ERR_GALLERY_NOT_FOUND
			Exit Sub
		End If
		Call SetupMLSInfo()

		' -- Set up URL needed for links in the ASP page
		Call SetupLinksURL()
	End Sub
	
	' --- Property that exposes the ASP Utility object for the page
	Public Property Get ASPUtils()
		Set ASPUtils = m_pASPUtils
	End Property

	' --- Property that exposes the codepage for the page
	Public Property Get CodePage()
		CodePage = m_strCodePage
	End Property

	' --- Property that exposes the charset for the page
	Public Property Get CharSet()
		CharSet = m_strCharSet
	End Property

	' ---- [Private] Sets up the browsing context (Gallery)
	Private Sub SetupBrowseContext()
		m_strGalleryGUID = GetGuidFromQueryString( IDS_QPARAM_GALLERY )
		Set ResourceGallery = AutoSession.Searches.GetByGUID(m_strGalleryGUID)
	End Sub

	' ---- [Private] Set up the MLS info this ASP page will be running under
	Private Sub SetupMLSInfo()
		Set m_pASPUtils = GetInitializedASPUtils()	
		m_strCodePage = GetCodePageForResource( ResourceGallery, m_pASPUTils )
		m_strCharSet = GetCharacterSetForResource( ResourceGallery )
	End Sub

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

		URLFormPostAction = "ResourceCreateAcceptor.asp?" & "NRMODE=Update&" & _
								IDS_QPARAM_GALLERY & "=" & m_strGalleryGUID

	End Sub


End Class

%>