<?php
	require_once( $GLOBALS["site_root"]."/includes/pages/DefaultFrontend.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/ArticlePanel.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/ArticlesPanel.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/FilteredArticlesPanel.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/CategoryArticlesPanel.inc.php" );

	class ArticlesPage extends DefaultFrontend {
		protected $oArticlesPanel;


		public function modifyGetPost( &$g , &$p ) {
			$retval = parent::modifyGetPost( $g , $p );
			if (isset( $g["article_id"] )) {
				$this->oArticlePanel = new ArticlePanel( "content_widget" , $this );
				$this->oArticlePanel->setArticleId( $g["article_id"] );
			} else if (isset( $g["larticle_id"] )) {
				$this->oArticlePanel = new ArticlePanel( "content_widget" , $this );
				$this->oArticlePanel->setLarticleId( $g["larticle_id"] );
			} else {
				$this->oArticlesPanel = new CategoryArticlesPanel( "content_widget" , $this , $g["article_category"] );
			}
			// if (isset( $g["oldal"] )) $this->oArticlesPanel->setPagenum( $g["oldal"] -1 );
			return $retval;
		}

		public function __construct( $id = "ArticlesPage" , $parent = null , $pagetype = "article"  ) {
			parent::__construct( $id , $parent , $pagetype );
		}
	}
?>
