PHP: Function JoinChar(strUrl) if strUrl="" then JoinChar="" Exit Function end if if InStr(strUrl,"?")<len(strUrl) then if InStr(strUrl,"?")>1 then if InStr(strUrl,"&")<len(strUrl) then JoinChar=strUrl & "&" else JoinChar=strUrl end if else JoinChar=strUrl & "?" end if else JoinChar=strUrl end If End Function Function ShowPage(sfilename,totalnumber,maxperpage,ShowTotal,ShowAllPages,strUnit) dim n, i,strTemp,strUrl if totalnumber mod maxperpage=0 then n= totalnumber \ maxperpage else n= totalnumber \ maxperpage+1 end if strTemp= "<table align=""center""><tr><td>" if ShowTotal=true then strTemp=strTemp & "共 <b>" & totalnumber & "</b> " & strUnit & " " end if if CreateHtmlIng=True then if CurrentPage<2 then strTemp=strTemp & "首页 上一页 " else strTemp=strTemp & "<a href="""&PreFixion&"_"&DefaultPage&"."&Cl.CreateFileExt&""">首页</a> " if (CurrentPage-1)=1 then strTemp=strTemp & "<a href="""&PreFixion&"_"&DefaultPage&"."&Cl.CreateFileExt&""">上一页</a> " else strTemp=strTemp & "<a href="""&PreFixion&"_List_" & (CurrentPage-1) & "."&Cl.CreateFileExt&""">上一页</a> " end if end if if n-currentpage<1 then strTemp=strTemp & "下一页 尾页" else strTemp=strTemp & "<a href="""&PreFixion&"_List_" & (CurrentPage+1) & "."&Cl.CreateFileExt&""">下一页</a> " strTemp=strTemp & "<a href="""&PreFixion&"_List_" & n & "."&Cl.CreateFileExt&""">尾页</a>" end if strTemp=strTemp & " 页次:<strong><font color=""red"">" & CurrentPage & "</font>/" & n & "</strong>页 " strTemp=strTemp & " <b>" & maxperpage & "</b>" & strUnit & "/页" if ShowAllPages=True then strTemp=strTemp & " 转到:<select name=""page"" size=""1"" onchange=""javascript:window.location=''+this.options[this.selectedIndex].value;"">" strTemp=strTemp & "<option value="""&PreFixion&"_"&DefaultPage&"."&Cl.CreateFileExt&""">第" & 1 & "页</option>" for i = 2 to n strTemp=strTemp & "<option value="""&PreFixion&"_List_" & i & "."&Cl.CreateFileExt&"""" if cint(CurrentPage)=cint(i) then strTemp=strTemp & " selected " strTemp=strTemp & ">第" & i & "页</option>" next strTemp=strTemp & "</select>" end if else strUrl=JoinChar(sfilename) if CurrentPage<2 then strTemp=strTemp & "首页 上一页 " else strTemp=strTemp & "<a href=""" & strUrl & "page=1"">首页</a> " strTemp=strTemp & "<a href=""" & strUrl & "page=" & (CurrentPage-1) & """>上一页</a> " end if if n-currentpage<1 then strTemp=strTemp & "下一页 尾页" else strTemp=strTemp & "<a href=""" & strUrl & "page=" & (CurrentPage+1) & """>下一页</a> " strTemp=strTemp & "<a href=""" & strUrl & "page=" & n & """>尾页</a>" end if strTemp=strTemp & " 页次:<strong><font color=""red"">" & CurrentPage & "</font>/" & n & "</strong>页 " strTemp=strTemp & " <b>" & maxperpage & "</b>" & strUnit & "/页" if ShowAllPages=True then strTemp=strTemp & " 转到:<select name=""page"" size=""1"" onchange=""javascript:window.location='" & strUrl & "page=" & "'+this.options[this.selectedIndex].value;"">" for i = 1 to n strTemp=strTemp & "<option value=""" & i & """" if cint(CurrentPage)=cint(i) then strTemp=strTemp & " selected " strTemp=strTemp & ">第" & i & "页</option>" next strTemp=strTemp & "</select>" end if end if strTemp=strTemp & "</td></tr></table>" ShowPage=strTemp End Function