|
|
@@ -191,10 +191,10 @@ class DataListCP |
|
|
|
//echo " {$totalpage}=={$this->totalResult}=={$this->pagesize}";
|
|
|
|
//无结果或只有一页的情况
|
|
|
|
if ($totalpage <= 1 && $this->totalResult > 0) {
|
|
|
|
return "<ul class='pagination justify-content-center'><li class='page-item disabled'><span class='page-link'>1{$lang_page}".$this->totalResult.$lang_record_number."</span></li></ul>";
|
|
|
|
return "<ul class='pagination justify-content-end'><li class='page-item disabled'><span class='page-link'>1{$lang_page}".$this->totalResult.$lang_record_number."</span></li></ul>";
|
|
|
|
}
|
|
|
|
if ($this->totalResult == 0) {
|
|
|
|
return "<ul class='pagination justify-content-center'><li class='page-item disabled'><span class='page-link'>0{$lang_page}".$this->totalResult.$lang_record_number."</span></li></ul>";
|
|
|
|
return "<ul class='pagination justify-content-end'><li class='page-item disabled'><span class='page-link'>0{$lang_page}".$this->totalResult.$lang_record_number."</span></li></ul>";
|
|
|
|
}
|
|
|
|
$infos = "<li class='page-item disabled'><span class='page-link'>{$totalpage}{$lang_page}/{$this->totalResult}{$lang_record_number}</span></li>";
|
|
|
|
if ($this->totalResult != 0) {
|
|
|
@@ -246,13 +246,7 @@ class DataListCP |
|
|
|
$sizesel .= "<option value='100' ".($this->pagesize == 100 ? "selected='selected'" : "").">100条/页</option>\r\n";
|
|
|
|
$sizesel .= "<option value='500' ".($this->pagesize == 500 ? "selected='selected'" : "").">500条/页</option>\r\n";
|
|
|
|
$sizesel .= "<option value='1000' ".($this->pagesize == 1000 ? "selected='selected'" : "").">1000条/页</option>\r\n";
|
|
|
|
$sizesel .= "</select><script>document.addEventListener('DOMContentLoaded', function() {var selectElement = document.getElementById('dedepagesize');
|
|
|
|
selectElement.addEventListener('change', function() {var selectedSize = this.value; //获取选中的分页大小
|
|
|
|
var url = new URL(window.location.href); //获取当前链接
|
|
|
|
url.searchParams.set('pagesize', selectedSize); //更新分页参数
|
|
|
|
window.location.href = url.toString(); //重新加载页面
|
|
|
|
});});</script><ul class='pagination'>\r\n";
|
|
|
|
//info,index,end,pre,next,pageno,form
|
|
|
|
$sizesel .= "</select><script>document.addEventListener('DOMContentLoaded', function() {var selectElement = document.getElementById('dedepagesize');selectElement.addEventListener('change', function() {var selectedSize = this.value;var url = new URL(window.location.href);url.searchParams.set('pagesize', selectedSize);window.location.href = url.toString();});});</script><ul class='pagination'>\r\n";
|
|
|
|
if (preg_match("#pagesize#i", $atts['listitem'])) {
|
|
|
|
$plist .= $sizesel;
|
|
|
|
}
|
|
|
|