上传代码文件
This commit is contained in:
parent
abc44d4595
commit
4a937277dd
|
@ -0,0 +1,2 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding/<project>=GBK
|
|
@ -0,0 +1,7 @@
|
|||
#Thu Oct 13 16:05:16 CST 2016
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="tingchechang">
|
||||
<wb-resource deploy-path="/" source-path="/WebContent" />
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src" />
|
||||
<property name="context-root" value="tingchechang" />
|
||||
<property name="java-output-path" value="/tingchechang/build/classes" />
|
||||
</wb-module>
|
||||
</project-modules>
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
|
||||
<fixed facet="jst.java" />
|
||||
<fixed facet="jst.web" />
|
||||
<installed facet="jst.java" version="6.0" />
|
||||
<installed facet="jst.web" version="2.5" />
|
||||
<installed facet="wst.jsdt.web" version="1.0" />
|
||||
</faceted-project>
|
|
@ -0,0 +1 @@
|
|||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
|
|
@ -0,0 +1 @@
|
|||
Window
|
|
@ -0,0 +1,3 @@
|
|||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
||||
id="WebApp_ID" version="3.0">
|
||||
|
||||
<display-name>tingchechang</display-name>
|
||||
<welcome-file-list>
|
||||
<welcome-file>index.html</welcome-file>
|
||||
<welcome-file>index.htm</welcome-file>
|
||||
<welcome-file>index.jsp</welcome-file>
|
||||
<welcome-file>default.html</welcome-file>
|
||||
<welcome-file>default.htm</welcome-file>
|
||||
<welcome-file>default.jsp</welcome-file>
|
||||
</welcome-file-list>
|
||||
<servlet>
|
||||
<description></description>
|
||||
<display-name>Cw_deleteServlet</display-name>
|
||||
<servlet-name>Cw_deleteServlet</servlet-name>
|
||||
<servlet-class>com.servlet.Cw_deleteServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Cw_deleteServlet</servlet-name>
|
||||
<url-pattern>/Cw_deleteServlet</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description></description>
|
||||
<display-name>Wg_delServlet</display-name>
|
||||
<servlet-name>Wg_delServlet</servlet-name>
|
||||
<servlet-class>com.servlet.Wg_delServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Wg_delServlet</servlet-name>
|
||||
<url-pattern>/Wg_delServlet</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<description></description>
|
||||
<display-name>Hf_Servlet</display-name>
|
||||
<servlet-name>Hf_Servlet</servlet-name>
|
||||
<servlet-class>com.servlet.Hf_Servlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>Hf_Servlet</servlet-name>
|
||||
<url-pattern>/Hf_Servlet</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
|
@ -0,0 +1,56 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<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> <% String username=new String(request.getParameter("username").getBytes("ISO-8859-1"),"GB18030"); %>
|
||||
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="biangeng_chuli.jsp">
|
||||
<table width="339" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="30" colspan="2" align="center">权限更改</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">用户账户: <input name="username"
|
||||
type="text" id="username" value="<%=username%>" readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="25">权限类别: <select name="quanxian2" id="quanxian">
|
||||
<option value="会员" selected="selected">会员</option>
|
||||
<option value="管理员">管理员</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="35">
|
||||
<input type="submit"
|
||||
name="Submit" value="更改权限" />
|
||||
|
||||
<input type="button"
|
||||
name="Submit2" value="放弃更改"
|
||||
onclick="location.href='quanxian_list.jsp'" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,48 @@
|
|||
<%@ 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="info" class="com.DB" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
|
||||
String username=new String(request.getParameter("username").getBytes("ISO-8859-1"),"GB18030");
|
||||
String quanxian2=new String(request.getParameter("quanxian2").getBytes("ISO-8859-1"),"GB18030");
|
||||
String sql_password="select password from reg where username='"+username+"'";
|
||||
String password=info.GetRsValue(sql_password);
|
||||
System.out.println(password+"jsp===========password");
|
||||
|
||||
Connection con=info.getCon();
|
||||
// 添加信息的SQL语句
|
||||
String sql = "update reg set quanxian='"+quanxian2 +"' where username='"+username+"'";
|
||||
// 获取PreparedStatement
|
||||
PreparedStatement ps = con.prepareStatement(sql);
|
||||
int row = ps.executeUpdate();
|
||||
ps.executeUpdate();
|
||||
if(quanxian2.equals("管理员")){
|
||||
String sql2="insert into login (username,password) values ('" +username+ "','" +password+"')";
|
||||
int row2=info.GetCount(sql2);
|
||||
}else{
|
||||
String sql3="delete from login where username='"+username+"'";
|
||||
info.executeUpdate(sql3);
|
||||
}
|
||||
if(row > 0){
|
||||
|
||||
out.println("<script>alert('变更成功!');window.location.href='quanxian_list.jsp';</script>");
|
||||
}
|
||||
// 关闭PreparedStatement,释放资源
|
||||
ps.close();
|
||||
// 关闭Connection,释放资源
|
||||
con.close();
|
||||
} catch (Exception e) {
|
||||
out.print("变更失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,42 @@
|
|||
<%@ 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="reg" class="com.DB" scope="page" />
|
||||
<jsp:useBean id="times" class="com.Shijian" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
String chewei_no=new String(request.getParameter("chewei_no").getBytes("ISO-8859-1"),"GB18030");
|
||||
String chewei_type=new String(request.getParameter("chewei_type").getBytes("ISO-8859-1"),"GB18030");
|
||||
String chewei_state=new String(request.getParameter("chewei_state").getBytes("ISO-8859-1"),"GB18030");
|
||||
String chewei_didian=new String(request.getParameter("chewei_didian").getBytes("ISO-8859-1"),"GB18030");
|
||||
|
||||
Connection con=reg.getCon();
|
||||
String sqlt="select * from chewei where chewei_no='"+chewei_no+"'";
|
||||
ResultSet rs=reg.GetRs(sqlt);
|
||||
|
||||
if(rs.next()){
|
||||
out.println("<script lanage='javascript'>alert('车位编号已被占用');javascript:history.go(-1);</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
// 添加信息的SQL语句
|
||||
String sql = "insert into chewei(chewei_no,chewei_type,chewei_state,chewei_didian) values('"+chewei_no+"','"+chewei_type+"','"+chewei_state+"','"+chewei_didian+"')";
|
||||
int row = reg.GetCount(sql);
|
||||
|
||||
if(row > 0){
|
||||
out.println("<script>alert('车位添加成功!');window.location.href='chewei_mg.jsp';</script>");
|
||||
}
|
||||
con.close();}
|
||||
} catch (Exception e) {
|
||||
out.print("车位添加失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,57 @@
|
|||
<%@ 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="db" class="com.DB" scope="page" />
|
||||
<jsp:useBean id="encoding" class="com.Char" />
|
||||
<jsp:useBean id="popDialog" class="com.Dialog" />
|
||||
<jsp:useBean id="chwei" class="com.edit.Chewei" />
|
||||
<jsp:useBean id="shijian" class="com.Shijian" />
|
||||
<jsp:setProperty property="*" name="chwei" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
|
||||
String chewei_no=encoding.toString(request.getParameter("chewei_no"));
|
||||
String chewei_type=encoding.toString(request.getParameter("chewei_type"));
|
||||
String chewei_state=encoding.toString(request.getParameter("chewei_state"));
|
||||
String chewei_didian=encoding.toString(request.getParameter("chewei_didian"));
|
||||
|
||||
Connection conn=db.getCon();
|
||||
// 添加图书信息的SQL语句
|
||||
String sql = "insert into chewei(chewei_no,chewei_type,chewei_state,chewei_didian)values(?,?,?,?)";
|
||||
// 获取PreparedStatement
|
||||
|
||||
PreparedStatement ps = conn.prepareStatement(sql);
|
||||
|
||||
ps.setString(1,encoding.toString(chwei.getChewei_no()));
|
||||
|
||||
ps.setString(2,encoding.toString(chwei.getChewei_type()));
|
||||
|
||||
ps.setString(3,encoding.toString(chwei.getChewei_state()));
|
||||
|
||||
ps.setString(4,encoding.toString(chwei.getChewei_didian()));
|
||||
|
||||
|
||||
int row = ps.executeUpdate();
|
||||
|
||||
// 判断是否更新成功
|
||||
if(row > 0){
|
||||
out.println(popDialog.messageBox("车位添加成功!","chewei_mg.jsp"));
|
||||
}
|
||||
// 关闭PreparedStatement,释放资源
|
||||
ps.close();
|
||||
// 关闭Connection,释放资源
|
||||
conn.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
out.print("车位添加失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,178 @@
|
|||
<%@ 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>
|
||||
<script language="javascript">
|
||||
function check(){
|
||||
if(form1.chewei_no.value==""){
|
||||
alert("请输入车位编号!");form1.chewei_no.focus();return false;
|
||||
} }
|
||||
</script>
|
||||
<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>
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="chewei_chuli.jsp" onSubmit="return check()">
|
||||
<table width="493" border="0" align="center" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td height="30" colspan="2" align="center">车位添加</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">车位编号: <input name="chewei_no"
|
||||
type="text" id="chewei_no" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">车位类型: <select name="chewei_type"
|
||||
id="chewei_type">
|
||||
<option value="小型车">小型车</option>
|
||||
<option value="中型车" selected="selected">中型车</option>
|
||||
<option value="大型车">大型车</option>
|
||||
<option value="高档车">高档车</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">车位状态: <select
|
||||
name="chewei_state" id="chewei_state">
|
||||
<option value="空闲" selected="selected">空闲</option>
|
||||
<option value="预订">预订</option>
|
||||
<option value="使用">使用</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">车位位置: <select
|
||||
name="chewei_didian">
|
||||
<option value="" selected>选择</option>
|
||||
<option value="A区">A区</option>
|
||||
<option value="B区">B区</option>
|
||||
<option value="C区">C区</option>
|
||||
<option value="D区">D区</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="35">
|
||||
<input
|
||||
type="submit" name="Submit" value="添加" /> <input
|
||||
type="reset" name="Submit2" value="重置" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<table width="557" height="55" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="87" height="31" align="center" bgcolor="#ECE9D8">车位编号</td>
|
||||
<td width="87" align="center" bgcolor="#ECE9D8">车位类型</td>
|
||||
<td width="73" align="center" bgcolor="#ECE9D8">当前状态</td>
|
||||
<td width="264" align="center" bgcolor="#ECE9D8">车位位置</td>
|
||||
<td width="46" align="center" bgcolor="#ECE9D8">删除</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 sqlyy = "Select * from chewei ";
|
||||
|
||||
ResultSet rs=gg.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<PageSize && !rs.isAfterLast())
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td align="center"><%=rs.getString("chewei_no")%></td>
|
||||
<td align="center"><%=rs.getString("chewei_type")%></td>
|
||||
<td align="center"><%=rs.getString("chewei_state")%></td>
|
||||
<td align="center"><%=rs.getString("chewei_didian")%></td>
|
||||
<td align="center"><a
|
||||
href="../Cw_deleteServlet?id=<%=rs.getString("id")%>">删除</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">[<%=CurrPage%>/<%=CountPage %>]
|
||||
每页<%=PageSize %>条 共<%=CountRow%>条记录
|
||||
</td>
|
||||
<td width="495" align="left">
|
||||
<div align="left">
|
||||
<% for (int i = 1;i<=CountPage;i++){%>
|
||||
<a href="chewei_mg.jsp?Page=<%=i%>">[<%=i%>]
|
||||
</a>
|
||||
<%}%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,81 @@
|
|||
<%@ 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> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="600" height="40" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="165" height="30" align="center" bgcolor="#ECE9D8">车位位置</td>
|
||||
<td width="165" align="center" bgcolor="#ECE9D8">空闲车位</td>
|
||||
<td width="136" align="center" bgcolor="#ECE9D8">预订车位</td>
|
||||
<td width="136" align="center" bgcolor="#ECE9D8">使用车位</td>
|
||||
</tr>
|
||||
<%
|
||||
String sqlt="select distinct(chewei_didian) from chewei";
|
||||
ResultSet rs=gg.GetRs(sqlt);
|
||||
try{
|
||||
while(rs.next()){
|
||||
%>
|
||||
<tr>
|
||||
<td align="center"><%=rs.getString("chewei_didian")%></td>
|
||||
<td align="center">
|
||||
<%
|
||||
|
||||
String sqlo1="select * from chewei where chewei_state='空闲' and chewei_didian='"+rs.getString("chewei_didian")+"'";
|
||||
ResultSet rs31=gg.GetRs(sqlo1);
|
||||
int i1=0;
|
||||
while(rs31.next()){
|
||||
i1=i1+1;
|
||||
}
|
||||
%> <% out.println (i1); %>
|
||||
|
||||
|
||||
</td>
|
||||
<td align="center">
|
||||
<%
|
||||
|
||||
String sqlo12="select * from chewei where chewei_state='预订' and chewei_didian='"+rs.getString("chewei_didian")+"' ";
|
||||
ResultSet rs312=gg.GetRs(sqlo12);
|
||||
int i12=0;
|
||||
while(rs312.next()){
|
||||
i12=i12+1;
|
||||
}
|
||||
%> <% out.println (i12); %>
|
||||
|
||||
</td>
|
||||
<td align="center">
|
||||
<%
|
||||
|
||||
String sqlo13="select * from chewei where chewei_state='使用' and chewei_didian='"+rs.getString("chewei_didian")+"'";
|
||||
ResultSet rs313=gg.GetRs(sqlo13);
|
||||
int i13=0;
|
||||
while(rs313.next()){
|
||||
i13=i13+1;
|
||||
}
|
||||
%> <% out.println (i13); %>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<%}}catch (Exception e){}%>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,68 @@
|
|||
<%@ 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="delete" class="com.DB" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
|
||||
String j=request.getParameter("j");
|
||||
int pp=Integer.parseInt(j);
|
||||
if (pp==1) {
|
||||
String id=request.getParameter("id");
|
||||
String sqlo="delete from reg where id='"+id+"'";
|
||||
delete.executeUpdate(sqlo);
|
||||
out.println("<script lanage='javascript'>alert('删除成功!!');window.location.href='siji_list.jsp';</script>");
|
||||
}
|
||||
|
||||
if (pp==2) {
|
||||
String id=request.getParameter("id");
|
||||
String sqlo="delete from reg where id='"+id+"'";
|
||||
delete.executeUpdate(sqlo);
|
||||
out.println("<script lanage='javascript'>alert('删除成功!!');window.location.href='ck_list.jsp';</script>");
|
||||
}
|
||||
|
||||
if (pp==3) {
|
||||
String id=request.getParameter("id");
|
||||
String sqlo="delete from jifei where id='"+id+"'";
|
||||
delete.executeUpdate(sqlo);
|
||||
out.println("<script lanage='javascript'>alert('删除成功!!');window.location.href='kemu_mg.jsp';</script>");
|
||||
}
|
||||
|
||||
if (pp==4) {
|
||||
String id=request.getParameter("id");
|
||||
String sqlo="delete from gg where id='"+id+"'";
|
||||
delete.executeUpdate(sqlo);
|
||||
out.println("<script lanage='javascript'>alert('删除成功!!');window.location.href='kecheng_mg.jsp';</script>");
|
||||
}
|
||||
|
||||
if (pp==5) {
|
||||
String id=request.getParameter("id");
|
||||
String sqlo="delete from feiyong where id='"+id+"'";
|
||||
delete.executeUpdate(sqlo);
|
||||
out.println("<script lanage='javascript'>alert('删除成功!!');window.location.href='shoufei_list.jsp';</script>");
|
||||
}
|
||||
|
||||
if (pp==6) {
|
||||
String id=request.getParameter("id");
|
||||
String sqlo="delete from dingdan where id='"+id+"'";
|
||||
delete.executeUpdate(sqlo);
|
||||
out.println("<script lanage='javascript'>alert('删除成功!!');window.location.href='../chengke/dingdan_quxiao.jsp';</script>");
|
||||
}
|
||||
|
||||
|
||||
if (pp==7) {
|
||||
String id=request.getParameter("id");
|
||||
String sqlo="delete from jiaoliu where id='"+id+"'";
|
||||
delete.executeUpdate(sqlo);
|
||||
out.println("<script lanage='javascript'>alert('删除成功!!');window.location.href='../chengke/jiaoliu_gl.jsp';</script>");
|
||||
}
|
||||
|
||||
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
<link href="../css/style.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<frameset rows="104,*" cols="*" frameborder="no" border="0"
|
||||
framespacing="0">
|
||||
<frame src="../top.jsp" name="topFrame" scrolling="No"
|
||||
noresize="noresize" id="topFrame" title="topFrame" />
|
||||
<frameset rows="*" cols="198,*" framespacing="0" frameborder="no"
|
||||
border="0">
|
||||
<frame src="left.jsp" name="leftFrame" noresize="noresize"
|
||||
id="leftFrame" title="leftFrame" />
|
||||
<frame src="../right.jsp" name="mainFrame" id="mainFrame"
|
||||
title="mainFrame" />
|
||||
</frameset>
|
||||
</frameset>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,44 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
<link href="../css/style.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<table width="198" height="545" border="0" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top"><img src="../image/LEFT.jpg" width="198"
|
||||
height="545" border="0" usemap="#Map" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<map name="Map" id="Map">
|
||||
<area shape="rect" coords="60,82,154,106" href="siji_list.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="57,108,151,134" href="quanxian_list.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="57,168,146,192" href="zixun_add.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="58,197,148,220" href="zixun_mg.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="57,249,147,276" href="chewei_mg.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="58,280,146,302" href="chewei_tongji.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="59,335,156,356" href="shoufei_list.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="62,387,154,411" href="weigui_mg.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="61,418,152,442" href="weigui_huifu.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="58,473,149,496" href="tingche_tongji.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="59,498,149,526" href="../out.jsp"
|
||||
target="_parent" />
|
||||
</map>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,115 @@
|
|||
<%@ 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="666" border="0" align="center" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td width="144" height="30" align="center" bgcolor="#F0F0F0">账户</td>
|
||||
<td width="163" 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 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<PageSize && !rs.isAfterLast())
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td height="25" width="144" align="center"><%=rs.getString("username")%></td>
|
||||
<td align="center" width="163"><%=rs.getString("chepaihao")%></td>
|
||||
<td align="center" width="122"><%=rs.getString("truename")%></td>
|
||||
<td align="center" width="164"><%=rs.getString("quanxian")%></td>
|
||||
<td align="center"><a
|
||||
href="biangeng.jsp?username=<%=rs.getString("username")%>">变更权限</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">[<%=CurrPage%>/<%=CountPage %>]
|
||||
每页<%=PageSize %>条 共<%=CountRow%>条记录
|
||||
</td>
|
||||
<td width="495" align="left">
|
||||
<div align="left">
|
||||
<% for (int i = 1;i<=CountPage;i++){%>
|
||||
<a href="quanxian_list.jsp?Page=<%=i%>">[<%=i%>]
|
||||
</a>
|
||||
<%}%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,122 @@
|
|||
<%@ 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> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="shoufei_list.jsp" onSubmit="return check()">
|
||||
<table width="400" height="30" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="227"> 消费检索: <select name="yonghu_type">
|
||||
<option value="" selected>请选出查询方式</option>
|
||||
<option value="会员支付">会员支付</option>
|
||||
<option value="顾客支付">顾客支付</option>
|
||||
</select></td>
|
||||
<td width="173"><input type="submit" name="Submit"
|
||||
value="信息查询" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<table width="873" height="55" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="139" height="31" align="center" bgcolor="#ECE9D8">账户信息</td>
|
||||
<td width="109" align="center" bgcolor="#ECE9D8">支付方式</td>
|
||||
<td width="81" align="center" bgcolor="#ECE9D8">支付金额</td>
|
||||
<td width="355" align="center" bgcolor="#ECE9D8">备注信息</td>
|
||||
<td width="189" align="center" bgcolor="#ECE9D8">支付时间</td>
|
||||
<td width="30" align="center" bgcolor="#ECE9D8">删除</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
int CountPage = 0;
|
||||
int CurrPage = 1;
|
||||
int PageSize = 50;
|
||||
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 yonghu_type1="";
|
||||
String yonghu_type=request.getParameter("yonghu_type");
|
||||
if (yonghu_type!=null){
|
||||
yonghu_type1=new String(request.getParameter("yonghu_type").getBytes("ISO-8859-1"),"GB18030");
|
||||
}
|
||||
String sqlyy = "Select * from feiyong where yonghu_type='"+yonghu_type1+"'";
|
||||
|
||||
ResultSet rs=gg.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<PageSize && !rs.isAfterLast())
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td align="center"><%=rs.getString("username")%></td>
|
||||
<td align="center"><%=rs.getString("zhifu_type")%></td>
|
||||
<td align="center"><%=rs.getString("jine")%></td>
|
||||
<td align="center"><%=rs.getString("beizhu")%></td>
|
||||
<td align="center"><%=rs.getString("shijian")%></td>
|
||||
<td align="center"><a
|
||||
href="delete.jsp?id=<%=rs.getString("id")%>&j=5">删除</a></td>
|
||||
</tr>
|
||||
<%
|
||||
rs.next();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
catch (SQLException e)
|
||||
{
|
||||
out.println(e.getMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,119 @@
|
|||
<%@ 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>
|
|
@ -0,0 +1,77 @@
|
|||
<%@ 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> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="330" height="56" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="165" height="30" align="center" bgcolor="#ECE9D8">支付方式</td>
|
||||
<td width="165" align="center" bgcolor="#ECE9D8">支付次数</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td height="26" align="center">刷卡</td>
|
||||
<td align="center">
|
||||
<%
|
||||
|
||||
String sqlo1="select * from feiyong where zhifu_type='刷卡'";
|
||||
ResultSet rs31=gg.GetRs(sqlo1);
|
||||
int i1=0;
|
||||
while(rs31.next()){
|
||||
i1=i1+1;
|
||||
}
|
||||
%> <% out.println (i1); %>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="26" align="center">现金</td>
|
||||
<td align="center">
|
||||
<%
|
||||
|
||||
String sqlo2="select * from feiyong where zhifu_type='现金'";
|
||||
ResultSet rs32=gg.GetRs(sqlo2);
|
||||
int i2=0;
|
||||
while(rs32.next()){
|
||||
i2=i2+1;
|
||||
}
|
||||
%> <% out.println (i2); %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="26" align="center">支付宝</td>
|
||||
<td align="center">
|
||||
<%
|
||||
String sqlo3="select * from feiyong where zhifu_type='支付宝'";
|
||||
ResultSet rs33=gg.GetRs(sqlo3);
|
||||
int i3=0;
|
||||
while(rs33.next()){
|
||||
i3=i3+1;
|
||||
}
|
||||
%> <% out.println (i3); %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,42 @@
|
|||
<%@ 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="reg" class="com.DB" scope="page" />
|
||||
<jsp:useBean id="times" class="com.Shijian" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
String username=new String(request.getParameter("username").getBytes("ISO-8859-1"),"GB18030");
|
||||
String chepaihao=new String(request.getParameter("chepaihao").getBytes("ISO-8859-1"),"GB18030");
|
||||
String states=new String(request.getParameter("states").getBytes("ISO-8859-1"),"GB18030");
|
||||
String shuoming=new String(request.getParameter("shuoming").getBytes("ISO-8859-1"),"GB18030");
|
||||
|
||||
Connection con=reg.getCon();
|
||||
String sqlt="select * from weigui where chepaihao='"+chepaihao+"'";
|
||||
ResultSet rs=reg.GetRs(sqlt);
|
||||
|
||||
if(rs.next()){
|
||||
out.println("<script lanage='javascript'>alert('车牌号已被录入');javascript:history.go(-1);</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
// 添加信息的SQL语句
|
||||
String sql = "insert into weigui(username,chepaihao,states,shuoming) values('"+username+"','"+chepaihao+"','"+states+"','"+shuoming+"')";
|
||||
int row = reg.GetCount(sql);
|
||||
|
||||
if(row > 0){
|
||||
out.println("<script>alert('违规添加成功!');window.location.href='weigui_mg.jsp';</script>");
|
||||
}
|
||||
con.close();}
|
||||
} catch (Exception e) {
|
||||
out.print("违规添加失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,115 @@
|
|||
<%@ 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> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="weigui_huifu.jsp" onSubmit="return check()">
|
||||
<table width="400" height="30" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="291"> 车牌号码: <input type="text"
|
||||
name="chepaihao" id="chepaihao" /></td>
|
||||
<td width="109"><input type="submit" name="Submit"
|
||||
value="查询" /></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">车牌号码</td>
|
||||
<td width="136" align="center" bgcolor="#ECE9D8">当前状态</td>
|
||||
<td width="572" align="center" bgcolor="#ECE9D8">必要说明</td>
|
||||
<td width="60" align="center" bgcolor="#ECE9D8">恢复车牌</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("对不起,暂时没有信息");
|
||||
}
|
||||
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>
|
||||
<td align="center"><a
|
||||
href="../Hf_Servlet?id=<%=rs.getString("id")%>">恢复车牌</a></td>
|
||||
</tr>
|
||||
<%
|
||||
rs.next();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
catch (SQLException e)
|
||||
{
|
||||
out.println(e.getMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,161 @@
|
|||
<%@ 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>
|
||||
<script language="javascript">
|
||||
function check(){
|
||||
if(form1.chepaihao.value==""){
|
||||
alert("输入车牌号");form1.chepaihao.focus();return false;
|
||||
} }
|
||||
</script>
|
||||
<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>
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="weigui_add_chuli.jsp" onSubmit="return check()">
|
||||
<table width="493" border="0" align="center" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td height="30" colspan="2" align="center">违规添加</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">用户账户: <input name="username"
|
||||
type="text" id="username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">车牌号码: <input name="chepaihao"
|
||||
type="text" id="chepaihao" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">车牌状态: <input name="states"
|
||||
type="text" id="states" value="黑名单" readonly="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">违规说明: <textarea name="shuoming"
|
||||
cols="40" rows="3" id="shuoming"></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="35">
|
||||
<input
|
||||
type="submit" name="Submit" value="添加" /> <input
|
||||
type="reset" name="Submit2" value="重置" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<table width="873" height="40" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="145" align="center" bgcolor="#ECE9D8">车牌号码</td>
|
||||
<td width="124" align="center" bgcolor="#ECE9D8">当前状态</td>
|
||||
<td width="446" align="center" bgcolor="#ECE9D8">必要说明</td>
|
||||
<td width="100" align="center" bgcolor="#ECE9D8">用户名</td>
|
||||
<td width="58" align="center" bgcolor="#ECE9D8">删除</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 sqlyy = "Select * from weigui ";
|
||||
|
||||
ResultSet rs=gg.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<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>
|
||||
<td align="center"><%=rs.getString("username")%></td>
|
||||
<td align="center"><a
|
||||
href="../Wg_delServlet?id=<%=rs.getString("id")%>">删除</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">[<%=CurrPage%>/<%=CountPage %>]
|
||||
每页<%=PageSize %>条 共<%=CountRow%>条记录
|
||||
</td>
|
||||
<td width="495" align="left">
|
||||
<div align="left">
|
||||
<% for (int i = 1;i<=CountPage;i++){%>
|
||||
<a href="weigui_mg.jsp?Page=<%=i%>">[<%=i%>]
|
||||
</a>
|
||||
<%}%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,48 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<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>
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="zixun_add_chuli.jsp">
|
||||
<table width="493" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="30" colspan="2" align="center">公告添加</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">公告名称: <input name="Gg_titile"
|
||||
type="text" id="Gg_titile" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="25">公告内容: <textarea name="Gg_neirong" cols="40"
|
||||
rows="3" id="Gg_neirong"></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="35"> <input type="submit"
|
||||
name="Submit" value="添加" /> <input type="reset"
|
||||
name="Submit2" value="重置" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,41 @@
|
|||
<%@ 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="reg" class="com.DB" scope="page" />
|
||||
<jsp:useBean id="times" class="com.Shijian" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
String Gg_titile=new String(request.getParameter("Gg_titile").getBytes("ISO-8859-1"),"GB18030");
|
||||
String Gg_neirong=new String(request.getParameter("Gg_neirong").getBytes("ISO-8859-1"),"GB18030");
|
||||
|
||||
|
||||
Connection con=reg.getCon();
|
||||
String sqlt="select * from gg where Gg_titile='"+Gg_titile+"'";
|
||||
ResultSet rs=reg.GetRs(sqlt);
|
||||
|
||||
if(rs.next()){
|
||||
out.println("<script lanage='javascript'>alert('公告标题已被占用');javascript:history.go(-1);</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
// 添加信息的SQL语句
|
||||
String sql = "insert into gg(Gg_titile,Gg_neirong,shijian) values('"+Gg_titile+"','"+Gg_neirong+"','"+times.showTodayTime()+"')";
|
||||
int row = reg.GetCount(sql);
|
||||
|
||||
if(row > 0){
|
||||
out.println("<script>alert('添加成功!');window.location.href='zixun_add.jsp';</script>");
|
||||
}
|
||||
con.close();}
|
||||
} catch (Exception e) {
|
||||
out.print("添加失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,118 @@
|
|||
<%@ 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="kemu" class="com.DB" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<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="916" border="0" align="center" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td width="70" height="30" align="center" bgcolor="#F0F0F0">公告编号</td>
|
||||
<td width="182" align="center" bgcolor="#F0F0F0">公告名称</td>
|
||||
<td width="401" align="center" bgcolor="#F0F0F0">公告内容</td>
|
||||
<td width="161" align="center" bgcolor="#F0F0F0">时间</td>
|
||||
<td width="51" align="center" bgcolor="#F0F0F0">修改</td>
|
||||
<td width="51" align="center" bgcolor="#F0F0F0">删除</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=kemu.getCon();
|
||||
if (con != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
String sqlyy = "Select * from gg ";
|
||||
ResultSet rs=kemu.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<PageSize && !rs.isAfterLast())
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td height="25" align="center"><%=rs.getString("id")%></td>
|
||||
<td align="center"><%=rs.getString("Gg_titile")%></td>
|
||||
<td align="center"><%=rs.getString("Gg_neirong")%></td>
|
||||
<td align="center"><%=rs.getString("shijian")%></td>
|
||||
<td align="center"><a
|
||||
href="zixun_up.jsp?id=<%=rs.getString("id")%>">修改</a></td>
|
||||
<td align="center"><a
|
||||
href="delete.jsp?id=<%=rs.getString("id")%>&j=4">删除</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">[<%=CurrPage%>/<%=CountPage %>]
|
||||
每页<%=PageSize %>条 共<%=CountRow%>条记录
|
||||
</td>
|
||||
<td width="495" align="left">
|
||||
<div align="left">
|
||||
<% for (int i = 1;i<=CountPage;i++){%>
|
||||
<a href="zixun_mg.jsp?Page=<%=i%>">[<%=i%>]
|
||||
</a>
|
||||
<%}%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<%@ 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="info" class="com.DB" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</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> <%
|
||||
String id=request.getParameter("id");
|
||||
String sqlb="select * from gg where id='"+ id +"'";
|
||||
ResultSet rs3=info.GetRs(sqlb);
|
||||
if(rs3.next())
|
||||
{
|
||||
|
||||
%>
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="zixun_update.jsp">
|
||||
<table width="493" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="30" colspan="2" align="center">公告修改</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">参数编号: <input name="id"
|
||||
type="text" id="id" value="<%=id %>" readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="25">公告标题: <input name="Gg_titile" type="text"
|
||||
id="Gg_titile" value="<%=rs3.getString("Gg_titile") %>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="25">公告内容: <textarea name="Gg_neirong" cols="40"
|
||||
rows="3" id="Gg_neirong"><%=rs3.getString("Gg_neirong") %></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="35"> <input type="submit"
|
||||
name="Submit" value="修改" /> <input type="button"
|
||||
name="Submit2" value="放弃" onclick="history.back();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form> <%} %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,37 @@
|
|||
<%@ 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="info" class="com.DB" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
String id=new String(request.getParameter("id").getBytes("ISO-8859-1"),"GB18030");
|
||||
String Gg_titile=new String(request.getParameter("Gg_titile").getBytes("ISO-8859-1"),"GB18030");
|
||||
String Gg_neirong=new String(request.getParameter("Gg_neirong").getBytes("ISO-8859-1"),"GB18030");
|
||||
Connection con=info.getCon();
|
||||
// 添加信息的SQL语句
|
||||
String sql = "update gg set Gg_titile='"+Gg_titile +"',Gg_neirong='"+Gg_neirong +"' where id='"+id+"'";
|
||||
// 获取PreparedStatement
|
||||
PreparedStatement ps = con.prepareStatement(sql);
|
||||
// 对SQL语句中的第1个参数赋值
|
||||
int row = ps.executeUpdate();
|
||||
if(row > 0){
|
||||
|
||||
out.println("<script>alert('更改成功!');window.location.href='zixun_mg.jsp';</script>");
|
||||
}
|
||||
// 关闭PreparedStatement,释放资源
|
||||
ps.close();
|
||||
// 关闭Connection,释放资源
|
||||
con.close();
|
||||
} catch (Exception e) {
|
||||
out.print("更新失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,37 @@
|
|||
body, td, th {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: url(../image/dw.gif);
|
||||
margin-left: 0px;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
a:link {
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
font-size: 12px;
|
||||
color: #0000FF;
|
||||
}
|
||||
|
||||
.style7 {
|
||||
color: #FFFFE1
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<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="1002" height="600" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top" background="image/login.jpg"><form id="form1"
|
||||
name="form1" method="post" action="dengluchuli.jsp">
|
||||
<table width="1002" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="334" height="232"> </td>
|
||||
<td width="668"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="30">账户: <input name="username" type="text"
|
||||
id="username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="30">密码: <input name="password" type="password"
|
||||
id="password" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="30">权限: <select name="quanxian" id="quanxian">
|
||||
<option value="管理员">管理员</option>
|
||||
<option value="用户" selected="selected">用户</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="40"><input type="submit" name="Submit"
|
||||
value="登陆" /> <input type="button" name="Submit2" value="用户注册"
|
||||
onclick="location.href='reg.jsp'" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,55 @@
|
|||
<%@ 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="guanli" class="com.DB" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
|
||||
String username=new String(request.getParameter("username").getBytes("ISO-8859-1"),"GB18030");
|
||||
String password=new String(request.getParameter("password").getBytes("ISO-8859-1"),"GB18030");
|
||||
String quanxian=new String(request.getParameter("quanxian").getBytes("ISO-8859-1"),"GB18030");
|
||||
Connection con=guanli.getCon();
|
||||
|
||||
if(quanxian.equals("管理员")){
|
||||
|
||||
String sql="select * from login where username='"+username+"' and password='"+password+"'";
|
||||
ResultSet rs=guanli.GetRs(sql);
|
||||
if(rs.next()){
|
||||
//session.setAttribute("jibie",""+quanxian+"");
|
||||
session.setAttribute("guanliyuan",""+username+"");
|
||||
out.println("<script lanage='javascript'>alert('登录成功');window.location.href='admin/index.jsp';</script>");
|
||||
}
|
||||
else{
|
||||
out.println("<script lanage='javascript'>alert('登陆错误,请核实用户名和密码是否输入正确,重新输入');javascript:history.go(-1);</script>");
|
||||
}
|
||||
guanli.closed();
|
||||
}
|
||||
|
||||
if(quanxian.equals("用户")){
|
||||
|
||||
String sql="select * from reg where username='"+username+"' and password='"+password+"'";
|
||||
ResultSet rs=guanli.GetRs(sql);
|
||||
if(rs.next()){
|
||||
|
||||
//session.setAttribute("bianhao",""+rs.getString("bianhao")+"");
|
||||
session.setAttribute("ck",""+username+"");
|
||||
out.println("<script lanage='javascript'>alert('登录成功');window.location.href='huiyuan/h_index.jsp';</script>");
|
||||
}
|
||||
else{
|
||||
out.println("<script lanage='javascript'>alert('登陆错误,请核实用户名和密码是否输入正确,重新输入');javascript:history.go(-1);</script>");
|
||||
}
|
||||
guanli.closed();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,119 @@
|
|||
<%@ 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> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<form id="form1" name="form1" method="post" action="chewei_list.jsp"
|
||||
onSubmit="return check()">
|
||||
<table width="400" height="30" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="291"> 车位检索: <select name="chewei_didian">
|
||||
<option value="" selected>选择</option>
|
||||
<option value="A区">A区</option>
|
||||
<option value="B区">B区</option>
|
||||
<option value="C区">C区</option>
|
||||
<option value="D区">D区</option>
|
||||
</select></td>
|
||||
<td width="109"><input type="submit" name="Submit"
|
||||
value="查询" /></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">车位编号</td>
|
||||
<td width="165" align="center" bgcolor="#ECE9D8">车位类型</td>
|
||||
<td width="136" align="center" bgcolor="#ECE9D8">当前状态</td>
|
||||
<td width="572" align="center" bgcolor="#ECE9D8">车位位置</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
int CountPage = 0;
|
||||
int CurrPage = 1;
|
||||
int PageSize = 50;
|
||||
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 chewei_didian1="";
|
||||
String chewei_didian=request.getParameter("chewei_didian");
|
||||
if (chewei_didian!=null){
|
||||
chewei_didian1=new String(request.getParameter("chewei_didian").getBytes("ISO-8859-1"),"GB18030");
|
||||
}
|
||||
String sqlyy = "Select * from chewei where chewei_didian='"+chewei_didian1+"'";
|
||||
|
||||
ResultSet rs=gg.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<PageSize && !rs.isAfterLast())
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td align="center"><%=rs.getString("chewei_no")%></td>
|
||||
<td align="center"><%=rs.getString("chewei_type")%></td>
|
||||
<td align="center"><%=rs.getString("chewei_state")%></td>
|
||||
<td align="center"><%=rs.getString("chewei_didian")%></td>
|
||||
</tr>
|
||||
<%
|
||||
rs.next();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
catch (SQLException e)
|
||||
{
|
||||
out.println(e.getMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,70 @@
|
|||
<%@ 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="db11" 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> <%
|
||||
//判断是否有该用户信息
|
||||
String users=(String)session.getAttribute("ck");
|
||||
String sqlo="select * from reg where username='"+users+"'";
|
||||
ResultSet rs=db11.GetRs(sqlo);
|
||||
if(!rs.next())
|
||||
{
|
||||
out.println("暂时没有信息");
|
||||
}
|
||||
else{
|
||||
%>
|
||||
<form id="form1" name="form1" method="post" action="stu_update.jsp">
|
||||
<table width="530" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="17" colspan="2"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="27"> </td>
|
||||
<td width="503" height="20">账户: <input name="username"
|
||||
type="text" id="username" value="<%=rs.getString("username") %>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="19">密码: <input name="password" type="password"
|
||||
id="password" value="<%=rs.getString("password") %>" /></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="20">电话: <input name="tel" type="text" id="tel"
|
||||
value="<%=rs.getString("tel") %>" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="20">简介: <textarea name="jianjie" cols="40"
|
||||
rows="3" id="jianjie"><%=rs.getString("jianjie") %></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="40"><input type="submit" name="Submit"
|
||||
value="修改" /> <input type="reset" name="Submit2"
|
||||
value="放弃" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form> <%} %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<%@ 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="db" class="com.DB" scope="page" />
|
||||
<jsp:useBean id="encoding" class="com.Char" />
|
||||
<jsp:useBean id="popDialog" class="com.Dialog" />
|
||||
<jsp:useBean id="zhifu" class="com.edit.Zhifu" />
|
||||
<jsp:useBean id="shijian" class="com.Shijian" />
|
||||
<jsp:setProperty property="*" name="zhifu" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
|
||||
String username=encoding.toString(request.getParameter("username"));
|
||||
String yonghu_type=encoding.toString(request.getParameter("yonghu_type"));
|
||||
String zhifu_type=encoding.toString(request.getParameter("zhifu_type"));
|
||||
String jine=encoding.toString(request.getParameter("jine"));
|
||||
String beizhu=encoding.toString(request.getParameter("beizhu"));
|
||||
|
||||
Connection conn=db.getCon();
|
||||
// 添加图书信息的SQL语句
|
||||
String sql = "insert into feiyong(username,yonghu_type,zhifu_type,jine,beizhu,shijian)values(?,?,?,?,?,'"+shijian.showTodayTime()+"')";
|
||||
// 获取PreparedStatement
|
||||
|
||||
PreparedStatement ps = conn.prepareStatement(sql);
|
||||
|
||||
ps.setString(1,encoding.toString(zhifu.getUsername()));
|
||||
|
||||
ps.setString(2,encoding.toString(zhifu.getYonghu_type()));
|
||||
|
||||
ps.setString(3,encoding.toString(zhifu.getZhifu_type()));
|
||||
|
||||
ps.setString(4,encoding.toString(zhifu.getJine()));
|
||||
|
||||
ps.setString(5,encoding.toString(zhifu.getBeizhu()));
|
||||
|
||||
|
||||
int row = ps.executeUpdate();
|
||||
|
||||
// 判断是否更新成功
|
||||
if(row > 0){
|
||||
out.println(popDialog.messageBox("支付成功!","huiyuan_zhifu.jsp"));
|
||||
}
|
||||
// 关闭PreparedStatement,释放资源
|
||||
ps.close();
|
||||
// 关闭Connection,释放资源
|
||||
conn.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
out.print("支付失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,111 @@
|
|||
<%@ 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> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="873" height="40" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="179" align="center" bgcolor="#ECE9D8">标题</td>
|
||||
<td width="498" align="center" bgcolor="#ECE9D8">内容</td>
|
||||
<td width="107" align="center" bgcolor="#ECE9D8">时间</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 sqlyy = "Select * from gg ";
|
||||
ResultSet rs=gg.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<PageSize && !rs.isAfterLast())
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td align="center"><%=rs.getString("Gg_titile")%></td>
|
||||
<td align="center"><%=rs.getString("Gg_neirong")%></td>
|
||||
<td align="center"><%=rs.getString("shijian")%></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">[<%=CurrPage%>/<%=CountPage %>]
|
||||
每页<%=PageSize %>条 共<%=CountRow%>条记录
|
||||
</td>
|
||||
<td width="495" align="left">
|
||||
<div align="left">
|
||||
<% for (int i = 1;i<=CountPage;i++){%>
|
||||
<a href="gg_list.jsp?Page=<%=i%>">[<%=i%>]
|
||||
</a>
|
||||
<%}%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,80 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
<link href="../css/style.css" rel="stylesheet" type="text/css">
|
||||
<script language="javascript">
|
||||
function check(){
|
||||
|
||||
if(form1.username.value==""){
|
||||
alert("输入顾客名称");form1.username.focus();return false;
|
||||
}
|
||||
|
||||
if(form1.jine.value==""){
|
||||
alert("输入金额!");form1.jine.focus();return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="g_zhifu_chuli.jsp" onSubmit="return check()">
|
||||
<table width="493" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="30" colspan="2" align="center">顾客支付</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">顾客名称: <input name="username"
|
||||
type="text" id="username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">账户类型: <input name="yonghu_type"
|
||||
type="text" id="yonghu_type" value="顾客支付" readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">支付方式: <select name="zhifu_type">
|
||||
<option value="刷卡" selected="selected">刷卡</option>
|
||||
<option value="现金">现金</option>
|
||||
<option value="支付宝">支付宝</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">支付金额: <input name="jine"
|
||||
type="text" id="jine" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="25">备注说明: <textarea name="beizhu" cols="40"
|
||||
rows="3" id="beizhu"></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="35"> <input type="submit"
|
||||
name="Submit" value="添加" /> <input type="reset"
|
||||
name="Submit2" value="重置" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
<link href="../css/style.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<frameset rows="104,*" cols="*" frameborder="no" border="0"
|
||||
framespacing="0">
|
||||
<frame src="../top.jsp" name="topFrame" scrolling="No"
|
||||
noresize="noresize" id="topFrame" title="topFrame" />
|
||||
<frameset rows="*" cols="198,*" framespacing="0" frameborder="no"
|
||||
border="0">
|
||||
<frame src="h_left.jsp" name="leftFrame" noresize="noresize"
|
||||
id="leftFrame" title="leftFrame" />
|
||||
<frame src="../right.jsp" name="mainFrame" id="mainFrame"
|
||||
title="mainFrame" />
|
||||
</frameset>
|
||||
</frameset>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,38 @@
|
|||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<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="198" height="545" border="0" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top"><img src="../image/LEFT-yonghu.jpg" width="198"
|
||||
height="545" border="0" usemap="#Map" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<map name="Map" id="Map">
|
||||
<area shape="rect" coords="57,82,151,106" href="ck_up.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="56,135,150,161" href="gg_list.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="58,197,148,220" href="weigui_list.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="57,248,147,275" href="chewei_list.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="58,307,155,329" href="huiyuan_zhifu.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="57,338,154,359" href="guke_zhifu.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="59,364,151,388" href="tingche_chaxun.jsp"
|
||||
target="mainFrame" />
|
||||
<area shape="rect" coords="58,423,149,447" href="../out.jsp"
|
||||
target="_parent" />
|
||||
</map>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<%@ 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="db" class="com.DB" scope="page" />
|
||||
<jsp:useBean id="encoding" class="com.Char" />
|
||||
<jsp:useBean id="popDialog" class="com.Dialog" />
|
||||
<jsp:useBean id="zhifu" class="com.edit.Zhifu" />
|
||||
<jsp:useBean id="shijian" class="com.Shijian" />
|
||||
<jsp:setProperty property="*" name="zhifu" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
|
||||
String username=encoding.toString(request.getParameter("username"));
|
||||
String yonghu_type=encoding.toString(request.getParameter("yonghu_type"));
|
||||
String zhifu_type=encoding.toString(request.getParameter("zhifu_type"));
|
||||
String jine=encoding.toString(request.getParameter("jine"));
|
||||
String beizhu=encoding.toString(request.getParameter("beizhu"));
|
||||
|
||||
Connection conn=db.getCon();
|
||||
// 添加图书信息的SQL语句
|
||||
String sql = "insert into feiyong(username,yonghu_type,zhifu_type,jine,beizhu,shijian)values(?,?,?,?,?,'"+shijian.showTodayTime()+"')";
|
||||
// 获取PreparedStatement
|
||||
|
||||
PreparedStatement ps = conn.prepareStatement(sql);
|
||||
|
||||
ps.setString(1,encoding.toString(zhifu.getUsername()));
|
||||
|
||||
ps.setString(2,encoding.toString(zhifu.getYonghu_type()));
|
||||
|
||||
ps.setString(3,encoding.toString(zhifu.getZhifu_type()));
|
||||
|
||||
ps.setString(4,encoding.toString(zhifu.getJine()));
|
||||
|
||||
ps.setString(5,encoding.toString(zhifu.getBeizhu()));
|
||||
|
||||
|
||||
int row = ps.executeUpdate();
|
||||
|
||||
// 判断是否更新成功
|
||||
if(row > 0){
|
||||
out.println(popDialog.messageBox("支付添加成功!","huiyuan_zhifu.jsp"));
|
||||
}
|
||||
// 关闭PreparedStatement,释放资源
|
||||
ps.close();
|
||||
// 关闭Connection,释放资源
|
||||
conn.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
out.print("支付添加失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,80 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
<link href="../css/style.css" rel="stylesheet" type="text/css">
|
||||
<script language="javascript">
|
||||
function check(){
|
||||
|
||||
if(form1.username.value==""){
|
||||
alert("输入会员名称!");form1.username.focus();return false;
|
||||
}
|
||||
|
||||
if(form1.jine.value==""){
|
||||
alert("输入金额!");form1.jine.focus();return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</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>
|
||||
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="h_zhifu_chuli.jsp" onSubmit="return check()">
|
||||
<table width="493" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td height="30" colspan="2" align="center">会员支付</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">会员名称: <input name="username"
|
||||
type="text" id="username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">账户类型: <input name="yonghu_type"
|
||||
type="text" id="yonghu_type" value="会员支付" readonly /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">支付方式: <select name="zhifu_type">
|
||||
<option value="刷卡" selected="selected">刷卡</option>
|
||||
<option value="现金">现金</option>
|
||||
<option value="支付宝">支付宝</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40"> </td>
|
||||
<td width="945" height="25">支付金额: <input name="jine"
|
||||
type="text" id="jine" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="25">备注说明: <textarea name="beizhu" cols="40"
|
||||
rows="3" id="beizhu"></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="35"> <input type="submit"
|
||||
name="Submit" value="添加" /> <input type="reset"
|
||||
name="Submit2" value="重置" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,39 @@
|
|||
<%@ 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="pass" class="com.DB" scope="page" />
|
||||
<jsp:useBean id="times" class="com.Shijian" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
String username=new String(request.getParameter("username").getBytes("ISO-8859-1"),"GB18030");
|
||||
String password=new String(request.getParameter("password").getBytes("ISO-8859-1"),"GB18030");
|
||||
String tel=new String(request.getParameter("tel").getBytes("ISO-8859-1"),"GB18030");
|
||||
String jianjie=new String(request.getParameter("jianjie").getBytes("ISO-8859-1"),"GB18030");
|
||||
|
||||
Connection con=pass.getCon();
|
||||
// 添加信息的SQL语句
|
||||
String sql = "update reg set password='"+password +"',tel='"+tel +"',jianjie='"+jianjie +"' where username='"+username+"'";
|
||||
// 获取PreparedStatement
|
||||
PreparedStatement ps = con.prepareStatement(sql);
|
||||
// 对SQL语句中的第1个参数赋值
|
||||
int row = ps.executeUpdate();
|
||||
if(row > 0){
|
||||
out.println("<script>alert('更改成功!');window.location.href='ck_up.jsp';</script>");
|
||||
}
|
||||
// 关闭PreparedStatement,释放资源
|
||||
ps.close();
|
||||
// 关闭Connection,释放资源
|
||||
con.close();
|
||||
} catch (Exception e) {
|
||||
out.print("更新失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,119 @@
|
|||
<%@ 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> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<form id="form1" name="form1" method="post"
|
||||
action="tingche_chaxun.jsp" onSubmit="return check()">
|
||||
<table width="400" height="30" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="227"> 消费检索: <select name="yonghu_type">
|
||||
<option value="" selected>请选出查询方式</option>
|
||||
<option value="会员支付">会员支付</option>
|
||||
<option value="顾客支付">顾客支付</option>
|
||||
</select></td>
|
||||
<td width="173"><input type="submit" name="Submit"
|
||||
value="信息查询" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<table width="873" height="55" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="139" height="31" align="center" bgcolor="#ECE9D8">账户信息</td>
|
||||
<td width="109" align="center" bgcolor="#ECE9D8">支付方式</td>
|
||||
<td width="81" align="center" bgcolor="#ECE9D8">支付金额</td>
|
||||
<td width="355" align="center" bgcolor="#ECE9D8">备注信息</td>
|
||||
<td width="189" align="center" bgcolor="#ECE9D8">支付时间</td>
|
||||
</tr>
|
||||
|
||||
<%
|
||||
int CountPage = 0;
|
||||
int CurrPage = 1;
|
||||
int PageSize = 50;
|
||||
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 yonghu_type1="";
|
||||
String yonghu_type=request.getParameter("yonghu_type");
|
||||
if (yonghu_type!=null){
|
||||
yonghu_type1=new String(request.getParameter("yonghu_type").getBytes("ISO-8859-1"),"GB18030");
|
||||
}
|
||||
String sqlyy = "Select * from feiyong where yonghu_type='"+yonghu_type1+"'";
|
||||
|
||||
ResultSet rs=gg.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<PageSize && !rs.isAfterLast())
|
||||
{
|
||||
%>
|
||||
<tr>
|
||||
<td align="center"><%=rs.getString("username")%></td>
|
||||
<td align="center"><%=rs.getString("zhifu_type")%></td>
|
||||
<td align="center"><%=rs.getString("jine")%></td>
|
||||
<td align="center"><%=rs.getString("beizhu")%></td>
|
||||
<td align="center"><%=rs.getString("shijian")%></td>
|
||||
</tr>
|
||||
<%
|
||||
rs.next();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
catch (SQLException e)
|
||||
{
|
||||
out.println(e.getMessage());
|
||||
}
|
||||
finally
|
||||
{
|
||||
con.close();
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,112 @@
|
|||
<%@ 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> </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"> 车牌号码: <input type="text"
|
||||
name="chepaihao" id="chepaihao" /></td>
|
||||
<td width="109"><input type="submit" name="Submit"
|
||||
value="查询" /></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">车牌号码</td>
|
||||
<td width="136" align="center" bgcolor="#ECE9D8">当前状态</td>
|
||||
<td width="572" align="center" bgcolor="#ECE9D8">必要说明</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("对不起,暂时没有信息");
|
||||
}
|
||||
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>
|
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
|
@ -0,0 +1,7 @@
|
|||
|
||||
<%
|
||||
session.setAttribute("ck",null);
|
||||
session.setAttribute("siji",null);
|
||||
session.setAttribute("guanliyuan",null);
|
||||
response.sendRedirect("denglu.jsp");
|
||||
%>
|
|
@ -0,0 +1,98 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
<script language="javascript">
|
||||
function check(){
|
||||
|
||||
if(form1.username.value==""){
|
||||
alert("输入用户账号!");form1.username.focus();return false;
|
||||
}
|
||||
|
||||
if(form1.password.value==""){
|
||||
alert("输入密码!");form1.password.focus();return false;
|
||||
}
|
||||
if(form1.chepaihao.value==""){
|
||||
alert("输入车牌号");form1.chepaihao.focus();return false;
|
||||
}
|
||||
if(form1.truename.value==""){
|
||||
alert("输入姓名!");form1.truename.focus();return false;
|
||||
}
|
||||
|
||||
|
||||
if(form1.tel.value==""){
|
||||
alert("输入联系方式!");form1.tel.focus();return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
<link href="css/style.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<table width="1002" height="600" border="0" align="center"
|
||||
cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top" background="image/reg.jpg"><form id="form1"
|
||||
name="form1" method="post" action="reg_do.jsp"
|
||||
onSubmit="return check()">
|
||||
<table width="1002" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="334" height="200"> </td>
|
||||
<td width="668"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="20">用户账号: <input name="username" type="text"
|
||||
id="username" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="19">用户密码: <input name="password" type="password"
|
||||
id="password" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="20">车牌号码: <input name="chepaihao" type="text"
|
||||
id="chepaihao" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="20">卡内金额: <input name="jine" type="text"
|
||||
id="jine" value="200" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="20">真实姓名: <input name="truename" type="text"
|
||||
id="truename" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="20">联系方式: <input name="tel" type="text" id="tel" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="20">用户简介: <textarea name="jianjie" cols="40"
|
||||
rows="3" id="jianjie"></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td height="40"><input type="submit" name="Submit"
|
||||
value="注册" /> <input type="button" name="Submit2"
|
||||
value="放弃" onclick="location.href='denglu.jsp'" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<%@ 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="reg" class="com.DB" scope="page" />
|
||||
<jsp:useBean id="times" class="com.Shijian" scope="page" />
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
</head>
|
||||
<body>
|
||||
<%
|
||||
try {
|
||||
String username=new String(request.getParameter("username").getBytes("ISO-8859-1"),"GB18030");
|
||||
String password=new String(request.getParameter("password").getBytes("ISO-8859-1"),"GB18030");
|
||||
String chepaihao=new String(request.getParameter("chepaihao").getBytes("ISO-8859-1"),"GB18030");
|
||||
String jine=new String(request.getParameter("jine").getBytes("ISO-8859-1"),"GB18030");
|
||||
String truename=new String(request.getParameter("truename").getBytes("ISO-8859-1"),"GB18030");
|
||||
String tel=new String(request.getParameter("tel").getBytes("ISO-8859-1"),"GB18030");
|
||||
String jianjie=new String(request.getParameter("jianjie").getBytes("ISO-8859-1"),"GB18030");
|
||||
|
||||
Connection con=reg.getCon();
|
||||
String sqlt="select * from reg where username='"+username+"'";
|
||||
ResultSet rs=reg.GetRs(sqlt);
|
||||
|
||||
if(rs.next()){
|
||||
out.println("<script lanage='javascript'>alert('账户已被占用');javascript:history.go(-1);</script>");
|
||||
}
|
||||
else
|
||||
{
|
||||
// 添加信息的SQL语句
|
||||
String sql = "insert into reg(username,password,chepaihao,jine,truename,tel,jianjie,shijian) values('"+username+"','"+password+"','"+chepaihao+"','"+jine+"','"+truename+"','"+tel+"','"+jianjie+"','"+times.showTodayTime()+"')";
|
||||
int row = reg.GetCount(sql);
|
||||
|
||||
if(row > 0){
|
||||
out.println("<script>alert('注册成功!');window.location.href='denglu.jsp';</script>");
|
||||
}
|
||||
con.close();}
|
||||
} catch (Exception e) {
|
||||
out.print("注册失败!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<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"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,19 @@
|
|||
<%@ page language="java" contentType="text/html; charset=GB18030"
|
||||
pageEncoding="GB18030"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
|
||||
<title>Insert title here</title>
|
||||
<link href="css/style.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<table width="1180" height="104" border="0" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr>
|
||||
<td valign="top"><img src="image/TOP.jpg" width="1180"
|
||||
height="104" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
package com;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
public class Char {
|
||||
|
||||
public Char(){
|
||||
}
|
||||
public String toString(String str){
|
||||
|
||||
String text = "";
|
||||
|
||||
if(str != null && !"".equals(str)){
|
||||
try {
|
||||
text = new String(str.getBytes("ISO-8859-1"),"GB18030");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
public class Charcode {
|
||||
|
||||
public Charcode(){
|
||||
}
|
||||
|
||||
public String toString(String str){
|
||||
|
||||
String text = "";
|
||||
|
||||
if(str != null && !"".equals(str)){
|
||||
try {
|
||||
|
||||
text = new String(str.getBytes("ISO-8859-1"),"GB18030");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com;
|
||||
import java.sql.*;
|
||||
public class DB {
|
||||
private String password;
|
||||
private Connection con;
|
||||
private String classname="com.microsoft.sqlserver.jdbc.SQLServerDriver";
|
||||
private String url="jdbc:sqlserver://localhost:1433;DatabaseName=tingchechang";
|
||||
|
||||
public Connection getCon(){
|
||||
try{
|
||||
Class.forName(classname);
|
||||
con=DriverManager.getConnection(url,"sa","123");
|
||||
}
|
||||
catch(Exception e){
|
||||
e.printStackTrace(System.err);
|
||||
con=null;
|
||||
}
|
||||
return con;
|
||||
}
|
||||
public void closed(){
|
||||
try{
|
||||
if(con!=null)con.close();
|
||||
}
|
||||
catch(Exception e){e.printStackTrace();}
|
||||
}
|
||||
//用于注册,添加
|
||||
public int GetCount(String SQL){
|
||||
try
|
||||
{
|
||||
Connection Con = getCon();
|
||||
|
||||
Statement Smt = Con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
|
||||
|
||||
int counts = Smt.executeUpdate(SQL);
|
||||
|
||||
return counts;
|
||||
|
||||
}
|
||||
catch(SQLException e)
|
||||
{
|
||||
System.out.println("失败!");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
//用于查询,登陆
|
||||
public ResultSet GetRs(String SQL){
|
||||
try
|
||||
{
|
||||
Connection Con = getCon();
|
||||
Statement Smt = Con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
|
||||
ResultSet Rs = Smt.executeQuery(SQL);
|
||||
return Rs;
|
||||
}
|
||||
catch(SQLException e)
|
||||
{
|
||||
System.out.println("失败!");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public String GetRsValue(String SQL){
|
||||
try
|
||||
{
|
||||
Connection Con = getCon();
|
||||
Statement Smt = Con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
|
||||
ResultSet Rs = Smt.executeQuery(SQL);
|
||||
System.out.println(Rs+"===========rs");
|
||||
if(Rs.next()){
|
||||
System.out.println("===========comein");
|
||||
password=Rs.getString("password");
|
||||
}
|
||||
System.out.println(password+"===========password");
|
||||
return password;
|
||||
}
|
||||
catch(SQLException e)
|
||||
{
|
||||
System.out.println("失败!");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//修改和删除
|
||||
public boolean executeUpdate(String sql) {
|
||||
|
||||
if (con == null) {
|
||||
getCon();
|
||||
}
|
||||
try {
|
||||
Statement stmt = con.createStatement();
|
||||
int iCount = stmt.executeUpdate(sql);
|
||||
System.out.println("操作成功,所影响的记录数为" + String.valueOf(iCount));
|
||||
} catch (SQLException e) {
|
||||
System.out.println(e.getMessage());
|
||||
System.out.println("executeUpdaterError!");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com;
|
||||
|
||||
public class Dialog {
|
||||
|
||||
public String messageBox(String message,String url){
|
||||
String str="<script language='javascript'>alert('"+message+"');";
|
||||
str=str+"window.location.href='"+url+"';</script>";
|
||||
return str;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class Shijian {
|
||||
public String showTodayTime(){
|
||||
Date date=new Date();
|
||||
return DateFormat.getDateInstance().format(date);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.edit;
|
||||
|
||||
public class Chewei {
|
||||
private int id;
|
||||
|
||||
private String chewei_no;
|
||||
|
||||
private String chewei_type;
|
||||
|
||||
private String chewei_state;
|
||||
|
||||
private String chewei_didian;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getChewei_no() {
|
||||
return chewei_no;
|
||||
}
|
||||
|
||||
public void setChewei_no(String cheweiNo) {
|
||||
chewei_no = cheweiNo;
|
||||
}
|
||||
|
||||
public String getChewei_type() {
|
||||
return chewei_type;
|
||||
}
|
||||
|
||||
public void setChewei_type(String cheweiType) {
|
||||
chewei_type = cheweiType;
|
||||
}
|
||||
|
||||
public String getChewei_state() {
|
||||
return chewei_state;
|
||||
}
|
||||
|
||||
public void setChewei_state(String cheweiState) {
|
||||
chewei_state = cheweiState;
|
||||
}
|
||||
|
||||
public String getChewei_didian() {
|
||||
return chewei_didian;
|
||||
}
|
||||
|
||||
public void setChewei_didian(String cheweiDidian) {
|
||||
chewei_didian = cheweiDidian;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
package com.edit;
|
||||
|
||||
public class Info_add {
|
||||
|
||||
private int id;
|
||||
|
||||
private String users;
|
||||
|
||||
private String mima;
|
||||
|
||||
private String xingming;
|
||||
|
||||
private String tel;
|
||||
|
||||
private String beizhu;
|
||||
|
||||
private String shijian;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
public void setUsers(String users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
public String getMima() {
|
||||
return mima;
|
||||
}
|
||||
|
||||
public void setMima(String mima) {
|
||||
this.mima = mima;
|
||||
}
|
||||
|
||||
public String getXingming() {
|
||||
return xingming;
|
||||
}
|
||||
|
||||
public void setXingming(String xingming) {
|
||||
this.xingming = xingming;
|
||||
}
|
||||
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getBeizhu() {
|
||||
return beizhu;
|
||||
}
|
||||
|
||||
public void setBeizhu(String beizhu) {
|
||||
this.beizhu = beizhu;
|
||||
}
|
||||
|
||||
public String getShijian() {
|
||||
return shijian;
|
||||
}
|
||||
|
||||
public void setShijian(String shijian) {
|
||||
this.shijian = shijian;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.edit;
|
||||
|
||||
public class Zhifu {
|
||||
private int id;
|
||||
|
||||
private String username;
|
||||
|
||||
private String yonghu_type;
|
||||
|
||||
private String zhifu_type;
|
||||
|
||||
private String jine;
|
||||
|
||||
private String beizhu;
|
||||
|
||||
private String shijian;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getYonghu_type() {
|
||||
return yonghu_type;
|
||||
}
|
||||
|
||||
public void setYonghu_type(String yonghuType) {
|
||||
yonghu_type = yonghuType;
|
||||
}
|
||||
|
||||
public String getZhifu_type() {
|
||||
return zhifu_type;
|
||||
}
|
||||
|
||||
public void setZhifu_type(String zhifuType) {
|
||||
zhifu_type = zhifuType;
|
||||
}
|
||||
|
||||
public String getJine() {
|
||||
return jine;
|
||||
}
|
||||
|
||||
public void setJine(String jine) {
|
||||
this.jine = jine;
|
||||
}
|
||||
|
||||
public String getBeizhu() {
|
||||
return beizhu;
|
||||
}
|
||||
|
||||
public void setBeizhu(String beizhu) {
|
||||
this.beizhu = beizhu;
|
||||
}
|
||||
|
||||
public String getShijian() {
|
||||
return shijian;
|
||||
}
|
||||
|
||||
public void setShijian(String shijian) {
|
||||
this.shijian = shijian;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.DB;
|
||||
|
||||
/**
|
||||
* Servlet implementation class Cw_deleteServlet
|
||||
*/
|
||||
public class Cw_deleteServlet extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
// 获取id
|
||||
int id = Integer.valueOf(request.getParameter("id"));
|
||||
try {
|
||||
DB hy = new DB();
|
||||
Connection str = hy.getCon();
|
||||
// 删除信息的SQL语句
|
||||
String sqltt = "delete from chewei where id=?";
|
||||
// 获取PreparedStatement
|
||||
PreparedStatement pstt = str.prepareStatement(sqltt);
|
||||
// 对SQL语句中的第一个占位符赋值
|
||||
pstt.setInt(1, id);
|
||||
// 执行更新操作
|
||||
pstt.executeUpdate();
|
||||
// 关闭PreparedStatement
|
||||
pstt.close();
|
||||
// 关闭Connection
|
||||
str.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 重定向到TeachServlet
|
||||
response.sendRedirect("./admin/chewei_mg.jsp");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package com.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.DB;
|
||||
|
||||
/**
|
||||
* Servlet implementation class Hf_Servlet
|
||||
*/
|
||||
public class Hf_Servlet extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
// 获取id
|
||||
|
||||
String id=new String(request.getParameter("id").getBytes("ISO-8859-1"),"GB18030");
|
||||
|
||||
|
||||
try {
|
||||
DB vvv = new DB();
|
||||
Connection sty = vvv.getCon();
|
||||
// 删除信息的SQL语句
|
||||
String sqlmm = "update weigui set states='' where id=?";
|
||||
// 获取PreparedStatement
|
||||
PreparedStatement pscc = sty.prepareStatement(sqlmm);
|
||||
// 对SQL语句中的第一个占位符赋值
|
||||
|
||||
pscc.setString(1, id);
|
||||
|
||||
|
||||
// 执行更新操作
|
||||
pscc.executeUpdate();
|
||||
// 关闭PreparedStatement
|
||||
pscc.close();
|
||||
// 关闭Connection
|
||||
sty.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 重定向到TeachServlet
|
||||
//out.println("<script>alert('更改成功!');window.location.href='info_up.jsp';</script>");
|
||||
response.sendRedirect("./admin/weigui_huifu.jsp");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.DB;
|
||||
|
||||
/**
|
||||
* Servlet implementation class Wg_delServlet
|
||||
*/
|
||||
public class Wg_delServlet extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
// 获取id
|
||||
int id = Integer.valueOf(request.getParameter("id"));
|
||||
try {
|
||||
DB hy = new DB();
|
||||
Connection str = hy.getCon();
|
||||
// 删除信息的SQL语句
|
||||
String sqltt = "delete from weigui where id=?";
|
||||
// 获取PreparedStatement
|
||||
PreparedStatement pstt = str.prepareStatement(sqltt);
|
||||
// 对SQL语句中的第一个占位符赋值
|
||||
pstt.setInt(1, id);
|
||||
// 执行更新操作
|
||||
pstt.executeUpdate();
|
||||
// 关闭PreparedStatement
|
||||
pstt.close();
|
||||
// 关闭Connection
|
||||
str.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 重定向到TeachServlet
|
||||
response.sendRedirect("./admin/weigui_mg.jsp");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue