119 lines
3.4 KiB
Plaintext
119 lines
3.4 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=GB18030"
|
|
pageEncoding="GB18030" import="java.sql.*"%>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<jsp:useBean id="yonghu" class="com.DB" scope="page" />
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>Insert title here</title>
|
|
<link href="../css/style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body>
|
|
<table width="985" height="548" border="0" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<td valign="top" background="../image/RIGHT.jpg"><table
|
|
width="985" height="50" border="0" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td> </td>
|
|
</tr>
|
|
</table>
|
|
<table width="957" border="0" align="center" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<td width="144" height="30" align="center" bgcolor="#F0F0F0">账户</td>
|
|
<td width="144" align="center" bgcolor="#F0F0F0">密码</td>
|
|
<td width="163" align="center" bgcolor="#F0F0F0">车牌号</td>
|
|
<td width="147" align="center" bgcolor="#F0F0F0">金额</td>
|
|
<td width="122" align="center" bgcolor="#F0F0F0">姓名</td>
|
|
<td width="164" align="center" bgcolor="#F0F0F0">电话</td>
|
|
<td width="73" align="center" bgcolor="#F0F0F0">删除</td>
|
|
</tr>
|
|
<%
|
|
int C_page = 0;
|
|
int C_row = 1;
|
|
int M_size = 12;
|
|
int CountRow = 0;
|
|
String StrPage = request.getParameter("Page");
|
|
if (StrPage == null)
|
|
{
|
|
C_row = 1;
|
|
}
|
|
else
|
|
{
|
|
C_row = 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();
|
|
C_page = (CountRow/M_size);
|
|
if (CountRow%M_size>0)
|
|
C_page++;
|
|
Integer n = (C_row-1)*5+1;
|
|
rs.first();
|
|
rs.absolute(C_row*M_size-M_size+1);
|
|
while (i<M_size && !rs.isAfterLast())
|
|
{
|
|
%>
|
|
<tr>
|
|
<td height="25" width="144" align="center"><%=rs.getString("username")%></td>
|
|
<td align="center" width="144"><%=rs.getString("password")%></td>
|
|
<td align="center" width="163"><%=rs.getString("chepaihao")%></td>
|
|
<td align="center" width="147"><%=rs.getString("jine")%></td>
|
|
<td align="center" width="122"><%=rs.getString("truename")%></td>
|
|
<td align="center" width="164"><%=rs.getString("tel")%></td>
|
|
<td align="center"><a
|
|
href="delete.jsp?id=<%=rs.getString("id")%>&j=1">删除</a></td>
|
|
</tr>
|
|
<%
|
|
rs.next();
|
|
i++;
|
|
}
|
|
}
|
|
}
|
|
|
|
catch (SQLException e)
|
|
{
|
|
out.println(e.getMessage());
|
|
}
|
|
finally
|
|
{
|
|
con.close();
|
|
}
|
|
}
|
|
%>
|
|
</table>
|
|
|
|
<table width="700" height="53" border="0" cellpadding="0"
|
|
cellspacing="0">
|
|
<tr>
|
|
<td width="205" height="53" align="center">[<%=C_row%>/<%=C_page %>]
|
|
每页<%=M_size %>条 共<%=CountRow%>条记录
|
|
</td>
|
|
<td width="495" align="left">
|
|
<div align="left">
|
|
<% for (int i = 1;i<=C_page;i++){%>
|
|
<a href="siji_list.jsp?Page=<%=i%>">[<%=i%>]
|
|
</a>
|
|
<%}%>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html> |