diff --git a/tingchechang/.settings/org.eclipse.core.resources.prefs b/tingchechang/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..3b55ea5 --- /dev/null +++ b/tingchechang/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=GBK diff --git a/tingchechang/.settings/org.eclipse.jdt.core.prefs b/tingchechang/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..bb81751 --- /dev/null +++ b/tingchechang/.settings/org.eclipse.jdt.core.prefs @@ -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 diff --git a/tingchechang/.settings/org.eclipse.wst.common.component b/tingchechang/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..5b43c49 --- /dev/null +++ b/tingchechang/.settings/org.eclipse.wst.common.component @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tingchechang/.settings/org.eclipse.wst.common.project.facet.core.xml b/tingchechang/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..94eeac8 --- /dev/null +++ b/tingchechang/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tingchechang/.settings/org.eclipse.wst.jsdt.ui.superType.container b/tingchechang/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..4a46122 --- /dev/null +++ b/tingchechang/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/tingchechang/.settings/org.eclipse.wst.jsdt.ui.superType.name b/tingchechang/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..0dfe1be --- /dev/null +++ b/tingchechang/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/tingchechang/WebContent/META-INF/MANIFEST.MF b/tingchechang/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 0000000..1f0eb74 --- /dev/null +++ b/tingchechang/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/tingchechang/WebContent/WEB-INF/classes/com/Char.class b/tingchechang/WebContent/WEB-INF/classes/com/Char.class new file mode 100644 index 0000000..11c79ec Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/Char.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/Charcode.class b/tingchechang/WebContent/WEB-INF/classes/com/Charcode.class new file mode 100644 index 0000000..86fa553 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/Charcode.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/DB.class b/tingchechang/WebContent/WEB-INF/classes/com/DB.class new file mode 100644 index 0000000..c7625f0 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/DB.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/Dialog.class b/tingchechang/WebContent/WEB-INF/classes/com/Dialog.class new file mode 100644 index 0000000..d2ca8bf Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/Dialog.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/Shijian.class b/tingchechang/WebContent/WEB-INF/classes/com/Shijian.class new file mode 100644 index 0000000..aa213cc Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/Shijian.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/edit/Chewei.class b/tingchechang/WebContent/WEB-INF/classes/com/edit/Chewei.class new file mode 100644 index 0000000..a167601 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/edit/Chewei.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/edit/Info_add.class b/tingchechang/WebContent/WEB-INF/classes/com/edit/Info_add.class new file mode 100644 index 0000000..628b853 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/edit/Info_add.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/edit/Zhifu.class b/tingchechang/WebContent/WEB-INF/classes/com/edit/Zhifu.class new file mode 100644 index 0000000..668d726 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/edit/Zhifu.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/servlet/Cw_deleteServlet.class b/tingchechang/WebContent/WEB-INF/classes/com/servlet/Cw_deleteServlet.class new file mode 100644 index 0000000..9b2bda1 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/servlet/Cw_deleteServlet.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/servlet/Hf_Servlet.class b/tingchechang/WebContent/WEB-INF/classes/com/servlet/Hf_Servlet.class new file mode 100644 index 0000000..2f3fd15 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/servlet/Hf_Servlet.class differ diff --git a/tingchechang/WebContent/WEB-INF/classes/com/servlet/Wg_delServlet.class b/tingchechang/WebContent/WEB-INF/classes/com/servlet/Wg_delServlet.class new file mode 100644 index 0000000..b469b53 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/classes/com/servlet/Wg_delServlet.class differ diff --git a/tingchechang/WebContent/WEB-INF/lib/sqljdbc.jar b/tingchechang/WebContent/WEB-INF/lib/sqljdbc.jar new file mode 100644 index 0000000..bcc4da3 Binary files /dev/null and b/tingchechang/WebContent/WEB-INF/lib/sqljdbc.jar differ diff --git a/tingchechang/WebContent/WEB-INF/web.xml b/tingchechang/WebContent/WEB-INF/web.xml new file mode 100644 index 0000000..9c6ed38 --- /dev/null +++ b/tingchechang/WebContent/WEB-INF/web.xml @@ -0,0 +1,46 @@ + + + + tingchechang + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + + + Cw_deleteServlet + Cw_deleteServlet + com.servlet.Cw_deleteServlet + + + Cw_deleteServlet + /Cw_deleteServlet + + + + Wg_delServlet + Wg_delServlet + com.servlet.Wg_delServlet + + + Wg_delServlet + /Wg_delServlet + + + + Hf_Servlet + Hf_Servlet + com.servlet.Hf_Servlet + + + Hf_Servlet + /Hf_Servlet + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/biangeng.jsp b/tingchechang/WebContent/admin/biangeng.jsp new file mode 100644 index 0000000..8b5f860 --- /dev/null +++ b/tingchechang/WebContent/admin/biangeng.jsp @@ -0,0 +1,56 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + +
+ + + +
 
<% String username=new String(request.getParameter("username").getBytes("ISO-8859-1"),"GB18030"); %> + +
+ + + + + + + + + + + + + + + + + +
权限更改
 用户账户:
 权限类别: +
     + +    +
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/biangeng_chuli.jsp b/tingchechang/WebContent/admin/biangeng_chuli.jsp new file mode 100644 index 0000000..575b786 --- /dev/null +++ b/tingchechang/WebContent/admin/biangeng_chuli.jsp @@ -0,0 +1,48 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + <% + 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(""); + } + // 关闭PreparedStatement,释放资源 + ps.close(); + // 关闭Connection,释放资源 + con.close(); + } catch (Exception e) { + out.print("变更失败!"); + e.printStackTrace(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/chewei_add_chuli.jsp b/tingchechang/WebContent/admin/chewei_add_chuli.jsp new file mode 100644 index 0000000..2224ae9 --- /dev/null +++ b/tingchechang/WebContent/admin/chewei_add_chuli.jsp @@ -0,0 +1,42 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + +Insert title here + + + <% + 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(""); + } + 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(""); + } + con.close();} + } catch (Exception e) { + out.print("车位添加失败!"); + e.printStackTrace(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/chewei_chuli.jsp b/tingchechang/WebContent/admin/chewei_chuli.jsp new file mode 100644 index 0000000..4076184 --- /dev/null +++ b/tingchechang/WebContent/admin/chewei_chuli.jsp @@ -0,0 +1,57 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + + + + + +Insert title here + + + <% + 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(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/chewei_mg.jsp b/tingchechang/WebContent/admin/chewei_mg.jsp new file mode 100644 index 0000000..654d0c1 --- /dev/null +++ b/tingchechang/WebContent/admin/chewei_mg.jsp @@ -0,0 +1,178 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + + +
+ + + +
 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
车位添加
 车位编号:
 车位类型: +
 车位状态: +
 车位位置:
   +              +
