function makepagenav($start, $count, $total, $range = 0, $link = "") { if ($link == "") { $link = "cpax.php?go=search"; } if ($pg_cnt <= 1) { return ""; } $idx_back = $start - $count; $idx_next = $start + $count; $res = "Strona ".$cur_page." z ".$pg_cnt.": "; if($idx_back >= 0) { if($cur_page > ($range + 1)) { $res .= " <a href='cpax.php?go=search&".$link."rowstart=0'>1</a> ... "; } } if ($range == 0) { $idx_fst = 1; $idx_lst = $pg_cnt; } for ($i = $idx_fst; $i <= $idx_lst; $i++) { $offset_page = ($i - 1) * $count; if ($i == $cur_page) { $res .= "<span><strong>".$i."</strong></span>"; } else { $res .= " <a href='cpax.php?go=search&".$link."rowstart=".$offset_page."'>".$i."</a> "; } } if ($idx_next < $total) { if ($cur_page < ($pg_cnt - $range)) { $res .= " ...<a href='cpax.php?go=search&".$link."rowstart=".($pg_cnt - 1) * $count."'>".$pg_cnt."</a>\n"; } } return "<div class='pagenav'>\n".$res .$link."</div>\n"; } ... $navigation_result = "<div align='center' style='margin-top:5px;'>\n".makePageNav($_GET['rowstart'], 10, ($site_search_count > 100 || search_globalarray("") ? 100 : $site_search_count), 3, "fraza=".urlencode($_GET['fraza'])."&".$composevars)."\n</div>\n";
Linki do stron:
Cytat
http://localhost/aaa/cpax.php?go=search&am...s=50rowstart=10
http://localhost/aaa/cpax.php?go=search&am...s=50rowstart=20
http://localhost/aaa/cpax.php?go=search&am...s=50rowstart=30
http://localhost/aaa/cpax.php?go=search&am...s=50rowstart=20
http://localhost/aaa/cpax.php?go=search&am...s=50rowstart=30
EDIT: Znalazłem problem. W linku pokazuje się search=Szukaj za co winny jest kod: