\page\system\fun.asp
'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=("<a href="""&replace(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
' if instrrev(l1,"$/")>0 then
' l4=l4&("<a href="""&replace(l1,"$/","")&""">"&k&"</a>")
' else
' l4=l4&("<a href="""&replace(l1,"$","")&""">"&k&"</a>")
' end if
' 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,"$")
' pagelist="<span class=""k_pagelist""><em>"&l5&"</em>"&l4&"</span>"
'end function
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