+
+ + + + + + + + + + <% +int CountPage = 0; +int CurrPage = 1; +int PageSize = 12; +int CountRow = 0; +String StrPage = request.getParameter("Page"); +if (StrPage == null) +{ + CurrPage = 1; +} +else +{ + CurrPage = Integer.parseInt(StrPage); +} +Connection con=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 + + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
车位编号车位类型当前状态车位位置删除
<%=rs.getString("chewei_no")%><%=rs.getString("chewei_type")%><%=rs.getString("chewei_state")%><%=rs.getString("chewei_didian")%>">删除
+ + + + + +
[<%=CurrPage%>/<%=CountPage %>] + 每页<%=PageSize %>条 共<%=CountRow%>条记录 + +
+ <% for (int i = 1;i<=CountPage;i++){%> + [<%=i%>] + + <%}%> +
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/chewei_tongji.jsp b/tingchechang/WebContent/admin/chewei_tongji.jsp new file mode 100644 index 0000000..9867efb --- /dev/null +++ b/tingchechang/WebContent/admin/chewei_tongji.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+ + + + + + + + + <% + String sqlt="select distinct(chewei_didian) from chewei"; + ResultSet rs=gg.GetRs(sqlt); + try{ + while(rs.next()){ + %> + + + + + + + <%}}catch (Exception e){}%> +
车位位置空闲车位预订车位使用车位
<%=rs.getString("chewei_didian")%> + <% + + 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); %> + + + + <% + + 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); %> + + + <% + + 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); %> + +
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/delete.jsp b/tingchechang/WebContent/admin/delete.jsp new file mode 100644 index 0000000..d41464c --- /dev/null +++ b/tingchechang/WebContent/admin/delete.jsp @@ -0,0 +1,68 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + <% + +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(""); +} + +if (pp==2) { + String id=request.getParameter("id"); + String sqlo="delete from reg where id='"+id+"'"; + delete.executeUpdate(sqlo); + out.println(""); + } + +if (pp==3) { + String id=request.getParameter("id"); + String sqlo="delete from jifei where id='"+id+"'"; + delete.executeUpdate(sqlo); + out.println(""); + } + +if (pp==4) { + String id=request.getParameter("id"); + String sqlo="delete from gg where id='"+id+"'"; + delete.executeUpdate(sqlo); + out.println(""); + } + +if (pp==5) { + String id=request.getParameter("id"); + String sqlo="delete from feiyong where id='"+id+"'"; + delete.executeUpdate(sqlo); + out.println(""); + } + +if (pp==6) { + String id=request.getParameter("id"); + String sqlo="delete from dingdan where id='"+id+"'"; + delete.executeUpdate(sqlo); + out.println(""); + } + + +if (pp==7) { + String id=request.getParameter("id"); + String sqlo="delete from jiaoliu where id='"+id+"'"; + delete.executeUpdate(sqlo); + out.println(""); + } + + +%> + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/index.jsp b/tingchechang/WebContent/admin/index.jsp new file mode 100644 index 0000000..53f43c9 --- /dev/null +++ b/tingchechang/WebContent/admin/index.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + + + + + + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/left.jsp b/tingchechang/WebContent/admin/left.jsp new file mode 100644 index 0000000..3a23b10 --- /dev/null +++ b/tingchechang/WebContent/admin/left.jsp @@ -0,0 +1,44 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + +
+ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/quanxian_list.jsp b/tingchechang/WebContent/admin/quanxian_list.jsp new file mode 100644 index 0000000..629b640 --- /dev/null +++ b/tingchechang/WebContent/admin/quanxian_list.jsp @@ -0,0 +1,115 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+ + + + + + + + + <% +int CountPage = 0; +int CurrPage = 1; +int PageSize = 12; +int CountRow = 0; +String StrPage = request.getParameter("Page"); +if (StrPage == null) +{ + CurrPage = 1; +} +else +{ + CurrPage = Integer.parseInt(StrPage); +} +Connection con=yonghu.getCon(); +if (con != null) +{ + try + { + + String sqlyy = "Select * from reg "; + ResultSet rs=yonghu.GetRs(sqlyy); + if(!rs.next()) + { + out.println("对不起,暂时没有信息"); + } + else{ + rs.last(); + int i = 0; + CountRow = rs.getRow(); + CountPage = (CountRow/PageSize); + if (CountRow%PageSize>0) + CountPage++; + Integer n = (CurrPage-1)*5+1; + rs.first(); + rs.absolute(CurrPage*PageSize-PageSize+1); + while (i + + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
账户车牌号姓名权限变更权限
<%=rs.getString("username")%><%=rs.getString("chepaihao")%><%=rs.getString("truename")%><%=rs.getString("quanxian")%>">变更权限
+ + + + + + +
[<%=CurrPage%>/<%=CountPage %>] + 每页<%=PageSize %>条 共<%=CountRow%>条记录 + +
+ <% for (int i = 1;i<=CountPage;i++){%> + [<%=i%>] + + <%}%> +
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/shoufei_list.jsp b/tingchechang/WebContent/admin/shoufei_list.jsp new file mode 100644 index 0000000..156145c --- /dev/null +++ b/tingchechang/WebContent/admin/shoufei_list.jsp @@ -0,0 +1,122 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+
+ + + + + +
  消费检索:
+
+ + + + + + + + + + + <% +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 + + + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
账户信息支付方式支付金额备注信息支付时间删除
<%=rs.getString("username")%><%=rs.getString("zhifu_type")%><%=rs.getString("jine")%><%=rs.getString("beizhu")%><%=rs.getString("shijian")%>&j=5">删除
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/siji_list.jsp b/tingchechang/WebContent/admin/siji_list.jsp new file mode 100644 index 0000000..adedbda --- /dev/null +++ b/tingchechang/WebContent/admin/siji_list.jsp @@ -0,0 +1,119 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+ + + + + + + + + + + <% +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 + + + + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
账户密码车牌号金额姓名电话删除
<%=rs.getString("username")%><%=rs.getString("password")%><%=rs.getString("chepaihao")%><%=rs.getString("jine")%><%=rs.getString("truename")%><%=rs.getString("tel")%>&j=1">删除
+ + + + + + +
[<%=C_row%>/<%=C_page %>] + 每页<%=M_size %>条 共<%=CountRow%>条记录 + +
+ <% for (int i = 1;i<=C_page;i++){%> + [<%=i%>] + + <%}%> +
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/tingche_tongji.jsp b/tingchechang/WebContent/admin/tingche_tongji.jsp new file mode 100644 index 0000000..a787d01 --- /dev/null +++ b/tingchechang/WebContent/admin/tingche_tongji.jsp @@ -0,0 +1,77 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+ + + + + + + + + + + + + + + + + + + + +
支付方式支付次数
刷卡 + <% + + 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); %> + + +
现金 + <% + + 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); %> +
支付宝 + <% + 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); %> +
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/weigui_add_chuli.jsp b/tingchechang/WebContent/admin/weigui_add_chuli.jsp new file mode 100644 index 0000000..361742b --- /dev/null +++ b/tingchechang/WebContent/admin/weigui_add_chuli.jsp @@ -0,0 +1,42 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + +Insert title here + + + <% + 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(""); + } + 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(""); + } + con.close();} + } catch (Exception e) { + out.print("违规添加失败!"); + e.printStackTrace(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/weigui_huifu.jsp b/tingchechang/WebContent/admin/weigui_huifu.jsp new file mode 100644 index 0000000..0f28c71 --- /dev/null +++ b/tingchechang/WebContent/admin/weigui_huifu.jsp @@ -0,0 +1,115 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+
+ + + + + +
  车牌号码:
+
+ + + + + + + + + <% +int CountPage = 0; +int CurrPage = 1; +int PageSize = 12; +int CountRow = 0; +String StrPage = request.getParameter("Page"); +if (StrPage == null) +{ + CurrPage = 1; +} +else +{ + CurrPage = Integer.parseInt(StrPage); +} +Connection con=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 + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
车牌号码当前状态必要说明恢复车牌
<%=rs.getString("chepaihao")%><%=rs.getString("states")%><%=rs.getString("shuoming")%>">恢复车牌
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/weigui_mg.jsp b/tingchechang/WebContent/admin/weigui_mg.jsp new file mode 100644 index 0000000..00046cf --- /dev/null +++ b/tingchechang/WebContent/admin/weigui_mg.jsp @@ -0,0 +1,161 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + + +
+ + + +
 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
违规添加
 用户账户:
 车牌号码:
 车牌状态:
 违规说明:
   +              +
+
+ + + + + + + + + + <% +int CountPage = 0; +int CurrPage = 1; +int PageSize = 12; +int CountRow = 0; +String StrPage = request.getParameter("Page"); +if (StrPage == null) +{ + CurrPage = 1; +} +else +{ + CurrPage = Integer.parseInt(StrPage); +} +Connection con=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 + + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
车牌号码当前状态必要说明用户名删除
<%=rs.getString("chepaihao")%><%=rs.getString("states")%><%=rs.getString("shuoming")%><%=rs.getString("username")%>">删除
+ + + + + +
[<%=CurrPage%>/<%=CountPage %>] + 每页<%=PageSize %>条 共<%=CountRow%>条记录 + +
+ <% for (int i = 1;i<=CountPage;i++){%> + [<%=i%>] + + <%}%> +
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/zixun_add.jsp b/tingchechang/WebContent/admin/zixun_add.jsp new file mode 100644 index 0000000..76e8572 --- /dev/null +++ b/tingchechang/WebContent/admin/zixun_add.jsp @@ -0,0 +1,48 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + +
+ + + +
 
+
+ + + + + + + + + + + + + + + + + +
公告添加
 公告名称:
 公告内容:
       
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/zixun_add_chuli.jsp b/tingchechang/WebContent/admin/zixun_add_chuli.jsp new file mode 100644 index 0000000..b3e1986 --- /dev/null +++ b/tingchechang/WebContent/admin/zixun_add_chuli.jsp @@ -0,0 +1,41 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + +Insert title here + + + <% + 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(""); + } + 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(""); + } + con.close();} + } catch (Exception e) { + out.print("添加失败!"); + e.printStackTrace(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/zixun_mg.jsp b/tingchechang/WebContent/admin/zixun_mg.jsp new file mode 100644 index 0000000..e192386 --- /dev/null +++ b/tingchechang/WebContent/admin/zixun_mg.jsp @@ -0,0 +1,118 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+ + + + + + + + + + <% +int CountPage = 0; +int CurrPage = 1; +int PageSize = 12; +int CountRow = 0; +String StrPage = request.getParameter("Page"); +if (StrPage == null) +{ + CurrPage = 1; +} +else +{ + CurrPage = Integer.parseInt(StrPage); +} +Connection con=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 + + + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
公告编号公告名称公告内容时间修改删除
<%=rs.getString("id")%><%=rs.getString("Gg_titile")%><%=rs.getString("Gg_neirong")%><%=rs.getString("shijian")%>">修改&j=4">删除
+ + + + + + +
[<%=CurrPage%>/<%=CountPage %>] + 每页<%=PageSize %>条 共<%=CountRow%>条记录 + +
+ <% for (int i = 1;i<=CountPage;i++){%> + [<%=i%>] + + <%}%> +
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/zixun_up.jsp b/tingchechang/WebContent/admin/zixun_up.jsp new file mode 100644 index 0000000..c64fd4a --- /dev/null +++ b/tingchechang/WebContent/admin/zixun_up.jsp @@ -0,0 +1,60 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + +
+ + + +
 
<% +String id=request.getParameter("id"); +String sqlb="select * from gg where id='"+ id +"'"; +ResultSet rs3=info.GetRs(sqlb); +if(rs3.next()) +{ + +%> +
+ + + + + + + + + + + + + + + + + + + + + +
公告修改
 参数编号:
 公告标题: " />
 公告内容:
       
+
<%} %>
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/admin/zixun_update.jsp b/tingchechang/WebContent/admin/zixun_update.jsp new file mode 100644 index 0000000..833c05a --- /dev/null +++ b/tingchechang/WebContent/admin/zixun_update.jsp @@ -0,0 +1,37 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + <% + 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(""); + } + // 关闭PreparedStatement,释放资源 + ps.close(); + // 关闭Connection,释放资源 + con.close(); + } catch (Exception e) { + out.print("更新失败!"); + e.printStackTrace(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/css/style.css b/tingchechang/WebContent/css/style.css new file mode 100644 index 0000000..012bb63 --- /dev/null +++ b/tingchechang/WebContent/css/style.css @@ -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 +} \ No newline at end of file diff --git a/tingchechang/WebContent/denglu.jsp b/tingchechang/WebContent/denglu.jsp new file mode 100644 index 0000000..d86222d --- /dev/null +++ b/tingchechang/WebContent/denglu.jsp @@ -0,0 +1,50 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
  
 账户:
 密码:
 权限: +
 
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/dengluchuli.jsp b/tingchechang/WebContent/dengluchuli.jsp new file mode 100644 index 0000000..2b89dbd --- /dev/null +++ b/tingchechang/WebContent/dengluchuli.jsp @@ -0,0 +1,55 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + +Insert title here + + + <% + +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(""); + } + else{ + out.println(""); + } + 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(""); + } + else{ + out.println(""); + } + guanli.closed(); +} + + + + +%> + + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/chewei_list.jsp b/tingchechang/WebContent/huiyuan/chewei_list.jsp new file mode 100644 index 0000000..7837f8e --- /dev/null +++ b/tingchechang/WebContent/huiyuan/chewei_list.jsp @@ -0,0 +1,119 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+
+ + + + + +
  车位检索:
