kingcms(asp)分页美化修改

修改过程

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

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

3 将整个函数
'pagelist *** Copyright &copy 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=("<a href="""&replace(l1,"$","")&""">1...</a>")'
end if
if l2>2 then
l4=l4&("<a href="""&replace(l1,"$",l2-1)&""">‹‹</a>")
elseif l2=2 then
l4=l4&("<a href="""&replace(l1,"$","")&""">‹‹</a>")
end if
for k=l2-2 to l2+7
if k>=1 and k<=l3 then
if cstr(k)=cstr(l2) then
l4=l4&("<strong>"&k&"</strong>")
else
if k=1 then
l4=l4&("<a href="""&replace(l1,"$","")&""">"&k&"</a>")
else
l4=l4&("<a href="""&replace(l1,"$",k)&""">"&k&"</a>")
end if
end if
end if
next
if l2<l3 and l3<>1 then
l4=l4&("<a href="""&replace(l1,"$",l2+1)&""">››</a>")
end if
if l2<l3-7 then
l4=l4&("<a href="""&replace(l1,"$",l3)&""">… "&l3&"</a>")
end if

I2=split(l1,"$")

'l4=l4&"<kbd><input type=""text"" name=""pid"" size=""2"" οnkeydοwn=""if(event.keyCode==13) {window.location='"&htm2js(I2(0))&"'+this.value+'"&htm2js(I2(1))&"'; return false;}"" /></kbd>"
pagelist="<span class=""k_pagelist""><em>"&l5&"</em>"&l4&"</span>"
end function
'l11l *** Copyright &copy KingCMS.com All Rights Reserved. ***
变更为

'pagelist *** Copyright &copy 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=("<a href="""&replace(l1,"$","")&""">首页</a>")'
end if
if l2>2 then
l4=l4&("<a href="""&replace(l1,"$",l2-1)&""">上一页</a>")
elseif l2=2 then
l4=l4&("<a href="""&replace(l1,"$","")&""">上一页</a>")
end if
for k=l2-2 to l2+7
if k>=1 and k<=l3 then
if cstr(k)=cstr(l2) then
l4=l4&("<strong>"&k&"</strong>")
else
if k=1 then
l4=l4&("<a href="""&replace(l1,"$","")&""">"&k&"</a>")
else
l4=l4&("<a href="""&replace(l1,"$",k)&""">"&k&"</a>")
end if
end if
end if
next
if l2<l3 and l3<>1 then
l4=l4&("<a href="""&replace(l1,"$",l2+1)&""">下一页</a>")
end if
if l2<l3-7 then
l4=l4&("<a href="""&replace(l1,"$",l3)&""">尾页</a>")
end if

I2=split(l1,"$")

'l4=l4&"<kbd><input type=""text"" name=""pid"" size=""2"" οnkeydοwn=""if(event.keyCode==13) {window.location='"&htm2js(I2(0))&"'+this.value+'"&htm2js(I2(1))&"'; return false;}"" /></kbd>"
pagelist="<span class=""k_pagelist"">共<em>"&l5&"</em>条"&l4&"</span>"
end function
'l11l *** Copyright &copy KingCMS.com All Rights Reserved. ***

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

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

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

if l2<l3 and l2<>1 then
I1="<a href="""&pagepath(l1,l2-1)&""">上一页</a>"&I1& "<a href="""&pagepath(l1,l2+1)&""">下一页</a>"
else
if l2=1 then
I1="<a href=#>上一页</a>"&I1&"<a href="""&pagepath(l1,l2+1)&""">下一页</a>"

else
if l2=l3 then
I1="<a href="""&pagepath(l1,l2-1)&""">上一页</a>"&I1& "<a href=#>下一页</a>"
end if
end if
end if

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值