<!--#include virtual="/NR/System/WBC/Internals/Main/WBCApp.inc"-->

<!--#include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/UIStringConstants/AuthResourceUIStrings.inc" -->
<!--#include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Authoring/AuthResourceConstants.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/
'			Authoring/ImageProperties/CNCASPPageManager_ImagePropertiesOnly.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Encapsulate the ASP logic associated with ImagePropertiesOnlyBrowse.asp
'
' Implements the INCASPPageManager interface:
'	- Sub InitManager()
'
' Exposes the following properties:
'	- Property CurrentPosting
'	- Property PlaceholderName
'	- Property CanHyperlinks
' ********************************************************************

Class CNCASPPageManager_ImagePropertiesOnly
	' -- Object of the current Posting
	Public CurrentPosting

	' -- allow Hyperlink of the placeholder
	Public CanHyperlinks

	' -- Placeholder information
	Private m_strPlaceholderName

	' ---- [Private] Standard Class_Initialize
	Private Sub Class_Initialize()
		Set CurrentPosting = Nothing
		CanHyperlinks = False
		m_strPlaceholderName = ""
	End Sub

	' ---- [Public] InitManaer will take care of all programming logic in the ASP page
	Public Sub InitManager()
		' -- Set up information of the current placeholder
		Call SetupPlaceholderInfo()

		' -- Set up the current Posting object
		Call SetupCurrentPosting()

		' -- Set up the CanHyperLinks properties
		Call SetupCanHyperLinks

	End Sub

	' ---- [Public] get the placeholder name
	Public Property Get PlaceholderName()
		PlaceholderName = m_strPlaceholderName
	End Property

	' ---- [Private] Retrieve Placeholder name from Querystring in a XSS safe fashion
	Private Function GetPlaceholderName()
		On Error Resume Next
		Dim pPlaceholder

		Set pPlaceholder = AutoSession.ThisPosting.Placeholders( CStr(Request.QueryString(IDS_QPARAM_PHNAME)) )
		If (pPlaceholder Is Nothing) Then
			GetPlaceholderName = ""
		Else
			GetPlaceholderName = CStr(Request.QueryString(IDS_QPARAM_PHNAME))
		End If
	End Function
	
	' ---- [Private] Set up information of the current placeholder
	Private Sub SetupPlaceholderInfo()
		m_strPlaceholderName = GetPlaceholderName()
	End Sub

	' ---- [Private] Sets up the current Posting object
	Private Sub SetupCurrentPosting()
		Set CurrentPosting = AutoSession.ThisPosting
	End Sub

	' ---- [Private] Sets up the current Posting object
	Private Sub SetupCanHyperLinks()
		CanHyperLinks = CurrentPosting.Placeholders( m_strPlaceholderName ).AllowsHyperlinks
	End Sub

End Class

%>