<?php

class Venturia_View_Helper_Pagination {
	
	/**
	 * 
	 * 
	 */
	public function pagination ( Venturia_Db_Rowset_ScrollAble $rowset , $page , $url ) {	
		$nav = '' ;
		for ( $i = 1 ; $i <= $rowset->pages () ; $i ++ ) {
			if (($i - 1) == $page) {
				$nav .= "<span>{$i}</span>" ;
			} else {
				$_url = $url ;
				if ($i > 1)
					$_url .= "?strana=" . $i ;
				$nav .= " <a href=\"{$_url}\">$i</a> " ;
			}
		}
		return $nav ;
	}
}

?>
