<%

'*****************************************************************************
' Microsoft Content Management Server
'
' File: SDReportExportOptions.INC
'
' Purpose:
'   ASP server-side include file that generates the export options information 
'   section of an export report. This file is included by the main report file.
'
' GLOBAL DEPENDENCIES:
'	pReportXMLTag [in] - the root XML tag of the report XML.
'
'*****************************************************************************


	'*************************************************************************
	' CONSTANTS
	'*************************************************************************

	' NOTE: These constant definitions must match the ordinal values 
	' for the enumerated type NR_EXPORT_RIGHTS_GROUPS defined in the 
	' the AEInterfaces.DLL
	const lNR_EXPORT_RIGHTS_GROUPS_NONE = 0
	const lNR_EXPORT_RIGHTS_GROUPS_INCLUDE_WITHOUT_USERS = 2
	const lNR_EXPORT_RIGHTS_GROUPS_INCLUDE_WITH_USERS = 4


	' constants used in the report to indicate whether various attributes
	' of the source system are/will be exported or not.
	const strEXPORTED = "Exported"
	const strNOT_EXPORTED = "NOT Exported"
	
	
	'*************************************************************************
	' Description:
	'	Gets the flag from the XML that indicates whether ownership 
	'	information was exported or not.
	'
	' Returns:
	'	A string indicating the state of ownership information in the XML
	'*************************************************************************
	function getCreatedByInformation
	
		dim strCreatedByInformation
		
		' pull the ownership boolean out of the XML and map it to a string
		' representation
		if pReportXMLTag.ExportOptions.Security.CreatedBy = 2 then
			strCreatedByInformation = strEXPORTED
		else
			strCreatedByInformation = strNOT_EXPORTED
		end if
		
		getCreatedByInformation = strCreatedByInformation
	
	end function  'getCreatedByInformation


	'*************************************************************************
	' Description:
	'	Gets the flag from the XML that indicates whether user rights groups 
	'	information was exported or not.
	'
	' Returns:
	'	A string indicating the state of user rights group info in the XML
	'*************************************************************************
	function getUserRightsGroupInformation
		
		dim strURGInformation
		dim lRightsGroupsEnum
		lRightsGroupsEnum = pReportXMLTag.ExportOptions.Security.RightsGroups
		
		' there are two possible values of the RightsGroup enumeration that
		' indicate that rights group information was exported - make sure that
		' both values are tested
		if ( ( lRightsGroupsEnum and lNR_EXPORT_RIGHTS_GROUPS_INCLUDE_WITHOUT_USERS ) = lNR_EXPORT_RIGHTS_GROUPS_INCLUDE_WITHOUT_USERS ) or _
		   ( ( lRightsGroupsEnum and lNR_EXPORT_RIGHTS_GROUPS_INCLUDE_WITH_USERS ) = lNR_EXPORT_RIGHTS_GROUPS_INCLUDE_WITH_USERS ) then
			strURGInformation = strEXPORTED
		else
			strURGInformation = strNOT_EXPORTED
		end if
		
		getUserRightsGroupInformation = strURGInformation
	
	end function  'getUserRightsGroupInformation


	'*************************************************************************
	' Description:
	'	Gets the flag from the XML that indicates whether users were
	'	exported or not.
	'
	' Returns:
	'	A string indicating the state of user info in the XML
	'*************************************************************************
	function getUserInformation
		
		dim strUserInformation
		dim lRightsGroupsEnum
		lRightsGroupsEnum = pReportXMLTag.ExportOptions.Security.RightsGroups
		
		' there is one value of the RightsGroup enumeration that indicates that 
		' users information was exported - make sure that value is tested
		if ( ( lRightsGroupsEnum and lNR_EXPORT_RIGHTS_GROUPS_INCLUDE_WITH_USERS ) = lNR_EXPORT_RIGHTS_GROUPS_INCLUDE_WITH_USERS ) then
			strUserInformation = strEXPORTED
		else
			strUserInformation = strNOT_EXPORTED
		end if
		
		getUserInformation = strUserInformation
	
	end function  'getUserInformation


%>

<H4 Class="Heading4"> General</H4>

<BLOCKQUOTE style="MARGIN-RIGHT: 0px">

<H5>Security Parameters:</H>

<P>
    <TABLE CLASS="OptionsTable" >
	      
      <TR>
        <TD>User Rights Groups:</TD>
        <TD> <%= getUserRightsGroupInformation %> </TD>
      </TR>
	
      <TR>
        <TD>Users:</TD>
        <TD> <%= getUserInformation %> </TD>
      </TR>

      <TR>
        <TD>CreatedBy Specifier:</TD>
        <TD> <%= getCreatedByInformation %> </TD>
      </TR>
	      
    </TABLE>
	    
</P>
	        
</BLOCKQUOTE>
        
