<%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030" import="java.sql.*"%> Insert title here
 
<% int CountPage = 0; int CurrPage = 1; int PageSize = 12; int CountRow = 0; String StrPage = request.getParameter("Page"); if (StrPage == null) { CurrPage = 1; } else { CurrPage = Integer.parseInt(StrPage); } Connection con=yonghu.getCon(); if (con != null) { try { String sqlyy = "Select * from reg "; ResultSet rs=yonghu.GetRs(sqlyy); if(!rs.next()) { out.println("对不起,暂时没有信息"); } else{ rs.last(); int i = 0; CountRow = rs.getRow(); CountPage = (CountRow/PageSize); if (CountRow%PageSize>0) CountPage++; Integer n = (CurrPage-1)*5+1; rs.first(); rs.absolute(CurrPage*PageSize-PageSize+1); while (i <% rs.next(); i++; } } } catch (SQLException e) { out.println(e.getMessage()); } finally { con.close(); } } %>
账户 车牌号 姓名 权限 变更权限
<%=rs.getString("username")%> <%=rs.getString("chepaihao")%> <%=rs.getString("truename")%> <%=rs.getString("quanxian")%> ">变更权限
[<%=CurrPage%>/<%=CountPage %>] 每页<%=PageSize %>条 共<%=CountRow%>条记录
<% for (int i = 1;i<=CountPage;i++){%> [<%=i%>] <%}%>