版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、前台界面是用HTML实现,具体代码功能如下:Login.jsp文件:用于客户的登录<% page language="java" pageEncoding="UTF-8"%><%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"
2、%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><base href="<%=basePath%>"><title>登录页面</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control"
3、; content="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><style type="text/c
4、ss">bodybackground-image:url(images/background/6.jpg);background-repeat:repeat-x;</style></head><body bgcolor=lightblue><a href=dkcanting.jsp>返回首页</a><form name="form1" action="UserServlet?method=login" method="post"><table
5、 width="200" border="1" align=center><tr><td colspan="2">登录窗口</td><tr><td>用户名</td><td><input type="text" name="User_ID" size="10"></td></tr><tr><td>密码</td><
6、td><input type="password" name="Password" size="10"></td></tr><tr><td colspan="2"><input type="submit" name="submit" value="登录"> <ahref="register.jsp">注册新用户</a></td&g
7、t;</tr></table></form></body></html>Login_admin.jsp文件:用于管理员的登录<% page language="java" pageEncoding="UTF-8"%><%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":&qu
8、ot; + request.getServerPort()+ path + "/"%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><base href="<%=basePath%>"><title>登录页面</title><meta http-equiv="pragma" content="no-cache&qu
9、ot;><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="T
10、his is my page"><style type="text/css">bodybackground-image:url(images/background/6.jpg);background-repeat:repeat-x;</style></head><body bgcolor=lightblue><form name="form1" action="UserServlet?method=login_admin" method="post&quo
11、t;><table width="200" border="1" align=center><tr><td colspan="2">管理员登录</td><tr><td>用户名</td><td><input type="text" name="User_ID" size="10"></td></tr><tr><td>密
12、码</td><td><input type="password" name="Password" size="10"></td></tr><tr><td colspan="2"><input type="submit" name="submit" value="登录"> </td></tr></table></form&
13、gt;</body></html>Register.jsp文件:用于客户的注册<% page language="java" pageEncoding="UTF-8"%><%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + &qu
14、ot;/"%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><base href="<%=basePath%>"><title>注册页面</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-co
15、ntrol" content="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><style type=&q
16、uot;text/css">bodybackground-image:url(images/background/6.jpg);background-repeat:repeat-x;</style></head><body bgcolor=lightblue><a href=dkcanting.jsp>返回首页</a><form name="form1" action="UserServlet?method=register" method="post"
17、><table width="200" border="1" align=center><tr><td colspan="2">注册窗口</td><tr><td>用户名</td><td><input type="text" name="User_ID" size="10"></td></tr><tr><td>密码&l
18、t;/td><td><input type="password" name="Password1" size="10"></td></tr><tr><td>确认密码</td><td><input type="password" name="Password2" size="10"></td></tr><tr><td>
19、联系电话</td><td><input type="text" name="User_Tel" size="10"></td></tr><tr><td>送餐地址</td><td><input type="text" name="User_Address" size="10"></td></tr><tr><td col
20、span="4" align=center><input type="submit" name="submit" value="注册"> </td></tr></table></form></body></html>Admin_center.jsp文件:管理员中心界面,管理全部信息<% page language="java" pageEncoding="UTF-8"%>&l
21、t;%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><base h
22、ref="<%=basePath%>"><title>管理员</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"><meta http-equ
23、iv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><style type="text/css">bodybackground-image:url(images/background/6.jpg);background-repeat:repeat-x;</style></head>
24、<body bgcolor=lightyellow text=black link=red alink=green vlink=blue><p align = right><%String n = (String)session.getAttribute("User_ID");if(n = null)%><a href="login_admin.jsp">登录</a><%else%><form name="form1" action="UserSe
25、rvlet?method=logout_admin" method="post">欢迎你,<%= session.getAttribute("User_ID")%><input type="submit" name="submit" value="退出"></form><% %><table><tr><td><form name="form2" action="
26、Dish_copyServlet?method=type" method="post" ><select name=Type_Name><option>面食<option>川菜<option>粤菜<option>鲁菜<option>浙菜<option>徽菜<option>闽菜<option>湘菜<option>苏菜</select><p><input type=submit value="搜索&quo
27、t;></form></td></table><form name="form2" action="Dish_copyServlet?method=select" method="post" > <p align = center><input type="text" name="Dish_Name" size="40" ><input type="submit" name
28、="submit" value="DK一下" ></p></form><br><br><br><br><center><form action="dingdan.jsp" method="get"><input type="submit" name="button" value="查看订单" id="button" style=&
29、quot;width:150px;height:30px;"></form></center></body></html>Detail.jsp文件:用于查看美食的详细信息,在此页面可以提交订单<% page language="java" import="java.util.*" pageEncoding="UTF-8"%><% page language="java" import="com.dingcan.javabea
30、n.*" %><%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><h
31、ead><base href="<%=basePath%>"><title>管理员</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0">
32、<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><style type="text/css">bodybackground-image:url(images/background/6.jpg);background-repeat:repeat-x;</style
33、></head><body bgcolor=lightyellow text=black link=red alink=green vlink=blue><p align = right><%String n = (String)session.getAttribute("User_ID");if(n = null)%><a href="login_admin.jsp">登录</a><%else%><form name="form1" ac
34、tion="UserServlet?method=logout_admin" method="post">欢迎你,<%= session.getAttribute("User_ID")%><input type="submit" name="submit" value="退出"></form><% %><table><tr><td><form name="form2&qu
35、ot; action="Dish_copyServlet?method=type" method="post" ><select name=Type_Name><option>面食<option>川菜<option>粤菜<option>鲁菜<option>浙菜<option>徽菜<option>闽菜<option>湘菜<option>苏菜</select><p><input type=submit v
36、alue="搜索"></form></td></table><form name="form2" action="Dish_copyServlet?method=select" method="post" > <p align = center><input type="text" name="Dish_Name" size="40" ><input type="
37、submit" name="submit" value="DK一下" ></p></form><br><br><center><form action="OrderServlet?method=fahuo" method="post"><table border="1"><% String Order_ID=(String) session.getAttribute("Order_
38、ID");List<Orderdish> list=new ArrayList<Orderdish>();OrderBean orderBean=new OrderBean();list = orderBean.getOrderdish1(Order_ID);for(int i=0;i<list.size();i+)%><tr><td><input type="hidden" name="Order_ID" value="<%=list.get(i).getOrd
39、er_ID() %>"></td><td> <img src="<%=list.get(i).getUrl()%>" height="40px" width="60px"></td><td> 菜品编号: <%=list.get(i).getDish_ID() %> </td><td> 菜名: <%=list.get(i).getDish_Name() %> </td><td&g
40、t; 类型: <%=list.get(i).getType_ID() %> </td><td> 价格: <%=list.get(i).getDish_Name() %> </td></tr><%></table><input type="submit" name="submit" value="发货" style="width:100px;height:30px;"></form><br&g
41、t;<br></center></body></html>Dingdan.jsp文件:管理员查看订单详情<% page language="java" import="java.util.*" pageEncoding="UTF-8"%><% page language="java" import="com.dingcan.javabean.*" %><%String path = request.getContext
42、Path();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><base href="<%=basePath%>"
43、><title>查询结果页面</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="keywords" content=
44、"keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><style type="text/css">bodybackground-image:url(images/background/6.jpg);background-repeat:repeat-x;</style></head><body><body bgcolor=lig
45、htyellow text=black link=red alink=green vlink=blue><a href="admin_center.jsp">返回首页</a><p align = right><%String n = (String)session.getAttribute("User_ID");if(n = null)%><a href="login_admin.jsp">登录</a><%else%><form name=
46、"form1" action="UserServlet?method=logout_admin" method="post">欢迎你,<%= session.getAttribute("User_ID")%><input type="submit" name="submit" value="退出"></form><% %><table><tr><td><form
47、 name="form2" action="Dish_copyServlet?method=type" method="post" ><select name=Type_Name><option>面食<option>川菜<option>粤菜<option>鲁菜<option>浙菜<option>徽菜<option>闽菜<option>湘菜<option>苏菜</select><p><
48、;input type=submit value="搜索"></form></td></table><form name="form2" action="Dish_copyServlet?method=select" method="post" > <p align = center><input type="text" name="Dish_Name" size="40" >&
49、lt;input type="submit" name="submit" value="DK一下" ></p></form><br><br><center><% List<Order> list=new ArrayList<Order>();OrderBean orderBean=new OrderBean();list = orderBean.getOrd();for(int i=0;i<list.size();i+)%>&l
50、t;form action="OrderServlet?method=detail1" method="post"><table border="1"><tr><td><input type="hidden" name="Order_ID" value="<%=list.get(i).getOrder_ID() %>"></td><td> 订单编号:<%=list.get(i).g
51、etOrder_ID() %> </td><td> 顾客姓名:<%=list.get(i).getUser_ID() %> </td><td> 订单状态: <%=list.get(i).getOder_State() %> </td><td> 总价: <%=list.get(i).getSumPrice() %> </td><td> <input type="submit" name="submit" value
52、="订单详情" style="width:100px;height:30px;"></td></tr></table></form><%><br><br></center></body></html>Dkcanting.jsp文件:主页面,用户可以注册,登录,可以查询关于美食的所需信息<% page language="java" pageEncoding="UTF-8"%>&l
53、t;% page language="java" import="java.sql.*"%><% page language="java" import="com.dingcan.javabean.DBAccess" %><%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":"
54、+ request.getServerPort()+ path + "/"%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><base href="<%=basePath%>"><title>DK餐厅,订餐首选!</title><meta http-equiv="pragma" content="no-cache&
55、quot;><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="
56、;This is my page"><style type="text/css">bodybackground-image:url(images/background/6.jpg);background-repeat:repeat-x;</style></head><body bgcolor=lightyellow text=black link=red alink=green vlink=blue><% DBAccess db = new DBAccess();db.createConn(); db.q
57、uery("select * from dish"); System.out.println("-");/ 结果集的对象ResultSet rs= db.getRs();/ 对结果集进行输出while(rs.next()System.out.println("菜名:"+rs.getString("Dish_Name")+"t"+"价格:"+rs.getString("Price");%><a href="dkcanting.jsp&q
58、uot;>返回首页</a><p align = right><%String n = (String)session.getAttribute("User_ID");if(n = null)%><a href="login.jsp">登录</a><a href="register.jsp">注册</a><%else%><form name="form1" action="UserServlet?me
59、thod=logout" method="post">欢迎你,<a href=user_center.jsp><%= session.getAttribute("User_ID")%></a><input type="submit" name="submit" value="退出"></form><% %><a href=gouwuche.jsp>我的购物车</a><br>
60、<br><table><tr><td><form name="form2" action="DishServlet?method=type" method="post" ><select name=Type_Name><option>面食<option>川菜<option>粤菜<option>鲁菜<option>浙菜<option>徽菜<option>闽菜<option>
61、;湘菜<option>苏菜</select><p><input type=submit value="搜索"></form></td></table><form name="form2" action="DishServlet?method=select" method="post" > <p align = center><input type="text" name="
62、Dish_Name" size="40" ><input type="submit" name="submit" value="DK一下" ></p></form></body></html>Gouwuche.jsp文件:用户将所需美食放进购物车,在此可以提交订单,可以取消订单<% page language="java" import="java.util.*" pageEncoding=&q
63、uot;UTF-8"%><% page language="java" import="com.dingcan.javabean.*" %><%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"%><
64、!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><base href="<%=basePath%>"><title>我的购物车</title><meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" conten
65、t="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><style type="text/css"
66、>bodybackground-image:url(images/background/6.jpg);background-repeat:repeat-x;</style></head><body><body bgcolor=lightyellow text=black link=red alink=green vlink=blue><a href="dkcanting.jsp">返回首页</a><p align = right><%String n = (String)sess
67、ion.getAttribute("User_ID");if(n = null)%><a href="login.jsp">登录</a><a href="register.jsp">注册</a><%else%><form name="form1" action="UserServlet?method=logout" method="post欢迎你,<a href=user_center.jsp><
68、%= session.getAttribute("User_ID")%></a><input type="submit" name="submit" value="退出"></form><% %><a href=gouwuche.jsp>我的购物车</a><br><br><table><tr><td><form name="form2" action=&
69、quot;DishServlet?method=type" method="post" ><select name=Type_Name><option>面食<option>川菜<option>粤菜<option>鲁菜<option>浙菜<option>徽菜<option>闽菜<option>湘菜<option>苏菜</select><p><input type=submit value="搜索&quo
70、t;></form></td></table><form name="form2" action="DishServlet?method=select" method="post" > <p align = center><input type="text" name="Dish_Name" size="40" ><input type="submit" name=&quo
71、t;submit" value="DK一下" ></p></form><br><br><center> <form action="DishServlet?method=cancel" method="post"><table border="1"><% String User_ID=(String) session.getAttribute("User_ID");List<Car&g
72、t; list=new ArrayList<Car>();CarBean carBean=new CarBean();list = carBean.getCar(User_ID);for(int i=0;i<list.size();i+)%><tr> <td> <img src="<%=list.get(i).getUrl()%>" height="40px" width="60px"></td><td> <input type=&q
73、uot;hidden" name="Dish_ID" value="<%=list.get(i).getDish_ID() %>"> <input type="hidden" name="User_ID" value="<%=list.get(i).getUser_ID() %>"></td><td> 菜名:<%=list.get(i).getDish_Name() %> </td><td&
74、gt; 菜价: <%=list.get(i).getPrice() %> </td><td> 菜系: <%=list.get(i).getType_ID() %> </td><td><input type="submit" name="submit" value="取消订单" style="width:100px;height:30px;"></td></tr><% %></table>
75、;</form><br><br><form action="DishServlet?method=submitorder" method="post"><input type="submit" name="submit" value="提交订单" style="width:120px;height:50px;"></form></center></body></html>
76、;Orderdetail.jsp文件:订单详情页面<% page language="java" import="java.util.*" pageEncoding="UTF-8"%><% page language="java" import="com.dingcan.javabean.*" %><%String path = request.getContextPath();String basePath = request.getScheme() + &quo
77、t;:/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><base href="<%=basePath%>"><title>我的购物车</title><meta http-e
78、quiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><st
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 电动车充电停车位租赁协议
- 临床医生进修学习协议书
- 2024年度江西省国家保安员资格考试高分通关题型题库附解析答案
- 创业公司团队合作协议书
- 《道路收费设施》课件
- 【物理课件】日光灯的原理课件
- 2025届福建省莆田市第二十四中学中考生物模拟试题含解析
- 安徽省阜阳市临泉县达标名校2025届中考五模生物试题含解析
- 刮板输送机安全运行规定(2篇)
- 汽车销售岗位职责范文(2篇)
- 大学《保险学》期末复习重点及考试试题(单选、多选、名词解释、简答题等)
- 2024年考研(英语一)真题及参考答案
- 山东省济南市2023-2024学年高二上学期期末考试物理试题 附答案
- 9《小水滴的诉说》 (说课稿)部编版道德与法治二年级上册
- 幼儿园交通安全一校一策方案
- 2023年海南公务员考试申论试题(C卷)
- 委托销售合同代销合同范例
- 电信基站UPS系统维护与改造方案
- 居家养老服务人员考核管理制度
- 装配式围挡施工方案
- 公司保安员培训内容
评论
0/150
提交评论