+
+ + + + + + + + + <% +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 + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
车位编号车位类型当前状态车位位置
<%=rs.getString("chewei_no")%><%=rs.getString("chewei_type")%><%=rs.getString("chewei_state")%><%=rs.getString("chewei_didian")%>
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/ck_up.jsp b/tingchechang/WebContent/huiyuan/ck_up.jsp new file mode 100644 index 0000000..a99562d --- /dev/null +++ b/tingchechang/WebContent/huiyuan/ck_up.jsp @@ -0,0 +1,70 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
<% + //判断是否有该用户信息 +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{ +%> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
 账户: " />
 密码: " />
 电话: " />
 简介:
   
+
<%} %>
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/g_zhifu_chuli.jsp b/tingchechang/WebContent/huiyuan/g_zhifu_chuli.jsp new file mode 100644 index 0000000..8047273 --- /dev/null +++ b/tingchechang/WebContent/huiyuan/g_zhifu_chuli.jsp @@ -0,0 +1,60 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + + + + + +Insert title here + + + <% + 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(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/gg_list.jsp b/tingchechang/WebContent/huiyuan/gg_list.jsp new file mode 100644 index 0000000..48622e0 --- /dev/null +++ b/tingchechang/WebContent/huiyuan/gg_list.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+ + + + + + + + <% +int CountPage = 0; +int CurrPage = 1; +int PageSize = 12; +int CountRow = 0; +String StrPage = request.getParameter("Page"); +if (StrPage == null) +{ + CurrPage = 1; +} +else +{ + CurrPage = Integer.parseInt(StrPage); +} +Connection con=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 + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
标题内容时间
<%=rs.getString("Gg_titile")%><%=rs.getString("Gg_neirong")%><%=rs.getString("shijian")%>
+ + + + + + +
[<%=CurrPage%>/<%=CountPage %>] + 每页<%=PageSize %>条 共<%=CountRow%>条记录 + +
+ <% for (int i = 1;i<=CountPage;i++){%> + [<%=i%>] + + <%}%> +
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/guke_zhifu.jsp b/tingchechang/WebContent/huiyuan/guke_zhifu.jsp new file mode 100644 index 0000000..46d49dc --- /dev/null +++ b/tingchechang/WebContent/huiyuan/guke_zhifu.jsp @@ -0,0 +1,80 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + + +
+ + + +
 
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
顾客支付
 顾客名称:
 账户类型:
 支付方式: +
 支付金额:
 备注说明:
       
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/h_index.jsp b/tingchechang/WebContent/huiyuan/h_index.jsp new file mode 100644 index 0000000..1767d49 --- /dev/null +++ b/tingchechang/WebContent/huiyuan/h_index.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + + + + + + + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/h_left.jsp b/tingchechang/WebContent/huiyuan/h_left.jsp new file mode 100644 index 0000000..77e6862 --- /dev/null +++ b/tingchechang/WebContent/huiyuan/h_left.jsp @@ -0,0 +1,38 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + +Insert title here + + + + + + + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/h_zhifu_chuli.jsp b/tingchechang/WebContent/huiyuan/h_zhifu_chuli.jsp new file mode 100644 index 0000000..830c9de --- /dev/null +++ b/tingchechang/WebContent/huiyuan/h_zhifu_chuli.jsp @@ -0,0 +1,60 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + + + + + +Insert title here + + + <% + 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(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/huiyuan_zhifu.jsp b/tingchechang/WebContent/huiyuan/huiyuan_zhifu.jsp new file mode 100644 index 0000000..31630b5 --- /dev/null +++ b/tingchechang/WebContent/huiyuan/huiyuan_zhifu.jsp @@ -0,0 +1,80 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + + +
+ + + +
 
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
会员支付
 会员名称:
 账户类型:
 支付方式: +
 支付金额:
 备注说明:
       
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/stu_update.jsp b/tingchechang/WebContent/huiyuan/stu_update.jsp new file mode 100644 index 0000000..a746d6d --- /dev/null +++ b/tingchechang/WebContent/huiyuan/stu_update.jsp @@ -0,0 +1,39 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + +Insert title here + + + <% + 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(""); + } + // 关闭PreparedStatement,释放资源 + ps.close(); + // 关闭Connection,释放资源 + con.close(); + } catch (Exception e) { + out.print("更新失败!"); + e.printStackTrace(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/tingche_chaxun.jsp b/tingchechang/WebContent/huiyuan/tingche_chaxun.jsp new file mode 100644 index 0000000..5352c87 --- /dev/null +++ b/tingchechang/WebContent/huiyuan/tingche_chaxun.jsp @@ -0,0 +1,119 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+
+ + + + + +
  消费检索:
+
+ + + + + + + + + + <% +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 + + + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
账户信息支付方式支付金额备注信息支付时间
<%=rs.getString("username")%><%=rs.getString("zhifu_type")%><%=rs.getString("jine")%><%=rs.getString("beizhu")%><%=rs.getString("shijian")%>
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/huiyuan/weigui_list.jsp b/tingchechang/WebContent/huiyuan/weigui_list.jsp new file mode 100644 index 0000000..d7924ba --- /dev/null +++ b/tingchechang/WebContent/huiyuan/weigui_list.jsp @@ -0,0 +1,112 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + +Insert title here + + + + + + + +
+ + + +
 
+
+ + + + + +
  车牌号码:
+
+ + + + + + + + <% +int CountPage = 0; +int CurrPage = 1; +int PageSize = 12; +int CountRow = 0; +String StrPage = request.getParameter("Page"); +if (StrPage == null) +{ + CurrPage = 1; +} +else +{ + CurrPage = Integer.parseInt(StrPage); +} +Connection con=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 + + + + + + <% + rs.next(); + i++; + } + } + } + + catch (SQLException e) + { + out.println(e.getMessage()); + } + finally + { + con.close(); + } + } + %> +
车牌号码当前状态必要说明
<%=rs.getString("chepaihao")%><%=rs.getString("states")%><%=rs.getString("shuoming")%>
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/image/LEFT-yonghu.jpg b/tingchechang/WebContent/image/LEFT-yonghu.jpg new file mode 100644 index 0000000..a287c26 Binary files /dev/null and b/tingchechang/WebContent/image/LEFT-yonghu.jpg differ diff --git a/tingchechang/WebContent/image/LEFT-yonghu.psd b/tingchechang/WebContent/image/LEFT-yonghu.psd new file mode 100644 index 0000000..c065ce8 Binary files /dev/null and b/tingchechang/WebContent/image/LEFT-yonghu.psd differ diff --git a/tingchechang/WebContent/image/LEFT.jpg b/tingchechang/WebContent/image/LEFT.jpg new file mode 100644 index 0000000..976b764 Binary files /dev/null and b/tingchechang/WebContent/image/LEFT.jpg differ diff --git a/tingchechang/WebContent/image/LEFT.psd b/tingchechang/WebContent/image/LEFT.psd new file mode 100644 index 0000000..5ffad4e Binary files /dev/null and b/tingchechang/WebContent/image/LEFT.psd differ diff --git a/tingchechang/WebContent/image/RIGHT.jpg b/tingchechang/WebContent/image/RIGHT.jpg new file mode 100644 index 0000000..c875185 Binary files /dev/null and b/tingchechang/WebContent/image/RIGHT.jpg differ diff --git a/tingchechang/WebContent/image/RIGHT.psd b/tingchechang/WebContent/image/RIGHT.psd new file mode 100644 index 0000000..d3dd8c9 Binary files /dev/null and b/tingchechang/WebContent/image/RIGHT.psd differ diff --git a/tingchechang/WebContent/image/TOP.jpg b/tingchechang/WebContent/image/TOP.jpg new file mode 100644 index 0000000..446176e Binary files /dev/null and b/tingchechang/WebContent/image/TOP.jpg differ diff --git a/tingchechang/WebContent/image/TOP.psd b/tingchechang/WebContent/image/TOP.psd new file mode 100644 index 0000000..b264040 Binary files /dev/null and b/tingchechang/WebContent/image/TOP.psd differ diff --git a/tingchechang/WebContent/image/Thumbs.db b/tingchechang/WebContent/image/Thumbs.db new file mode 100644 index 0000000..cd7baad Binary files /dev/null and b/tingchechang/WebContent/image/Thumbs.db differ diff --git a/tingchechang/WebContent/image/login.jpg b/tingchechang/WebContent/image/login.jpg new file mode 100644 index 0000000..68b6d65 Binary files /dev/null and b/tingchechang/WebContent/image/login.jpg differ diff --git a/tingchechang/WebContent/image/login.psd b/tingchechang/WebContent/image/login.psd new file mode 100644 index 0000000..c4efe4c Binary files /dev/null and b/tingchechang/WebContent/image/login.psd differ diff --git a/tingchechang/WebContent/image/reg.jpg b/tingchechang/WebContent/image/reg.jpg new file mode 100644 index 0000000..a7c808b Binary files /dev/null and b/tingchechang/WebContent/image/reg.jpg differ diff --git a/tingchechang/WebContent/out.jsp b/tingchechang/WebContent/out.jsp new file mode 100644 index 0000000..0fdd3ab --- /dev/null +++ b/tingchechang/WebContent/out.jsp @@ -0,0 +1,7 @@ + +<% +session.setAttribute("ck",null); +session.setAttribute("siji",null); +session.setAttribute("guanliyuan",null); +response.sendRedirect("denglu.jsp"); +%> diff --git a/tingchechang/WebContent/reg.jsp b/tingchechang/WebContent/reg.jsp new file mode 100644 index 0000000..346e4b5 --- /dev/null +++ b/tingchechang/WebContent/reg.jsp @@ -0,0 +1,98 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  
 用户账号:
 用户密码:
 车牌号码: +
 卡内金额:
 真实姓名:
 联系方式:
 用户简介:
   
