<?php
	require_once( $GLOBALS["site_root"]."/includes/widgets/Widget.inc.php" );
	require_once( $GLOBALS["site_root"]."/includes/urlgen/Sites.inc.php" );
	require_once( $GLOBALS["site_root"] . "/includes/urlgen/Article.inc.php" );

	class Footer extends Widget {
		public $bCloser = true;

		protected function capitalize( $s ) {
			return strtoupper( substr( $s , 0 , 1 ) ) . substr( $s , 1 );
		}

		public function render() {
			foreach ($GLOBALS["languages"] as $lang => $code)
				$this->setParam( "url_".$lang , SitesURL::renderURLLang( $lang ) );
			$this->setParam( "bCloser" , $this->bCloser );
			$this->setParam( "url_imprint" , ArticleURL::renderURLFromArticleName( "imprint" ) );
			$this->setParam( "url_advertise" , ArticleURL::renderURLFromArticleName( "advertising" ) );
			$this->setParam( "url_partners" , ArticleURL::renderURLFromArticleName( "partners" ) );


			$this->setParam( "url_freelancers" , MemberURL::renderURLBase( "freelancer" ) );
			$this->setParam( "url_parttimers" , MemberURL::renderURLBase( "parttime" ) );
			$this->setParam( "url_agencies" , MemberURL::renderURLBase( "agency" ) );
		
			foreach (array( "freelancers" , "parttimers" , "agencies" ) as $f)	
				$this->setParam( $f , $this->capitalize( __("usertype_".$f ) ) );
			return parent::render();
		}
	}
?>
