<?php
	FNTH_class( "SuperGrid" );

	class FrontendSuperGridPager extends FNTHSuperGridPager {

		protected function prepareUriArray( $grid , $input , $pagenum ) {
			$retval = parent::prepareUriArray( $grid , $input , $pagenum );
			unset( $retval["lang"] );
			return $retval;
		}

		public function __construct( $id , $parent = null ) {
			$this->addMediaDirectory( $GLOBALS["site_root"] , $GLOBALS["site_www"] , "design/rp/","widgets/");
			parent::__construct( $id , $parent );
			$this->bJumper = true;
			$this->sJumperText = __("Jump_to_page","attr");
			$this->sBaseClass = "FrontendSuperGridPager";
		}

		protected function renderPageSpacer( $type = "normal" ) {
			return "&nbsp;&nbsp;|&nbsp;&nbsp;";
		}
		
		protected function renderPagerUrl( $pagenum , $actual = false ) {
			if ($actual) {
				return sprintf( "<b>%d</b>" , $pagenum+1 );
			}
			$u = $this->prepareUriArray( $this->grid , $this->aG , $pagenum );
			return sprintf( "<a href=\"%s\">%d</a>",
				FNTH_render_url( FNTH_strip_url_params( $_SERVER["REQUEST_URI"] ) , $u , true ),
				$pagenum+1 );
		}

	}



?>
