发新话题
打印

[使用问题] 如何修改栏目列表的换页形式

我要急转弯

免费提供大量的各类脑筋急转弯,如成人脑筋急转弯,搞笑急转弯等 ...

http://www.wyjzw.cn

如何修改栏目列表的换页形式

如何修改栏目列表的换页形式?

KINGCMS默认的栏目列表是下面这种形式的,
4012›› ”,如何修改成"第一页1234下一页尾页共4页 总计103条(每页 28 条)"
请各位高手指教……

顶部

我要急转弯

免费提供大量的各类脑筋急转弯,如成人脑筋急转弯,搞笑急转弯等 ...

http://www.wyjzw.cn

这个我解决了!
后台:\page\system\fun.asp


修改代码:
'以下函数不能放到class类去!
'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,"$")
        pagelist="<span class=""k_pagelist""><a href="""&replace(l1,"$","")&""">首页</a>"&l4&"<a href="""&replace(l1,"$",l3)&""">尾页</a></span>"
end function

顶部

发新话题