From 29a83a94961e685816b04d7f0f01d3f3d75d4b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?= <93301500+xushubieli@users.noreply.github.com> Date: Tue, 25 Mar 2025 14:15:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E9=9D=A2=E6=A0=8F=E7=9B=AE=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/static/web/css/admin.css | 8 +++++ src/system/archive/archives.class.php | 20 +++++------ src/system/datalistcp.class.php | 49 +++++++++++++++++++-------- 3 files changed, 52 insertions(+), 25 deletions(-) diff --git a/src/static/web/css/admin.css b/src/static/web/css/admin.css index f592a82d..6ab69f6f 100644 --- a/src/static/web/css/admin.css +++ b/src/static/web/css/admin.css @@ -739,6 +739,14 @@ input,select,textarea,.colordlg,.pubdlg,.quickselitem .topcat,.mysource,.mywrite border-top-right-radius:0!important; border-bottom-right-radius:0!important } +.page-item:first-child .page-link { + border-top-left-radius:var(--b-radius); + border-bottom-left-radius:var(--b-radius) +} +.page-item:last-child .page-link { + border-top-right-radius:var(--b-radius); + border-bottom-right-radius:var(--b-radius) +} .nav-pills .nav-link.active,.nav-pills .show>.nav-link { background:var(--green) } diff --git a/src/system/archive/archives.class.php b/src/system/archive/archives.class.php index 2c113e4c..c0bcf0fd 100755 --- a/src/system/archive/archives.class.php +++ b/src/system/archive/archives.class.php @@ -859,7 +859,7 @@ class Archives foreach ($this->SplitTitles as $k => $v) { if ($i == 1) { if ($cfg_rewrite == 'Y') { - $revalue .= "$v"; + $revalue .= "$v"; } else { $revalue .= "$v"; } @@ -868,7 +868,7 @@ class Archives $revalue .= " $v "; } else { if ($cfg_rewrite == 'Y') { - $revalue .= "$v"; + $revalue .= "$v"; } else { $revalue .= "$v"; } @@ -882,20 +882,20 @@ class Archives foreach ($this->SplitTitles as $k => $v) { if ($i == 1) { if ($cfg_rewrite == 'Y') { - $revalue .= ""; + $revalue .= ""; } else { $revalue .= ""; } } else { if ($pageNo == $i) { if ($cfg_rewrite == 'Y') { - $revalue .= ""; + $revalue .= ""; } else { $revalue .= ""; } } else { if ($cfg_rewrite == 'Y') { - $revalue .= ""; + $revalue .= ""; } else { $revalue .= ""; } @@ -930,13 +930,13 @@ class Archives } else { if ($nPage == 1) { if ($cfg_rewrite == 'Y') { - $PageList .= "
  • 上页
  • "; + $PageList .= "
  • 上页
  • "; } else { $PageList .= "
  • 上页
  • "; } } else { if ($cfg_rewrite == 'Y') { - $PageList .= "
  • 上页
  • "; + $PageList .= "
  • 上页
  • "; } else { $PageList .= "
  • 上页
  • "; } @@ -946,7 +946,7 @@ class Archives if ($i == 1) { if ($nowPage != 1) { if ($cfg_rewrite == 'Y') { - $PageList .= "
  • 1
  • "; + $PageList .= "
  • 1
  • "; } else { $PageList .= "
  • 1
  • "; } @@ -957,7 +957,7 @@ class Archives $n = $i; if ($nowPage != $i) { if ($cfg_rewrite == 'Y') { - $PageList .= "
  • {$n}
  • "; + $PageList .= "
  • {$n}
  • "; } else { $PageList .= "
  • {$n}
  • "; } @@ -968,7 +968,7 @@ class Archives } if ($lPage <= $totalPage) { if ($cfg_rewrite == 'Y') { - $PageList .= "
  • 下页
  • "; + $PageList .= "
  • 下页
  • "; } else { $PageList .= "
  • 下页
  • "; } diff --git a/src/system/datalistcp.class.php b/src/system/datalistcp.class.php index 91e74138..07564f32 100755 --- a/src/system/datalistcp.class.php +++ b/src/system/datalistcp.class.php @@ -105,6 +105,10 @@ class DataListCP } $this->pageNO = $pageno; $this->totalResult = $totalresult; + if (isset($GLOBALS['pagesize'])) { + $this->pagesize = $GLOBALS['pagesize']; + $this->SetParameter('pagesize', $this->pagesize); + } if (isset($this->tpl->tpCfgs['pagesize'])) { $this->pagesize = $this->tpl->tpCfgs['pagesize']; } @@ -178,10 +182,10 @@ class DataListCP $prepagenum = $this->pageNO - 1; $nextpagenum = $this->pageNO + 1; if (!isset($atts['listsize']) || preg_match("#[^0-9]#", $atts['listsize'])) { - $atts['listsize'] = 5; + $atts['listsize'] = 6; } if (!isset($atts['listitem'])) { - $atts['listitem'] = "info,index,end,pre,next,pageno"; + $atts['listitem'] = "pagesize,info,index,end,pre,next,pageno"; } $totalpage = ceil($this->totalResult / $this->pagesize); //echo " {$totalpage}=={$this->totalResult}=={$this->pagesize}"; @@ -200,22 +204,22 @@ class DataListCP foreach ($this->getValues as $key => $value) { $value = urlencode($value); $geturl .= "$key=$value"."&"; - $hidenform .= "\n"; + $hidenform .= "\r\n"; } } $purl .= "?".$geturl; //获得上页和下页的链接 if ($this->pageNO != 1) { - $prepage .= "
  • $lang_pre_page
  • \n"; - $indexpage = "
  • $lang_index_page
  • \n"; + $prepage .= "
  • $lang_pre_page
  • \r\n"; + $indexpage = "
  • $lang_index_page
  • \r\n"; } else { $indexpage = "
  • "."$lang_index_page \n"."
  • "; } if ($this->pageNO != $totalpage && $totalpage > 1) { - $nextpage .= "
  • $lang_next_page
  • \n"; - $endpage = "
  • $lang_end_page
  • \n"; + $nextpage .= "
  • $lang_next_page
  • \r\n"; + $endpage = "
  • $lang_end_page
  • \r\n"; } else { - $endpage = "
  • $lang_end_page
  • \n"; + $endpage = "
  • $lang_end_page
  • \r\n"; } //获得数字链接 $listdd = ''; @@ -233,10 +237,25 @@ class DataListCP } } for ($j; $j <= $total_list; $j++) { - $listdd .= $j == $this->pageNO ? "
  • $j
  • \r\n" : "
  • ".$j."
  • \n"; + $listdd .= $j == $this->pageNO ? "
  • $j
  • \r\n" : "
  • ".$j."
  • \r\n"; } - $plist = "\r\n"; return $plist; } //获得当前网址