+
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/reg_do.jsp b/tingchechang/WebContent/reg_do.jsp new file mode 100644 index 0000000..c3584ac --- /dev/null +++ b/tingchechang/WebContent/reg_do.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030" import="java.sql.*"%> + + + + + + +Insert title here + + + <% + 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(""); + } + 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(""); + } + con.close();} + } catch (Exception e) { + out.print("注册失败!"); + e.printStackTrace(); + } + %> + + \ No newline at end of file diff --git a/tingchechang/WebContent/right.jsp b/tingchechang/WebContent/right.jsp new file mode 100644 index 0000000..23e110c --- /dev/null +++ b/tingchechang/WebContent/right.jsp @@ -0,0 +1,18 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + +
 
+ + \ No newline at end of file diff --git a/tingchechang/WebContent/top.jsp b/tingchechang/WebContent/top.jsp new file mode 100644 index 0000000..fdb7e7a --- /dev/null +++ b/tingchechang/WebContent/top.jsp @@ -0,0 +1,19 @@ +<%@ page language="java" contentType="text/html; charset=GB18030" + pageEncoding="GB18030"%> + + + + +Insert title here + + + + + + + +
+ + \ No newline at end of file diff --git a/tingchechang/src/com/Char.java b/tingchechang/src/com/Char.java new file mode 100644 index 0000000..1f25449 --- /dev/null +++ b/tingchechang/src/com/Char.java @@ -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; + } +} diff --git a/tingchechang/src/com/Charcode.java b/tingchechang/src/com/Charcode.java new file mode 100644 index 0000000..e5d30a6 --- /dev/null +++ b/tingchechang/src/com/Charcode.java @@ -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; + } +} + diff --git a/tingchechang/src/com/DB.java b/tingchechang/src/com/DB.java new file mode 100644 index 0000000..d452b1c --- /dev/null +++ b/tingchechang/src/com/DB.java @@ -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; + } +} + + diff --git a/tingchechang/src/com/Dialog.java b/tingchechang/src/com/Dialog.java new file mode 100644 index 0000000..234ad0a --- /dev/null +++ b/tingchechang/src/com/Dialog.java @@ -0,0 +1,10 @@ +package com; + +public class Dialog { + + public String messageBox(String message,String url){ + String str=""; + return str; + } +} \ No newline at end of file diff --git a/tingchechang/src/com/Shijian.java b/tingchechang/src/com/Shijian.java new file mode 100644 index 0000000..a2d56e7 --- /dev/null +++ b/tingchechang/src/com/Shijian.java @@ -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); + } +} diff --git a/tingchechang/src/com/edit/Chewei.java b/tingchechang/src/com/edit/Chewei.java new file mode 100644 index 0000000..19d8c77 --- /dev/null +++ b/tingchechang/src/com/edit/Chewei.java @@ -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; + } +} diff --git a/tingchechang/src/com/edit/Info_add.java b/tingchechang/src/com/edit/Info_add.java new file mode 100644 index 0000000..59d8271 --- /dev/null +++ b/tingchechang/src/com/edit/Info_add.java @@ -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; + } + + +} diff --git a/tingchechang/src/com/edit/Zhifu.java b/tingchechang/src/com/edit/Zhifu.java new file mode 100644 index 0000000..6721028 --- /dev/null +++ b/tingchechang/src/com/edit/Zhifu.java @@ -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; + } + +} diff --git a/tingchechang/src/com/servlet/Cw_deleteServlet.java b/tingchechang/src/com/servlet/Cw_deleteServlet.java new file mode 100644 index 0000000..e889f42 --- /dev/null +++ b/tingchechang/src/com/servlet/Cw_deleteServlet.java @@ -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"); + } +} diff --git a/tingchechang/src/com/servlet/Hf_Servlet.java b/tingchechang/src/com/servlet/Hf_Servlet.java new file mode 100644 index 0000000..aa7ce36 --- /dev/null +++ b/tingchechang/src/com/servlet/Hf_Servlet.java @@ -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(""); + response.sendRedirect("./admin/weigui_huifu.jsp"); + } +} diff --git a/tingchechang/src/com/servlet/Wg_delServlet.java b/tingchechang/src/com/servlet/Wg_delServlet.java new file mode 100644 index 0000000..ba66589 --- /dev/null +++ b/tingchechang/src/com/servlet/Wg_delServlet.java @@ -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"); + } +}