<?php 
// ==================================================================
	//  Author: Ted Kappes (pesoto74@soltec.net)
	//	Web: 	http://tkap.org/paginator/
	//	Name: 	Paginator_html
	// 	Desc: 	Class extension for Paginator. Adds pre-made link sets.
	//
	// 7/21/2003
	//
	//  Please send me a mail telling me what you think of Paginator
	//  and what your using it for. [ pesoto74@soltec.net]
	//
// ==================================================================
      
			class Paginator_html extends Paginator { 
			
			  //outputs a link set like this 1 of 4 of 25 First | Prev | Next | Last |              
				function firstLast()
			  {				
					 if($this->getCurrent()==1)
		         {
		         $first = "First | ";
		         } else { $first="<a href=\"" .  $this->getPageName() . "?page=" . $this->getFirst() . "\">First</a> |"; }  
		       if($this->getPrevious())
		         {
		         $prev = "<a href=\"" .  $this->getPageName() . "?page=" . $this->getPrevious() . "\">Prev</a> | ";
		         } else { $prev="Prev | "; }
		
	         if($this->getNext())
		         {
		         $next = "<a href=\"" . $this->getPageName() . "?$this->pass&page=" . $this->getNext() . "\">Next</a> | ";
		         } else { $next="Next | "; }
		
		
		       if($this->getLast())
		         {
		         $last = "<a href=\"" . $this->getPageName() . "?page=" . $this->getLast() . "\">Last</a> | ";
		         } else { $last="Last | "; }
		         echo $this->getFirstOf() . " of " .$this->getSecondOf() . " of " . $this->getTotalItems() . " ";
		         echo $first . " " . $prev . " " . $next . " " . $last;
				} 
				//outputs a link set like this Previous 1 2 3 4 5 6 Next   
				function previousNext()
				{
					if($this->getPrevious())
		        {
		        echo "<font size='1'><a href=\"" . $this->getPageName() . "?$this->pass&page=" . $this->getPrevious() . "\">Previous</a></font> ";
		        }
						$links = $this->getLinkArr();
		      foreach($links as $link)
	          {
	          if($link == $this->getCurrent())
					    {
					     echo " $link ";
					    } else { echo "<font size='1'><a href=\"" . $this->getPageName() . "?$this->pass&page=$link\">" . $link . "</a></font> ";
					    }
		          } 
						if($this->getNext())
		          {
		          echo "<font size='1'><a href=\"" . $this->getPageName() . "?$this->pass&page=" . $this->getNext() . "\">Next</a></font> ";
		          }
		        }  
	}//ends class


         ?>
				 