Ignore:
Timestamp:
2006/12/13 18:28:53 (20 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/test-xoops.ec-cube.net/html/class/pagenav.php

    r822 r878  
    4848    var $current; 
    4949    var $url; 
     50    var $anchor; 
    5051    /**#@-*/ 
    5152 
     
    5859     * @param   string  $start_name     Name for "start" or "offset" 
    5960     * @param   string  $extra_arg      Additional arguments to pass in the URL 
     61     * @param   string  $anchor         anchor target 
    6062     **/ 
    61     function XoopsPageNav($total_items, $items_perpage, $current_start, $start_name="start", $extra_arg="") 
     63    function XoopsPageNav($total_items, $items_perpage, $current_start, $start_name="start", $extra_arg="", $anchor = "") 
    6264    { 
    6365        $this->total = intval($total_items); 
     
    6870        } 
    6971        $this->url = xoops_getenv('PHP_SELF').'?'.$extra_arg.trim($start_name).'='; 
     72        if($anchor != "") $this->anchor = $anchor; 
    7073    } 
    7174 
     
    8689            $prev = $this->current - $this->perpage; 
    8790            if ( $prev >= 0 ) { 
    88                 $ret .= '<a href="'.$this->url.$prev.'"><u>¢«Á°¤Ø</u></a> '; 
     91                $ret .= '<a href="'.$this->url.$prev.$this->anchor.'"><u>¢«Á°¤Ø</u></a> '; 
    8992            } 
    9093            $counter = 1; 
     
    99102                    } 
    100103                    if($counter != 1) $ret .= "¡Ã"; 
    101                     $ret .= '<a href="'.$this->url.(($counter - 1) * $this->perpage).'">'.$counter.'</a> '; 
     104                    $ret .= '<a href="'.$this->url.(($counter - 1) * $this->perpage).$this->anchor.'">'.$counter.'</a> '; 
    102105                    if ( $counter == 1 && $current_page > 1 + $offset ) { 
    103106                        $ret .= '... '; 
     
    108111            $next = $this->current + $this->perpage; 
    109112            if ( $this->total > $next ) { 
    110                 $ret .= '<a href="'.$this->url.$next.'"><u>¼¡¤Ø¢ª</u></a> '; 
     113                $ret .= '<a href="'.$this->url.$next.$this->anchor.'"><u>¼¡¤Ø¢ª</u></a> '; 
    111114            } 
    112115        } 
Note: See TracChangeset for help on using the changeset viewer.