From a5bdb3cc7bfc30f84da12de4d7a2adc49ddec5af Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Mon, 10 Jul 2023 20:14:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AF=BC=E8=88=AA=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=96=B0=E7=9A=84bootstrap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui_pagination.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/ui_pagination.php b/ui_pagination.php index 684c86e..dfadf19 100644 --- a/ui_pagination.php +++ b/ui_pagination.php @@ -2,15 +2,29 @@ function create_pagination($number,$active,$link) { + if($active>10) + { + $start=$active-10; + + if($start<0)$start=0; + } + else + $start=0; + + if($start+20>$number) + $end=$number; + else + $end=$start+20; + echo ''; }