<%
SUB ShowPage(strParameter)
  if m_PageNo = ""  then m_PageNo =1
  if cint(m_PageNo) < 1 or cint(m_PageNo) > m_Page then m_PageNo = 1
  Response.write "<table width='98%' border=0 align='center'  cellspacing=0 >"
  Response.write "  <tr>"
  Response.write "    <td width='49%' height=22>"
  Response.write "	 共"
  Response.write "	 <font color=red><b>"& m_RecordCount &"</b></font>"
  Response.write "	 条记录 当前第"
  Response.write "	 <font color=red><b>"& m_PageNo &"</b></font>"
  Response.Write "     页/共"
  Response.write "	 <font color=red><b>"& m_Page &"</b></font>"
  Response.write "	 页"
  Response.write "	 </td>"
  Response.write "    <td width='60%' align='right'>"

  If m_PageNo > 1 then
    response.write "<a href='?Page=1&"&strParameter&"'> <img alt='首页' src='../Include/Images/PageHome.gif' border=0 width='15' height='14'></a>"
  Else
    response.write "<img alt='首页' src='../Include/Images/PageHome.gif' border=0 width='15' height='14'>"
  End if

  if m_PageNo > 1 then
    response.write "<a href='?PageNo="&m_PageNo-1&"&"&strParameter&"'><img alt='上一页' src='../Include/Images/PageUp.gif' border=0 width='15' height='14'></a>"
  else
    response.write "<img alt='上一页' src='../Include/Images/PageUp.gif' border=0 width='15' height='14'>"
  end if

  dim m_PageNumber,m,n,i
  m_PageNumber = 4 '数字分页个数+1
  if m_PageNo-int(m_PageNumber/2) <= 1 then m = 1 else m = m_PageNo-int(m_PageNumber/2)
  if m+m_PageNumber > m_Page then 
    n = m_Page
    if m_Page-m_PageNumber <= 1 then m=1 else m = m_Page - m_PageNumber
  else
    n = m+m_PageNumber
  end if

  for i = m to n
    if pno = cint(m_PageNo) then
      response.write "&nbsp;<font color=red>"&i&"</font>"
    else
      response.write "<b>&nbsp;<a href='?PageNo="&i&"&"&strParameter&"'>"&i&"</a></b>"
    end if
  next
  Response.Write "&nbsp"

  if int(m_PageNo) < int(m_Page) then
    response.write "<a href='?PageNo="&m_PageNo+1&"&"&strParameter&"'><img alt='下一页' src='../Include/Images/PageDown.gif' border=0 width='15' height='14'></a>"
  else 
    response.write "<img alt='下一页' src='../Include/Images/PageDown.gif' border=0 width='15' height='14'>"
  end if

  if int(m_PageNo) < int(m_Page) then
    response.write "<a href='?PageNo="&m_Page&"&"&strParameter&"'><img alt='末页' src='../Include/Images/PageEnd.gif' border=0 width='15' height='14'></a>"
  else
    response.write "<img alt='末页' src='../Include/Images/PageEnd.gif' border=0 width='15' height='14'>"
  end if
  Response.write "    </td>"
  Response.write "  </tr>"
  Response.write "</table>"
End Sub
%>
