Changeset 878
- Timestamp:
- 2006/12/13 18:28:53 (20 years ago)
- Location:
- temp/test-xoops.ec-cube.net/html
- Files:
-
- 2 edited
-
class/pagenav.php (modified) (6 diffs)
-
modules/xoopspoll/pollresults.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/test-xoops.ec-cube.net/html/class/pagenav.php
r822 r878 48 48 var $current; 49 49 var $url; 50 var $anchor; 50 51 /**#@-*/ 51 52 … … 58 59 * @param string $start_name Name for "start" or "offset" 59 60 * @param string $extra_arg Additional arguments to pass in the URL 61 * @param string $anchor anchor target 60 62 **/ 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 = "") 62 64 { 63 65 $this->total = intval($total_items); … … 68 70 } 69 71 $this->url = xoops_getenv('PHP_SELF').'?'.$extra_arg.trim($start_name).'='; 72 if($anchor != "") $this->anchor = $anchor; 70 73 } 71 74 … … 86 89 $prev = $this->current - $this->perpage; 87 90 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> '; 89 92 } 90 93 $counter = 1; … … 99 102 } 100 103 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> '; 102 105 if ( $counter == 1 && $current_page > 1 + $offset ) { 103 106 $ret .= '... '; … … 108 111 $next = $this->current + $this->perpage; 109 112 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> '; 111 114 } 112 115 } -
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/pollresults.php
r877 r878 55 55 $xoopsTpl->assign('poll_id', $poll_id); 56 56 57 $nav = new XoopsPageNav($count, POLL_OPTION_VIEW, $start, "start", 'poll_id='.$poll_id .'#link_new');57 $nav = new XoopsPageNav($count, POLL_OPTION_VIEW, $start, "start", 'poll_id='.$poll_id, "link_new"); 58 58 $xoopsTpl->assign('forum_pagenav', $nav->renderNav(4)); 59 59
Note: See TracChangeset
for help on using the changeset viewer.
