<?php
/*
 *
 * sflog!
 * Copyright (C) 2005 Alberto Sfolcini <a.sfolcini@gmail.com>
 *
 * This file is a part of sflog!.
 *
 * sflog! is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * sflog! is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

// Turn off all error reporting
error_reporting (0);

/**
 * @title			: Sidebar
 * @description		: Manages sidebar    
 * @date			: 17-Oct-2005   
 * @author			: Alberto Sfolcini  <a.sfolcini@gmail.com>
 */
class Sidebar {
 
	var $displayBanner 		= true;
	var $displaySections	= true;
	var $displayCalendar	= true;
	var $displayPhotoBlogs	= true;
	var $displayLinks		= true;
	var $displayGoogle		= true;
	
	var $system;
	var $blog	= '';
	
	/**
	 * Constructor
	 * @param 	$blogID	string
	 * @param	$displaybanner		boolean
	 * @param	$displaySections	boolean
	 * @param 	$displayArchive		boolean	
	 * @param 	$displayPhotoBlogs	boolean
	 * @param	$displayLinks		boolean
	 * @param	$displayGoogle		boolean
	 */
	function Sidebar($blogID,$banner,$sections,$calendar,$photoblogs,$links,$google){
		$this->displayBanner 	= $banner;
		$this->displaySections	= $sections;
		$this->displayCalendar	= $calendar;
		$this->displayPhotoBlogs= $photoblogs;
		$this->displayLinks		= $links;
		$this->displayGoogle	= $google;

		$this->blog = dirname(__FILE__)."/../blogs/".$blogID."/";
		
		$this->init();
	}
	
	/**
	 * inits sidebar 
	 */
	function init(){
	
		/**
		 * Banner
		 */
	 	if ($this->displayBanner)
		 	include($this->blog."html/sidebar.banner.html.php");

		/**
		 * Sections
		 */
		if ($this->displaySections)
	 		include($this->blog."html/sidebar.sections.html.php");

		/**
		 * Calendar
		 */
	 	if ($this->displayCalendar)
		 	include($this->blog."html/sidebar.calendar.html.php");

		/**
		 * Photoblogs
		 */
		if ($this->displayPhotoBlogs)
		 	include($this->blog."html/sidebar.photoblogs.html.php");
	
		/**
		 * Links
		 */
	 	if ($this->displayLinks)
		 	include($this->blog."html/sidebar.links.html.php");

		/**
		 * Google's search
		 */
		if ($this->displayGoogle)
		 	include($this->blog."html/sidebar.google.html.php");
		 	
	}
			
} // end class
?>




