/// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
/// ' Microsoft Content Management Server - Sample Code 
/// '
/// ' This sample code is provided "AS IS" with no warranties, and confers no rights. 
/// ' You assume all risk for your use. (c) 2001 Microsoft Corporation. All rights reserved.
/// '
/// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

using System;
using System.Web;
//Add reference for localization
using System.EnterpriseServices;
using System.Globalization;
using System.Resources;
using System.Threading;
//Add reference for navigation tree control
using Microsoft.Web.UI.WebControls;
//Add reference to the CMS API
using Microsoft.ContentManagement.Publishing;
using Microsoft.ContentManagement.Web.Caching;
//Add reference to the Mcms control library
using McmsWebControlLibrary;

namespace WoodgroveNet.Templates
{
	/// <summary>
	/// Summary description for Intranet_Product.
	/// </summary>
	public class LegalDisclaimer : System.Web.UI.Page
	{
		#region CMS Placeholders
		protected Microsoft.ContentManagement.WebControls.HtmlPlaceholderControl HtmlPlaceholder1;		
		protected Microsoft.ContentManagement.WebControls.SingleImagePlaceholderControl Singleimageplaceholdercontrol2;
		#endregion CMS Placeholders

		protected McmsWebControlLibrary.McmsNavigationControl McmsNavigationControlLegalDisclaimer;
		protected McmsWebControlLibrary.McmsBreadcrumbControl McmsBreadcrumbControlLegalDisclaimer;

		protected System.Web.UI.WebControls.Literal LTLegalDisclaimerCurrentUser;
		protected System.Web.UI.WebControls.Literal LTLegalDisclaimerUser;
		
		//Resource Manager for localization
		protected ResourceManager LocalizationResourceManager;
		
		private void Page_Load(object sender, System.EventArgs e)
		{
			//This function implements the ValidationCallback mechanism
			CmsHttpCachePolicy.Current.AddValidationCallbackAllCmsContent();

			// If you want to display the username on the browser, uncomment this piece of code.
			/*
			if (CmsHttpContext.Current.IsLoggedInAsGuest)
			{
				LTLegalDisclaimerUser.Text = LocalizationResourceManager.GetString("Guest");				
						
			}
			else
			{							
							
				LTLegalDisclaimerUser.Text = Server.HtmlEncode(Microsoft.ContentManagement.Publishing.CmsHttpContext.Current.User.ClientAccountName);
							
			}
			
			LTLegalDisclaimerCurrentUser.Text = LocalizationResourceManager.GetString("CurrentUser");
			*/
			
			//Code for Tracing Functionality
			string TracingSeperator = " :: ";
			// Write a line to the Listener
			System.Diagnostics.Trace.WriteLine(System.DateTime.Now + TracingSeperator + "Template" + TracingSeperator + "LegalDisclaimer" + TracingSeperator + "This is the Page Load for the LegalDisclaimer Template.");
			// Record your output
			System.Diagnostics.Trace.Flush();
			//End of Code for Tracing Functionality
			
		}
		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
			LocalizationResourceManager = (ResourceManager) Application["WoodgroveNetResourceManager"];
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}
