JAVAEE-based-parking-manage.../tingchechang/WebContent/huiyuan/weigui_list.jsp

112 lines
3.1 KiB
Plaintext
Raw Normal View History

2023-04-26 13:50:08 +00:00
<%@ 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="gg" 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>&nbsp;</td>
</tr>
</table>
<form id="form1" name="form1" method="post" action="weigui_list.jsp"
onSubmit="return check()">
<table width="400" height="30" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td width="291">&nbsp; <20><><EFBFBD>ƺ<EFBFBD><C6BA>룺 <input type="text"
name="chepaihao" id="chepaihao" /></td>
<td width="109"><input type="submit" name="Submit"
value="<22><>ѯ" /></td>
</tr>
</table>
</form>
<table width="873" height="40" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td width="165" align="center" bgcolor="#ECE9D8"><3E><><EFBFBD>ƺ<EFBFBD><C6BA><EFBFBD></td>
<td width="136" align="center" bgcolor="#ECE9D8"><3E><>ǰ״̬</td>
<td width="572" align="center" bgcolor="#ECE9D8"><3E><>Ҫ˵<D2AA><CBB5></td>
</tr>
<%
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=gg.getCon();
if (con != null)
{
try
{
String chepaihao1="";
String chepaihao=request.getParameter("chepaihao");
if (chepaihao!=null){
chepaihao1=new String(request.getParameter("chepaihao").getBytes("ISO-8859-1"),"GB18030");
}
String sqlyy = "Select * from weigui where chepaihao='"+chepaihao1+"'";
ResultSet rs=gg.GetRs(sqlyy);
if(!rs.next())
{
out.println("<22>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱû<CAB1><C3BB><EFBFBD><EFBFBD>Ϣ");
}
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<PageSize && !rs.isAfterLast())
{
%>
<tr>
<td align="center"><%=rs.getString("chepaihao")%></td>
<td align="center"><%=rs.getString("states")%></td>
<td align="center"><%=rs.getString("shuoming")%></td>
</tr>
<%
rs.next();
i++;
}
}
}
catch (SQLException e)
{
out.println(e.getMessage());
}
finally
{
con.close();
}
}
%>
</table></td>
</tr>
</table>
</body>
</html>