'***********************************************
' Procedure name: ShowPage
' Function: Show "previous page next page" and other information
' parameter: sfilename----link Address
' Total number of totalnumber----
' Maxperpage----number per page
' Showtotal----Show total quantity
' Showallpages---whether to use the Drop-down list to display all the pages for jump. Some pages are not available, otherwise a JS error will appear.
' Strunit----count unit
'***********************************************
Sub 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 ' ><form name= ' showpages ' method= ' Post ' action= '" & sFileName & "' > <tr><td> "
If Showtotal=true Then
Strtemp=strtemp & "Total <b>" & Totalnumber & "</b>" & Strunit & " "
End If
Strurl=joinchar (sFileName)
If Currentpage<2 Then
Strtemp=strtemp & "First prev "
Else
Strtemp=strtemp & "<a href= '" & strURL & "Page=1 ' > Home </a> "
Strtemp=strtemp & "<a href= '" & strURL & "Page=" & (CurrentPage-1) & "' > Previous </a> "
End If
If N-currentpage<1 Then
Strtemp=strtemp & "Next Page last"
Else
Strtemp=strtemp & "<a href= '" & strURL & "Page=" & (currentpage+1) & "' > Next page </a> "
Strtemp=strtemp & "<a href= '" & strURL & "Page=" & N & "' > Last </a>"
End If
Strtemp=strtemp & " page: <strong><font color=red>" & currentpage & "</font>/" & N & "</strong> page"
Strtemp=strtemp & " <b>" & Maxperpage & "</b>" & strunit & "/page"
If Showallpages=true Then
Strtemp=strtemp & " goto: <select name= ' page ' size= ' 1 ' onchange= ' javascript:submit () ' > '
For i = 1 to n
Strtemp=strtemp & "<option value= '" & I & "'"
If CInt (currentpage) =cint (i) then Strtemp=strtemp & "selected"
Strtemp=strtemp & "> First" & I & "Page </option>"
Next
Strtemp=strtemp & "</select>"
End If
Strtemp=strtemp & "</td></tr></form></table>"
Response.Write strtemp
End Sub
'***********************************************
' Procedure name: Enshowpage
' Function: Show "previous page next page" and other information
' parameter: sfilename----link Address
' Total number of totalnumber----
' Maxperpage----number per page
' Showtotal----Show total quantity
' Showallpages---whether to use the Drop-down list to display all the pages for jump. Some pages are not available, otherwise a JS error will appear.
' Strunit----count unit
'***********************************************
Sub Enshowpage (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 ' ><form name= ' showpages ' method= ' Post ' action= '" & sFileName & "' > <tr><td> "
If Showtotal=true Then
Strtemp=strtemp & "Total <b>" & Totalnumber & "</b>" & Strunit & " "
End If
Strurl=joinchar (sFileName)
If Currentpage<2 Then
Strtemp=strtemp & "The previous "
Else
Strtemp=strtemp & "<a href= '" & strURL & "Page=1 ' >First</a> "
Strtemp=strtemp & "<a href=" "& strURL &" Page= "& (CurrentPage-1) &" ' >Previous</a>& nbsp; "
End If
If N-currentpage<1 Then
Strtemp=strtemp & "Next Last"
Else
Strtemp=strtemp & "<a href= '" & strURL & "Page=" & (currentpage+1) & "' >next</a>  ;"
Strtemp=strtemp & "<a href= '" & strURL & "Page=" & N & "' >Last</a>"
End If
Strtemp=strtemp & " Page no.:<strong><font color=red> "& currentpage &" </font>/"& N &" </strong> Page "
Strtemp=strtemp & " <b>" & Maxperpage & "</b>" & Strunit & "/page"
If Showallpages=true Then
Strtemp=strtemp & " Turn to:<select name= ' page ' size= ' 1 ' onchange= ' javascript:submit () ' > '
For i = 1 to n
Strtemp=strtemp & "<option value= '" & I & "'"
If CInt (currentpage) =cint (i) then Strtemp=strtemp & "selected"
Strtemp=strtemp & ">no." & I & "Page</option>"
Next
Strtemp=strtemp & "</select>"
End If
Strtemp=strtemp & "</td></tr></form></table>"
Response.Write strtemp
End Sub