Lines Matching refs:cur
476 $cur = $INPUT->int('p', 1, true);
481 $toshow = [1, 2, $cur, $pages, $pages - 1];
482 if($cur - 1 > 1) $toshow[] = $cur - 1;
483 if($cur + 1 < $pages) $toshow[] = $cur + 1;
487 if($cur < 4) {
488 if($cur + 2 < $pages && count($toshow) < 7) $toshow[] = $cur + 2;
489 if($cur + 3 < $pages && count($toshow) < 7) $toshow[] = $cur + 3;
490 if($cur + 4 < $pages && count($toshow) < 7) $toshow[] = $cur + 4;
492 if($cur - 2 > 1 && count($toshow) < 7) $toshow[] = $cur - 2;
493 if($cur - 3 > 1 && count($toshow) < 7) $toshow[] = $cur - 3;
494 if($cur - 4 > 1 && count($toshow) < 7) $toshow[] = $cur - 4;
501 if($cur > 1) {
503 echo '<a href="' . wl('', http_build_query(['q' => $QUERY, 'do' => 'search', 'ns' => $INPUT->arr('ns'), 'min' => $INPUT->arr('min'), 'p' => ($cur-1)])) . '">';
510 if($toshow[$i] == $cur) {
511 echo '<li class="cur">' . $toshow[$i] . '</li>';
526 if($cur < $pages) {
528 echo '<a href="' . wl('', http_build_query(['q' => $QUERY, 'do' => 'search', 'ns' => $INPUT->arr('ns'), 'min' => $INPUT->arr('min'), 'p' => ($cur+1)])) . '">';