<?php
	require_once( $GLOBALS["site_root"]."/includes/widgets/Tab2.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/SearchPane.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/QuotePane.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/widgets/TranslatorBoxes.inc.php" );

	class SearchQuotePanel extends Tab2 {
		protected $translators = null;

		protected function isPreview() {
			return isset( $this->aG["preview"] );
		}

		public function modifyGetPost( &$g , &$p ) {
			$retval = parent::modifyGetPost( $g , $p );
			if (!$this->isPreview()) {
				if (!isset( $translators )) $this->translators = new TranslatorBoxes( "TranslatorBoxes" , $this );
			}
			return $retval;
		}

		public function __construct( $id  = "SearchQuotePanel" , $parent = null ) {
			parent::__construct( $id , $parent );
			$this->sTab1Title = __("Mainpage_Search" );
			$this->sTab2Title = __("Mainpage_Quote");
			$this->setParam( "url_grouped_quote" , RequestQuoteURL::renderGroupedURL() );

			$this->searchpane = new SearchPane( "SearchPane" , $this );
			$this->quotepane = new QuotePane( "QuotePane" , $this );
		}

		public function render() {
			if ($this->sRendered) return $this->sRendered;
			$this->setParam( "getparams" , $this->aG );
			$this->setParam( "postparams" , $this->aP );
			return parent::render();
		}
	}
?>
