<?php
	require_once( $GLOBALS["site_root"]."/includes/pages/FrontendPage.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/LoginBox.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/MenuBox.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/Banners.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/InfoPanel.inc.php" );

	class DefaultFrontend extends FrontendPage {
		protected $oLoginBox;
		protected $oBanners;
		protected $oInfoPanel;
		protected $sPageClass;
		protected $bFullscreen = false;

		public function setPageClass( $v ) { $this->sPageClass = $v; }

		public function __construct( $id = "DefaultFrontend" , $parent = null , $pagetype = "" ) {
			parent::__construct( $id , $parent , $pagetype );
			$this->sPageClass = get_class( $this );
		}

		public function setFullScreen( $v ) { $this->bFullscreen = $v; }

		public function modifyGetPost( &$g , &$p ) {
			$retval = parent::modifyGetPost( $g , $p );
			if (!$this->bFullscreen) {
				$this->oLoginBox = new LoginBox( "LoginBox" , $this );
				if ($GLOBALS["language"]=="hu") {
					$this->oMenuBox = new MenuBox( "MenuBox" , $this );
				}
				$this->oBanners = new Banners( "Banners" , $this );
				$this->oInfoPanel = new InfoPanel( "InfoPanel" , $this );
			} else {
				$this->oFooter->bCloser = false;
			}
			return $retval;
		}

		public function render() {
			if ($this->sRendered) return $this->sRendered;
			$this->setParam( "bFullscreen" , $this->bFullscreen );
			$this->setParam( "page_class" , $this->sPageClass );
			return parent::render();
		}

	}

?>
