<?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 {    

     
    function previousNext($page_name) {
        
        $page_name_val = "'".$page_name."'";
        if ($this->getPrevious()) { 
            $show = '<li class="prev"><a href="javascript:void(0)" onclick="customer_paging_access('.$page_name_val.',' . $this->getPrevious() . ')">&lt; Previous</a></li>'; 
        }
        if (!$this->getPrevious()) {
            $show = '<li class="prev"><a href="javascript:void(0)" style="cursor:default;">&lt; Previous</a></li>';            
        }
        $links = $this->getLinkArr();
        $newlink = "";
        $i = 0;
        foreach ($links as $link) {
            if ($link == $this->getCurrent()) {                
                $newlink .=' <li class="active"><a href="javascript:void(0)">' . $link . '</a></li>';
            } else {
                $newlink .=' <li><a href="javascript:void(0)" onclick="customer_paging_access('.$page_name_val.',' . $link . ')">' . $link . '</a></li>';               
            }
            $i++;
        }
        if ($this->getNext()) {
            $getnext = '<li class="prev"><a href="javascript:void(0)" onclick="customer_paging_access('.$page_name_val.',' . $this->getNext() . ')">Next &gt;</a></li>';             
        }
        if (!$this->getNext()) {
            $getnext = '<li class="prev"><a href="javascript:void(0)" style="cursor:default;">Next  &gt;</a></li>';
        }
        if ($i > 0) {
            $newpage = $show . $newlink . $getnext;
            return $newpage;
        }
    }
}
//ends class
?>
				 