版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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><basehref="<%=basePath%>"><title >登录页面 </ title ><meta http-equiv ="pragma" content="no-cache" ><meta http-equiv ="
3、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" >&
4、lt;style type ="text/css" >body background-image :url(images/background/6.jpg) ; background-repeat :repeat-x ;</style></head><body bgcolor =lightblue ><ahref=dkcanting.jsp >返回首页 </a><form name="form1" action ="UserServlet?method=login"
5、; method ="post" > <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>
6、 </tr> <tr><td> 密码 </td><td><input type ="password" name= "Password" size="10"></td> </tr><tr><td colspan = "2" ><input type="submit" name="submit" value="登录"> <
7、a href ="register.jsp" >注册新用户 </a></td></tr></table></form ></ body ></html >Login_admin.jsp 文件:用于管理员的登录<% page language= "java" pageEncoding ="UTF-8" %><%String path = request.getContextPath();String basePath = requ
8、est.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort() + path + "/" ;%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"> <html ><head><basehref="<%=basePath%>"><title >登录页面 &l
9、t;/ 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="keyword1,
10、keyword2,keyword3" ><meta http-equiv ="description" content="This is my page" ><style type ="text/css" >body background-image :url(images/background/6.jpg) ; background-repeat :repeat-x ;</style></head><body bgcolor =lightblue ><
11、form name="form1" action ="UserServlet?method=login_admin"method= "post" ><table width ="200" border ="1" align =center ><tr><td colspan = "2">管理员登录 </td><tr><td>用户名</td><td><input type=
12、"text" name="User_ID" size="10"></td> </tr> <tr><td> 密码 </td><td><input type ="password" name= "Password" size="10"></td></tr><tr><td colspan = "2" ><input ty
13、pe="submit" name="submit" value="登录"></td> </tr></table></form></body></html>Register.jsp 文件:用于客户的注册<% page language="java" pageEncoding="UTF-8" %><%String path = request.getContextPath();String basePat
14、h = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort() + path + "/" ;%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><basehref="<%=basePath%>"><title >注
15、册页面 </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= "keywor
16、d1,keyword2,keyword3" ><meta http-equiv ="description" content="This is my page" ><style type="text/css" >body background-image :url(images/background/6.jpg) ; background-repeat :repeat-x ;</style></head><body bgcolor =lightblue >&l
17、t;a href=dkcanting.jsp >返回首页 </a><form name="form1" action ="UserServlet?method=register" method="post"> <table width ="200" border ="1" align=center><tr><td colspan = "2">注册窗口 </td><tr><td>
18、;用户名</td><td><input type="text" name="User_ID" size="10"></td></tr><tr><td> 密码 </td><td >< input type ="password " name= "Password1" size="10" ></td></tr><tr><
19、td>确认密码</td><td >< input type ="password " name= "Password2" size="10" ></td></tr><tr><td>联系 </td><td >< input type="text" name="User_Tel" size="10" ></td></tr><t
20、r><td >送餐地址 </td><td >< input type="text" name="User_Address" size="10" ></td></tr><tr><td colspan= "4" align=center><input type = "submit" name="submit"value="注册"></td&g
21、t;</tr></table></form></body></html>Admin_center.jsp 文件:管理员中心界面,管理全部信息<% page language="java" pageEncoding="UTF-8" %><%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + &
22、quot;:" + request.getServerPort()+ path + "/" ;%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><basehref="<%=basePath%>"><title >管理员 </title ><meta http-equiv ="pragma" content=&quo
23、t;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&
24、quot; content="This is my page" ><style type ="text/css" >body background-image :url(images/background/6.jpg) ; background-repeat :repeat-x ;</style></head><body bgcolor =lightyellow text =black link =red alink =green vlink = blue><p align = right &g
25、t;<%String n = (String)session.getAttribute( "User_ID" );if(n = null )%><a href ="login_admin.jsp" >登录 </a><%else %><form name="form1" action ="UserServlet?method=logout_admin" method="post" 欢迎你, <%= session.getAttribute
26、( "User_ID" )%><input type="submit" name="submit" value ="退出" ></ form ><% %><table><tr><td><form name="form2" action ="Dish_copyServlet?method=type" method="post" > <select name=Typ
27、e_Name><option >面食<option >川菜<option >粤菜<option >鲁菜<option >浙菜<option >徽菜<option >闽菜<option >湘菜<option >苏菜 </select>< p><input type=submit value="搜索"></form></td></table><form name="form2&q
28、uot; action="Dish_copyServlet?method=select" method="post" <p align = center><input type ="text" name="Dish_Name" size="40" ><input type="submit" name="submit" value ="DK 一下 " ></p></form >&
29、lt;br><br><br><br><center><form action = "dingdan.jsp" method="get" ><input type = "submit" name="button" value =" 查 看 订 单 " id="button" style="width:150px;height:30px;"></form ></ce
30、nter></ body ></html >Detail.jsp 文件:用于查看美食的详细信息,在此页面可以提交订单<% page language= "java" import = "java.util.*" pageEncoding ="UTF-8" %><% page language= "java" import = ".dingcan.javabean.*" %><%String path = request.getConte
31、xtPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/" ;%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html ><head><basehref="<%=basePath%>&q
32、uot;><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&qu
33、ot; content="keyword1,keyword2,keyword3" ><meta http-equiv ="description" content="This is my page" ><style type ="text/css" >body background-image :url(images/background/6.jpg) ;background-repeat :repeat-x ;</style></head><body b
34、gcolor =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 ="U
35、serServlet?method=logout_admin" method="post" 欢迎你, <%= session.getAttribute( "User_ID" )%><input type="submit" name="submit" value ="退出" ></ form ><% %><table><tr><td><form name="form2" acti
36、on ="Dish_copyServlet?method=type" method="post" ><select name=Type_Name><option >面食<option >川菜<option >粤菜<option >鲁菜<option >浙菜<option >徽菜<option >闽菜<option >湘菜<option >苏菜</select>< p><input type=submi
37、t 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" ><input type="su
38、bmit" 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( "O
39、rder_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.ge
40、t(i).getOrder_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() %><
41、/td><td>类型: <%= 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;"> </
42、form><br><br></center></body></html>Dingdan.jsp 文件:管理员查看订单详情<% pagelanguage="java" import="java.util.*" pageEncoding="UTF-8" %><% page language= "java" import = ".dingcan.javabean.*" %><%String path = r
43、equest.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort() + path + "/" ;%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"> <html ><head><basehref="<
44、%=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
45、iv ="keywords" content="keyword1,keyword2,keyword3" ><meta http-equiv ="description" content="This is my page" ><style type ="text/css" >body background-image :url(images/background/6.jpg) ; background-repeat :repeat-x ;</style>&
46、lt;/head>< body ><body bgcolor =lightyellow text =black link =red alink =green vlink = blue> <ahref="admin_center.jsp" >返回首页 </a><p align = right ><%String n = (String)session.getAttribute( "User_ID" );if(n = null )%><a href ="login_
47、admin.jsp" >登录 </a><%else %><form name="form1" action ="UserServlet?method=logout_admin" method="post" > 欢迎你, <%= session.getAttribute( "User_ID" )%><input type="submit" name="submit" value ="退出"
48、 ></ form ><% %><table><tr><td><form name="form2" action ="Dish_copyServlet?method=type" method="post" ><select name=Type_Name><option >面食<option >川菜<option >粤菜<option >鲁菜<option >浙菜<option &g
49、t;徽菜<option >闽菜<option >湘菜<option >苏菜</select>< p><input type=submit value="搜索"></form></td></table><form name="form2" action="Dish_copyServlet?method=select" method="post" > <p align = center>&
50、lt;input type ="text" name="Dish_Name" size="40" ><input type="submit" name="submit" value="DK 一下 " ></p></form><br><br><center><%List<Order> list= new ArrayList<Order>();OrderBean order
51、Bean= new OrderBean();list = orderBean.getOrd();for (int i=0;i<list.size();i+)%><form action ="OrderServlet?method=detail1" method="post"><table border="1" >%>"></td><tr><td><input type="hidden" name ="Ord
52、er_ID" value="<%= list.get(i).getOrder_ID() <td>订 单编号: <%= list.get(i).getOrder_ID() %></td><td>顾 客: <%= list.get(i).getUser_ID() %></td><td>订单状态: <%= list.get(i).getOder_State() %></td><td>总价: <%= list.get(i).getSumPrice()
53、%></td><td><input type="submit" name="submit" value =" 订 单 详 情 style="width:100px;height:30px;"></td></tr></ table></ form ><%><br><br></center></ body ></html >Dkcanting.jsp 文件:主页面,用户
54、可以注册,登录,可以查询 关于美食的所需信息<% page language= "java" pageEncoding ="UTF-8" %><% page language= "java" import = "java.sql.*" %><% page language= "java" import = ".dingcan.javabean.DBAccess" %><%String path = request.getContext
55、Path();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/" ;%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html ><head><basehref="<%=basePath%>&quo
56、t;><title >DK 餐厅,订餐首选! </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 ="keywo
57、rds" content="keyword1,keyword2,keyword3" ><meta http-equiv ="description" content="This is my page" ><style type ="text/css" > body background-image :url(images/background/6.jpg) ; background-repeat :repeat-x ;</style></head>&l
58、t;body bgcolor =lightyellow text =black link =red alink =green vlink = blue> <%DBAccess db = new DBAccess(); db.createConn(); db.query( "select * from dish" );System.out.println( "" );/ 结果集的对象ResultSet rs= db.getRs();/ 对结果集进行输出while (rs.next()System.out.println( " 菜 名
59、:" +rs.getString( "Dish_Name" )+"t" +" 格:" +rs.getString( "Price" );%><ahref="dkcanting.jsp" >返回首页 </a><p align = right ><%String n = (String)session.getAttribute( "User_ID" );if(n = null ) %><a href="
60、;login.jsp" >登录 </a><a href ="register.jsp" >注册 </a><%else %><form name="form1" action ="UserServlet?method=logout" method= "post" > 欢迎你, <a href=user_center.jsp ><%= session.getAttribute( "User_ID" )%&g
61、t;</a><input type="submit" name="submit" value ="退出" ></ form ><% %><a href=gouwuche.jsp>我的购物车 </a><br><br><table><tr><td><form name="form2" action ="DishServlet?method=type" method
62、="post" ><select name=Type_Name><option >面食<option >川菜<option >粤菜<option >鲁菜<option >浙菜<option >徽菜<option >闽菜<option >湘菜<option >苏菜</select>< p><input type=submit value="搜索"></form></td>&
63、lt;/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="submit" value="DK 一
64、下 " ></p></form></body></html>Gouwuche.jsp 文件:用户将所需美食放进购物车,在此可以提 交订单,可以取消订单<% page language="java" import="java.util.*" pageEncoding="UTF-8" %><% page language="java" import =".dingcan.javabean.*" %><%St
65、ring path = request.getContextPath();String basePath = request.getScheme() + ":/"+ request.getServerName() + ":" + request.getServerPort()+ path + "/" ;%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><basehref=
66、"<%=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
67、-equiv ="keywords" content= "keyword1,keyword2,keyword3" ><meta http-equiv ="description" content="This is my page" ><style type="text/css" >body background-image :url(images/background/6.jpg) ; background-repeat :repeat-x ;</style&
68、gt;</head>< body ><body bgcolor =lightyellow text =black link =red alink =green vlink = blue> <ahref="dkcanting.jsp" >返回首页 </a><p align = right ><%String n = (String)session.getAttribute( "User_ID" );if(n = null )%><a href="login.
69、jsp" >登录 </a><a href ="register.jsp" >注册 </a><%else %><form name="form1" action ="UserServlet?method=logout" method= "post 欢迎你, <a href=user_center.jsp ><%= session.getAttribute( "User_ID" )%></a><in
70、put type="submit" name="submit" value ="退出" ></ form ><% %><a href=gouwuche.jsp>我的购物车 </a><br><br><table><tr><td><form name="form2" action ="DishServlet?method=type" method="post"
71、> <select name=Type_Name><option >面食<option >川菜<option >粤菜<option >鲁菜<option >浙菜<option >徽菜<option >闽菜<option >湘菜<option >苏菜 </select><p><input type =submit value="搜索"></form></td></table><
72、;form name= "form2" action = "DishServlet?method=select" method ="post" ><p align = center><input type="text" name="Dish_Name" size="40" ><input type="submit" name="submit" value ="DK 一下 " >
73、;</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> list= new ArrayList<Car>();
74、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="hidden" name="Di
75、sh_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>菜价: <%= list.get(i).
76、getPrice() %></td><td>菜系: <%= list.get(i).getType_ID() %></td><td><input type="submit" name="submit" value="取消订单"style=" width :100px;height :30px;" > </td></tr><% %></table></form><br>
77、<br><form action = "DishServlet?method=submitorder" method= "post" ><input type = "submit" name="submit" value="提交订单"style=" width :120px;height:50px;"> </form></center></body></html>Orderdetail.jsp
78、 文件:订单详情页面<% pagelanguage="java" import="java.util.*" pageEncoding="UTF-8" %><% pagelanguage="java" i mport = ".di ngcan.javabean.*"%><%String path = request.getContextPath();String basePath = request.getScheme() + ":/"+ requ
79、est.getServerName() + ":" + request.getServerPort() + path + "/" ;%><!DOCTYPE HTML PUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html><head><basehref="<%=basePath%>"><title >我的购物车</title><meta http-equiv ="p
80、ragma" content="no-cache" ><meta http-equiv ="cache-control" content="no-cache" ><meta http-equiv ="expires" content="0"><meta http-equiv ="keywords" content= "keyword 1 ,keyword2,keyword3" ><meta http
81、-equiv ="description" content="This is my page" ><style type="text/css" >body background-image :url(images/background/6.jpg) ; background-repeat :repeat-x ;</style></head><body><body bgcolor =lightyellow text = black link=redalink=greenvlink=blue> <ahref="dkcanting.jsp" >返回首页 </a><p align = right><%String n = (String)ses
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年森林资源培育与保护承包合同3篇
- 2024外资企业股权出售与境内投资合作合同范本3篇
- 2024年度医疗器械维修代加工及售后服务协议3篇
- 2024年度地区总代理销售权及品牌使用权合同范本3篇
- 2024年地质勘探服务地质勘察服务合同样本3篇
- 2024年度商业地产土地使用权永久转让与商业运营管理合同3篇
- 2024年太阳能组件安装及智能监控系统合作协议3篇
- 2024年新能源充电设施区域代理合同3篇
- 起草销售合同范例
- 土地搞标居间合同范例
- 贵州省铜仁市2023-2024学年高一上学期期末考试 生物 含解析
- 药学概论-第八章-药事管理学
- 大部分分校:地域文化形考任务三-国开(CQ)-国开期末复习资料
- 中国当代文学专题-002-国开机考复习资料
- 2025新版国家医保药品目录(完整版)
- 妊娠合并糖尿病病例讨论
- C语言程序设计(兰州石化职业技术大学)知到智慧树期末考试答案题库2024年秋兰州石化职业技术大学
- 质量工程师个人年终总结范文(12篇)
- 加工合同解除协议书(2024年版)
- 足球明星梅西课件
- 2024-2030年中国EPS电机行业需求态势发展策略分析报告
评论
0/150
提交评论