⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 navigate.asp

📁 网络办公系统源码
💻 ASP
字号:
<%

Function GetNavigate(sFileName,iRecordCount,iMaxPageCount,iiCurrentPageIndexIndex,blShowRecordCount,blShowPageSize,sUnit)
	dim n, i,sTmp,sUrl
	
	if iRecordCount mod iMaxPageCount=0 then
    	n= iRecordCount \ iMaxPageCount
  	else
    	n= iRecordCount \ iMaxPageCount+1
  	end if

    sUrl=JoinChar(sFileName)

  	sTmp= "<table align='center' class=f9><form name='Navigate' method='Get' action='" & sFileName & "'><tr><td class='t1'>"
	if blShowRecordCount=true then 
		sTmp=sTmp & "共" & iRecordCount & sUnit & "&nbsp;"
	end if
    
	sTmp=sTmp & "&nbsp;" & iMaxPageCount & "" & sUnit & "/页"

   	sTmp=sTmp & "&nbsp;当前:<font color=red>" & iCurrentPageIndex & "</font>/" & n & "页 "

	
  	if iCurrentPageIndex<2 then
    		sTmp=sTmp & "首页 上一页&nbsp;"
  	else
    		sTmp=sTmp & "<a href='" & sUrl & "page=1'>首页</a>&nbsp;"
    		sTmp=sTmp & "<a href='" & sUrl & "page=" & (iCurrentPageIndex-1) & "'>上一页</a>&nbsp;"
  	end if

  	if n-iCurrentPageIndex<1 then
    		sTmp=sTmp & "下一页 尾页"
  	else
    		sTmp=sTmp & "<a href='" & sUrl & "page=" & (iCurrentPageIndex+1) & "'>下一页</a>&nbsp;"
    		sTmp=sTmp & "<a href='" & sUrl & "page=" & n & "'>尾页</a>"
  	end if

	sTmp=sTmp & "</td></tr></form></table>"
	GetNavigate=sTmp
End Function

function JoinChar(sUrl)
	if sUrl="" then
		JoinChar=""
		exit function
	end if
	if InStr(sUrl,"?")<len(sUrl) then 
		if InStr(sUrl,"?")>1 then
			if InStr(sUrl,"&")<len(sUrl) then 
				JoinChar=sUrl & "&"
			else
				JoinChar=sUrl
			end if
		else
			JoinChar=sUrl & "?"
		end if
	else
		JoinChar=sUrl
	end if
end function

Sub GetCurrentPageIndex()  '取得当前页码
	if Request.QueryString("page")<>"" then
		iCurrentPageIndex=Cint(trim(Request.QueryString("page")))
		if iCurrentPageIndex<1 then  iCurrentPageIndex=1
	else
		iCurrentPageIndex=1
	End if
End Sub

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -