kingcms(asp)分页美化修改

修改过程

1、打开/page/system/fun.asp

2、搜索到function pagelist(l1,l2,l3,l5)

3 将整个函数
'pagelist *** Copyright © KingCMS.com All Rights Reserved. ***
function pagelist(l1,l2,l3,l5)
if instr(l1,"$")=0 then exit function
if l5=0 then exit function
dim l4,k,l6,l7,I2
l2=int(l2):l3=int(l3):l5=int(l5)
if l2>3 then
l4=("1...")'
end if
if l2>2 then
l4=l4&("‹‹")
elseif l2=2 then
l4=l4&("‹‹")
end if
for k=l2-2 to l2+7
if k>=1 and k<=l3 then
if cstr(k)=cstr(l2) then
l4=l4&(""&k&"")
else
if k=1 then
l4=l4&(""&k&"")
else
l4=l4&(""&k&"")
end if
end if
end if
next
if l21 then
l4=l4&("››")
end if
if l2 l4=l4&("… "&l3&"")
end if

I2=split(l1,"$")

'l4=l4&""
pagelist=""&l5&""&l4&""
end function
'l11l *** Copyright © KingCMS.com All Rights Reserved. ***
变更为

'pagelist *** Copyright © KingCMS.com All Rights Reserved. ***
function pagelist(l1,l2,l3,l5)
if instr(l1,"$")=0 then exit function
if l5=0 then exit function
dim l4,k,l6,l7,I2
l2=int(l2):l3=int(l3):l5=int(l5)
if l2>3 then
l4=("首页")'
end if
if l2>2 then
l4=l4&("上一页")
elseif l2=2 then
l4=l4&("上一页")
end if
for k=l2-2 to l2+7
if k>=1 and k<=l3 then
if cstr(k)=cstr(l2) then
l4=l4&(""&k&"")
else
if k=1 then
l4=l4&(""&k&"")
else
l4=l4&(""&k&"")
end if
end if
end if
next
if l21 then
l4=l4&("下一页")
end if
if l2 l4=l4&("尾页")
end if

I2=split(l1,"$")

'l4=l4&""
pagelist=""&l5&"条"&l4&""
end function
'l11l *** Copyright © KingCMS.com All Rights Reserved. ***

文章页的修改
1、打开/page/Article/fun.asp

2、搜索到public function pageslist(l1,l2,l3,l4,l5)

3、找到第一个next,然后在它下面添加下面的代码

if l21 then
I1="上一页"&I1& "下一页"
else
if l2=1 then
I1="下一页"

else
if l2=l3 then
I1="上一页"&I1& "下一页"
end if
end if
end if

转载于:https://www.cnblogs.com/nices/p/3397570.html


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部