手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>网络编程>Asp编程>列表

ASP通用分页类

来源:互联网 作者:west263.com 时间:2008-02-23
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

If (IsArray(SW_aryFldLink) AND UBound(SW_aryFldName)>UBound(SW_aryFldLink)) Then strError = strError & "<br>字段数据相应文件链接项目不能小于字段个数"
End If

If Trim(strError) = "" Then
SW_blnInit = true
Else
SW_strError = SW_strError & " <tr bgcolor=""#336699"" height=""28""><td><font color=""#FFFFFF"">Init过程:</font></td></tr>" & vbcrlf
SW_strError = SW_strError & " <tr bgcolor=""#ffffff""><td>" & strError & "</td></tr>" & vbcrlf
End If
Response.Write(SW_strHeadJS & vbcrlf)
End Sub

'*****************************************
' 类型: 过程
' 目的: 显示分页信息
' 输入: 无
' 返回: 无
'*****************************************
Private Sub Pages()
Dim strPages,k,intTemp,intTemp1

If Not(SW_blnInit) Then Call ShowErrors()

If SW_lngTotalPage = 1 Then Exit Sub
Response.Write("<table align=""center"" class=""css_ShowPage"" width=""" & SW_strShowWidth & """>" & vbcrlf)

Response.Write(" <tr>" & vbcrlf)
Response.Write(" <td>" & vbcrlf)
Response.Write(" <table width=""100%"">" & vbcrlf)
Response.Write(" <tr>" & vbcrlf & " <td align=""center"" valign=""middle"" class="".test1"">" & vbcrlf)

If SW_lngTotalPage >= 1 Then
SELECT CASE SW_intShowPageType
Case SW_intShowChinese
If SW_lngPageNo <= 1 Then
Response.Write ("<font color=""" & SW_strFTColor & """>首页 前页 <a href=""" & SW_strURL & SW_lngPageNo 1 & """>后页</a> <a href=""" & SW_strURL & SW_lngTotalPage & """>末页</a>" & vbcrlf)
Else
If SW_lngPageNo >= SW_lngTotalPage Then
Response.Write ("<font color=""" & SW_strFTColor & """><a href=""" & SW_strURL & "1"">首页</a> <a href=""" & SW_strURL & SW_lngPageNo -1 & """>前页</a> " & "后页 末页" & vbcrlf)
Else
Response.Write ("<font color=""" & SW_strFTColor & """><a href=""" & SW_strURL & "1"">首页</a> <a href=""" & SW_strURL & SW_lngPageNo -1 & """>前页</a> " & "<a href=""" & SW_strURL & SW_lngPageNo 1 & """>后页</a> <a href=""" & SW_strURL & SW_lngTotalPage & """>末页</a>" & vbcrlf)
End If
End If
Response.Write (" 页次:<b>" & SW_lngPageNo & "</b>/" & SW_lngTotalPage & "页 共<b>" & SW_lngTotalRecord & "</b>条记录 <b>" & SW_intPageSize & "</b>条/页</td>" & vbcrlf)
Response.Write(" <form name=""gopage"" action=""" & SW_strFormAction & """ method=""post"">" & vbcrlf)
Response.Write(" <td> 第")
Response.Write(" <input type=""text"" name=""pageno"" size=""3"" maxlength=4 title=""请输入页号,然后回车"">页 " & vbcrlf)
Response.Write("<input type=""submit"" value=""GO""></td></form></tr>" & vbcrlf)
Case SW_intShowEnglish
If SW_lngPageNo <= 1 Then
Response.Write ("<font color=""" & SW_strFTColor & """>First Prev <a href=""" & SW_strURL & SW_lngPageNo 1 & """>Next</a> <a href=""" & SW_strURL & SW_lngTotalPage & """>Last</a>" & vbcrlf)
Else
If SW_lngPageNo >= SW_lngTotalPage Then
Response.Write ("<font color=""" & SW_strFTColor & """><a href=""" & SW_strURL & "1"">First</a> <a href=""" & SW_strURL & SW_lngPageNo -1 & """>Prev</a> " & "Next Last" & vbcrlf)
Else
Response.Write ("<font color=""" & SW_strFTColor & """><a href=""" & SW_strURL & "1"">First</a> <a href=""" & SW_strURL & SW_lngPageNo -1 & """>Prev</a> " & "<a href=""" & SW_strURL & SW_lngPageNo 1 & """>Next</a> <a href=""" & SW_strURL & SW_lngTotalPage & """>Last</a>" & vbcrlf)
End If
End If
Response.Write (" Page No:<b>" & SW_lngPageNo & "</b>/" & SW_lngTotalPage & " Total Records:<b>" & SW_lngTotalRecord & "</b> PageSize:<b>" & SW_intPageSize & "</b></td>" & vbcrlf)
Response.Write(" <form name=""gopage"" action=""" & SW_strFormAction & """ method=""post"">" & vbcrlf)
Response.Write(" <td> ")
Response.Write(" <input type=""text"" name=""pageno"" size=""3"" maxlength=4 title=""Please input pageno then enter""> " & vbcrlf)
Response.Write("<input type=""submit"" value=""GO""></td></form></tr>" & vbcrlf)
Case SW_intShowCharacter
strPages = ""
intTemp = (SW_lngPageNo \ SW_intShowPages) * SW_intShowPages
If SW_lngPageNo Mod SW_intShowPages = 0 Then intTemp = intTemp - 10
For k = 1 To SW_intShowPages

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!