Where is the page number of Empire CMS search pagination modified?

The pagination page number style of the Imperial CMS search page is ugly. We must beautify it in pursuit of perfection, but the default paging structure does not match the CSS style structure I wrote. How to modify the structure code of the default search pagination page number style of Imperial CMS? The knife holder shares the method with everyone.

1. Open the file: /e/class/connect.php

2. Search: //front page

You will see the page number function of page1. This is the page number code of the search page. You can modify it according to your needs. After the modification is completed, remember to refresh the data in the background to take effect.

//前台分页
function page1($num,$line,$page_line,$start,$page,$search){
global $fun_r;
$num=(int)$num;
$line=(int)$line;
$page_line=(int)$page_line;
$start=(int)$start;
$page=(int)$page;
if($num<=$line)
{
return '';
}
$search=RepPostStr($search,1);
$url=eReturnSelfPage(0).'?page';
$snum=2;//最小页数
$totalpage=ceil($num/$line);//取得总页数
$firststr='<a title="'.$fun_r['trecord'].'">&nbsp;<b>'.$num.'</b> </a>&nbsp;&nbsp;';
//上一页
if($page<>0)
{
$toppage='<a href="'.$url.'=0'.$search.'">'.$fun_r['startpage'].'</a>&nbsp;';
$pagepr=$page-1;
$prepage='<a href="'.$url.'='.$pagepr.$search.'">'.$fun_r['pripage'].'</a>';
}
//下一页
if($page!=$totalpage-1)
{
$pagenex=$page+1;
$nextpage='&nbsp;<a href="'.$url.'='.$pagenex.$search.'">'.$fun_r['nextpage'].'</a>';
$lastpage='&nbsp;<a href="'.$url.'='.($totalpage-1).$search.'">'.$fun_r['lastpage'].'</a>';
}
$starti=$page-$snum<0?0:$page-$snum;
$no=0;
for($i=$starti;$i<$totalpage&&$no<$page_line;$i++)
{
$no++;
if($page==$i)
{
$is_1="<b>";
$is_2="</b>";
}
else
{
$is_1='<a href="'.$url.'='.$i.$search.'">';
$is_2="</a>";
}
$pagenum=$i+1;
$returnstr.="&nbsp;".$is_1.$pagenum.$is_2;
}
$returnstr=$firststr.$toppage.$prepage.$returnstr.$nextpage.$lastpage;
return $returnstr;
}

Guess you like

Origin blog.csdn.net/winkexin/article/details/131349998