版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、前台界面是用HTML实现,具体代码功能如下:Login.jsp 文件:用于客户的登录<%page Ianguage ="java"pageEncoding ="UTF-8"%><%Stri ng path = request.getC on textPath();Stri ng basePath = request.getScheme() + request.getServerName() +":" + request.getServerPort()+ path +"/"%> <! D
2、OCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html ><head><basehref =" <%=basePath %> ><title登录页面</ title ><meta<meta<meta<metahttp-equiv http-equiv http-equiv http-equiv="pragma" content ="no-cache" >=&q
3、uot;cache-control"content ="no-cache" ><meta<style body http-equivtype ="text/css"="expires"content ="0" >="keywords" content ="keyword1,keyword2,keyword3" >="descriptio n"content ="This is my page"&g
4、t;>background-image : url(images/background/6.jpg) background-repeat : repeat-x ;</ style ></head> <body bgcolor =lightblue ><a href =dkcanting.jsp >返回首页 </ a>vform name="form1" action ="UserServlet?method=login"method ="post" ><ta
5、ble 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 >&
6、lt;td > 密码 </ td ><td ><input type ="password" name="Password" size ="10" ></ td ></ tr ><tr ><td colspan ="2" ><input type ="submit" name="submit" value ="登录"> <ahref ="r
7、egister.jsp">注册新用户 </a></td>v/tr ></ table ></ form ></ body ></ html >Login_admi n.jsp 文件:用于管理员的登录<%page Ianguage ="java"pageEncoding ="UTF-8"%><%Stri ng path = request.getC on textPath();Stri ng basePath = request.getSchem
8、e() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%> <! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html > <head><basehref =" <%=)asePath %>' ><title登录页面</ title ><met
9、a<meta<metahttp-equivhttp-equivhttp-equiv="pragma" content ="no-cache" > ="cache-control"content ="no-cache" ><meta<meta<style body http-equivhttp-equivtype ="text/css" >="expires"content ="0" >="ke
10、ywords" content ="keyword1,keyword2,keyword3" >="descriptio n"content ="This is my page">background-image : url(images/background/6.jpg) background-repeat : repeat-x ; </ style ></head> <body bgcolor =lightblue ><form name="form1&quo
11、t; 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 ="text"
12、name="User_ID" size ="10" ></ td ></ tr ><tr ><td > 密码 </ td ><td ><input type ="password" name="Password" size ="10" ></ td >v/tr ><tr ><td colspan ="2" ><inputtype =&quo
13、t;submit" name="submit" value ="登录"> </ td ></ tr ></ table ></ form ></ body ></ html >Register.jsp 文件:用于客户的注册<%page language ="java"pageEncoding ="UTF-8"%><%Stri ng path = request.getC on textPath();Stri n
14、g basePath = request.getScheme() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%><! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"> <html ><head><basehref =" <%=basePath %> ><title<
15、meta<meta>注册页面http-equivhttp-equiv</ title >="pragma" content ="no-cache" >="cache-control"content ="no-cache" ><meta<metahttp-equiv http-equiv<metahttp-equivtype ="text/css" >="expires"content ="0" &
16、gt;="keywords" content ="keyword1,keyword2,keyword3" >="descriptio n"content ="This is my page"><stylebody background-image : url(images/background/6.jpg) background-repeat : repeat-x ;</ style > </head> <body bgcolor =lightblue ><
17、;a href =dkcanting.jsp >返回首页 </ a>vform name="form1" action ="UserServlet?method=register"method="post" ><table width ="200" border ="1" align =center ><tr ><td colspan ="2" > 注册窗口 </ td ><tr ><t
18、d >用户名</ td ><td ><input type ="text"name="User_ID" size ="10" ></ td ></ tr ><tr ><td > 密码 </ td ><td ><input type ="password" name="Password1" size ="10" ></ td ></ t
19、r ><tr ><td >确认密码</ td ><td ><input type ="password" name="Password2" size ="10" ></ td ></ tr ><tr ><td >联系电话</ td ><td ><input type ="text" name="User_Tel" size ="10"
20、 ></ td ></ tr ><tr ><td >送餐地址</ td ><td ><input type ="text"name="User_Address" size ="10"></td></ tr ><tr >value ="<td colspan ="4" align =center ><input type -'submit" nam
21、e="submit" 注册"> </ td ></ tr ></ table ></ form ></ body ></ html >Admin_ce nter.jsp文件:管理员中心界面,管理全部信息<%page language ="java"pageEncoding ="UTF-8"%><%Stri ng path - request.getC on textPath();Stri ng basePath - request
22、.getScheme() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%> <! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"> <html ><head><base href =" <%=basePath %>' ><title>管理员 </ tit
23、le ><meta http-equiv="pragma" content ="no-cache" ><meta http-equiv="cache-c on trol"content ="no-cache" ><meta http-equiv ="expires"content ="0" ><meta http-equiv="keywords" content ="keyword1,keyword
24、2,keyword3" ><meta http-equiv="descriptio n"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
25、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 %>vform name="form1" action ="UserServlet?method=logout_admin"me
26、thod="post" >欢迎你,<%=session.getAttribute("User_ID" ) %><input type -'submit" name="submit" value ="退出"></ form ><% %><table ><tr ><td ><form name="form2" action ="Dish_copyServlet?method=t
27、ype"method -"post" ><select n ame=Type_Name<option >面食<option >川菜<option >粤菜<option >鲁菜<option >浙菜<option >徽菜<option >闽菜<option >湘菜<option >苏菜</ select ><p><input type -submit value ="搜索"></ for
28、m ></ 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"</ p>n a
29、me="submit"value="DK一下” ></ form ><br ><br ><br ><br ><center >vform action ="dingdan.jsp"method="get"<in puttype -'submit"n ame="butt on"value ="查看订单 ” id -"button":30px;" >style -
30、"width : 150px; height</ form ></ center ></ body ></ html >Detail.jsp文件:用于查看美食的详细信息,在此页面可以提交订单<%page language -"java" import -"java.util.*"pageEncoding ="UTF-8"%><%page language -"java" import -"com.dingcan.javabean.
31、*"%><%Stri ng path - request.getC on textPath();Stri ng basePath - request.getScheme() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%><! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html ><hea
32、d><base href -" <%=basePath %>' ><title >管理员 </ title ><meta http-equiv-"pragma" content -"no-cache" ><meta http-equiv-"cache-c on trol"content ="no-cache" ><meta http-equiv -"expires"content -"
33、0" ><meta http-equiv-"keywords" content -"keyword1,keyword2,keyword3" ><meta http-equiv-"descriptio n"content -"This is my page" ><style type -"text/css"> body background-image : url(images/background/6.jpg)background-repeat
34、: repeat-x</ style ></head >vbody 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 %>vfo
35、rm name="form1" action ="UserServlet?method=logout_admin"method="post" >欢迎你,<%=session.getAttribute("User_ID" ) %><input type -'submit"name="submit" value ="退出"></ form ><% %><table ><tr ><
36、td ><form name="form2" action ="Dish_copyServlet?method=type"method -"post" ><selectn ame=Type_Name<option >面食<option >川菜<option >粤菜<option >鲁菜<option >浙菜<option >徽菜<option >闽菜<option >湘菜<option >苏菜</
37、select ><p><input type -submit value -"搜索"></ form ></ td ></ table ><form n ame="form2" acti on ="Dish_copyServlet?method=select"method-"post"><p align - center ><input type -"text" name="Dish_Nam
38、e" size -"40" ><input type -"submit" name-"submit" value ="DK一下"></ p></ form ><br ><br ><center >vform action ="OrderServlet?method=fahuo"method="post" >vtable border ="1" ><%S
39、tring Order_ID=(String) session.getAttribute("Order_ID");List<Orderdish> list= new ArrayList<Orderdish>();OrderBea n orderBea n= new OrderBea n();list = orderBea n.getOrderdish1(Order_ID);for (int i=O;i<list.size();i+)%><tr ><td ><in puttype ="hidde n&
40、quot;n ame="Order_ID"value =" <%=ist.get(i).getOrder_ID()%>'></ td ><td ><img src =" <%=ist.get(i).getUrl()%>' height ="40px" width ="60px" ></ td ><td >菜品编号: <%=ist.get(i).getDish_ID()</ td ><td
41、 >菜名:<%=st.get(i).getDish_Name()</ td ><td >类型:<%=st.get(i).getType_ID()</ td ><td >价格:<%=st.get(i).getDish_Name()</ td ></ tr >%>%>%>%><%> </ table ><input type ="submit" name="submit" value ="发货&quo
42、t;style =" width : 100px; height : 30px;" ></ form > <br > <br ></ center ></ body ></ html >Dingdan.jsp文件:管理员查看订单详情<%page Ianguage ="java" import ="java.util.*" pageEncoding ="UTF-8"%><%page language ="java
43、" import ="com.dingcan.javabean.*"%><%String path = request.getC on textPath();Stri ng basePath = request.getScheme() + request.getServerName() + request.getServerPort()+ path +"/"%> <! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html
44、 > <head> <base href =" <%=basePath %>' ><title>查询结果页面</ title ><meta<metahttp-equiv http-equiv="pragma" content ="no-cache" >="cache-control"content ="no-cache" ><meta<meta<metahttp-equivhttp-equi
45、v http-equiv<style body type ="text/css"="expires"content ="0" >="keywords" content ="keyword1,keyword2,keyword3" >="descriptio n"content ="This is my page">>background-image : url(images/background/6.jpg) backgroun
46、d-repeat : repeat-x ; </ style ></head> <body><body bgcolor =lightyellow 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
47、 = null )%><a href ="login_admin.jsp">登录</ a><%else %>vform name="form1" action ="UserServlet?method=logout_admin"method="post" >欢迎你,<%=session.getAttribute( "User_ID" ) %><input type -'submit" name="sub
48、mit" value ="退出"></ form ><% %><table ><tr ><td >vform name="form2" action ="Dish_copyServlet?method=type"method ="post" ><selectn ame=Type_Name<option >面食<option >川菜<option >粤菜<option >鲁菜<
49、option >浙菜<option >徽菜<option >闽菜<option >湘菜<option >苏菜</ select ><p><input type =submit value ="搜索"></ form ></ td ></ table ><formn ame="form2" acti on ="Dish_copyServlet?method=select"method="post&
50、quot;><p align = center ><input type -'text" name="Dish_Name" size ="40" ><input type -"submit" name="submit" value ="D下"></ p></ form ><br ><br ><center ><%List<Order> list-new Arr
51、ayList<Order>();OrderBea n orderBea n= new OrderBea n();list - orderBea n. getOrd();for (int i=O;i<list.size();i+)%><form action ="OrderServlet?method=detail1" method="post" ><table border ="1" ><tr ><td ><inputtype -"hidden&q
52、uot;name="Order_ID"value ="<%=ist.get(i).getOrder_ID()%>'></td><td >订单编号:<%=ist.get(i).getOrder_ID()%></ td ><td >顾客姓名:<%=ist.get(i).getUser_ID()%></ td ><td >订单状态:<%=ist.get(i).getOder_State()%></ td ><td >
53、;总价:<%=st.get(i).getSumPrice()%></ td ><td ><input type -'submit"name="submit"value ="订 单 详 情 "style =" width : 100px; height : 30px;" ></ td ></ tr ></ table ></ form ><%><br ><br ></ center
54、></ body ></ html >Dkca nti ng.jsp文件:主页面,用户可以注册,登录,可以查询关于美食的所需信息<%page<%page<%page<%lan guage ="java"lan guage ="java"lan guage ="java"pageE ncodi ng ="UTF-8" %>import ="java.sql.*" %>import ="com.d in gca n.java
55、bea n.DBAccess"%>Stri ng path - request.getC on textPath();String basePath - request.getScheme() + request.getServerName() + path +"/"":/"II. I!+ request.getServerPort()%> <! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"> vhtml ><head>
56、;<base<title<meta<meta<meta<meta<metahref =" <%=basePath %> >>DK餐厅,订餐首选!</ title >http-equiv http-equiv http-equiv http-equiv http-equivtype ="text/css"="pragma" content ="no-cache" >="cache-control"content ="
57、;no-cache" >="expires"content ="0" >="keywords" content ="keyword1,keyword2,keyword3" > ="descriptio n"content ="This is my page" >><stylebody background-image : url(images/background/6.jpg):repeat-xbackgrou nd-repeat
58、</ style ></head><body bgcolor =lightyellow<%DBAccess db =n ewDBAccess();db.createC onn();db.query( "select * from dish" System.out.pr intln("'/结果集的对象 ResultSet rs= db.getRs();/对结果集进行输岀while (rs.next() System.out.pri ntl n(格:"+rs.getString("Price")
59、;%><a href ="dkcanting.jsp">返回首页 </a><p align = right ><%Stri ng n = (Stri ng)sessi on .getAttribute(if (n = null )%><a href ="login.jsp">登录</ a><a href ="register.jsp">注册</ a>text =black link =red alink=green vlink =bl
60、ue >););"菜名:"+rs.getString("Dish_Name" )+ "t" +"价"User_ID");<%else %><form name="form1" action ="UserServlet?method=logout"method="post" >欢迎你,<a href =user_center.jsp ><%=session.getAttribute("Use
61、r_ID" ) %></ a><input type -'submit"name="submit" value ="退出"></ form ><% %><a href -gouwuche.jsp >我的购物车 </ a><br ><br ><table > <tr ><td ><form name="form2" action ="DishServlet?
62、method=type"method="post" ><select n ame=Type_Name<option >面食voption >川菜voption >粤菜voption >鲁菜voption >浙菜voption >徽菜voption >闽菜voption >湘菜voption >苏菜v/ select >vp>vinput type =submit value ="搜索">v/ form >v/td >v/ table >v
63、formn ame="form2" acti on ="DishServlet?method=select"method ="post"><p align = center >vinput type -'text" name="Dish_Name" size ="40" >vinput type -"submit" name="submit" value ="DK一下">v/ p>v
64、/ form >v/ body >v/ html >Gouwuche.jsp文件:用户将所需美食放进购物车,在此可以提交订单,可以取消订单v%page Ianguage -"java" import -"java.util.*"pageEncoding ="UTF-8"%>v%page language -"java" import -"com.dingcan.javabean.*"%>v%Stri ng path - request.getC on textPat
65、h();Stri ng basePath - request.getScheme() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%>v! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN">vhtml >vhead>vbase href =" v%=basePath %>' > vtitle>我的
66、购物车v/ title >vmeta http-equiv-"pragma" content ="no-cache" > vstyle type ="text/css" >vmeta http-equiv-"cache-c on trol"content -"no-cache" >vmeta http-equiv -"expires"content -"0" >vmeta http-equiv-"keywords&q
67、uot; content -"keyword1,keyword2,keyword3" >vmeta http-equiv-"descriptio n"content -"This is my page" >body background-image : url(images/background/6.jpg);background-repeat : repeat-x ;</ style ></head><body><body bgcolor =lightyellow text =b
68、lack link =red alink<a href ="dkcanting.jsp">返回首页 </ 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 %
69、>vform name="form1" action ="UserServlet?method=logout" 欢迎你, <a href =user_center.jsp ><%=sessio n.getAttribute("User_ID"</ a><input type -'submit"name="submit" value ="退出"</ form ><% %><a href -gouwuche.j
70、sp >我的购物车 </a><br ><br ><table ><tr ><td ><form name="form2" action ="DishServlet?method=type" <selectn ame=Type_Name<option >面食<option >川菜<option >粤菜<option >鲁菜<option >浙菜<option >徽菜<option >闽
71、菜<option >湘菜<option >苏菜green vlink -blue >method="post)%>>method="post" ></ select ><p><input type =submit value ="搜索"></ form ></ td > </ table ><formname-"form2" action -"DishServlet?method-selec
72、t"method -"post"><p align - center ><input type -"text"name="Dish_Name" size -"40" >value ="DK下"><input type -"submit" name-"submit"</ p></ form > <br > <br ><ce ntervformacti o
73、n ="DishServlet?method=ca ncel"method - 'post" ><tableborder ="1" ><%Stri ng User_ID-(Str ing) sessi on. getAttribute( List<Car> list- new ArrayList<Car>(); CarBean carBean- new CarBean();list - carBea n. getCar(User_ID);"User_ID");for (
74、int i=O;i<list.size();i+)%><tr ><td ><imgsrc =" <%=st.get(i).getUrl()%> height ="40px" width ="60px" ></ td ><td ><in put<in put</ td >type -"hidden" name="Dish type -"hidden" name="User_ID&q
75、uot;ID"value ="<%=ist.get(i).getDish_ID()value ="<%=ist.get(i).getUser_ID()%>'>%>'><td >菜名:<%=Hst.get(i).getDish_Name()%></ td ><td >菜价:<%=st.get(i).getPrice()%></ td ><td >菜系:<%=st.get(i).getType_ID()%></ td
76、 ><td >n ame="submit"="submit"<i nputstyle -"width : 100px; height : 30px;" ></ td >typevalue -" 取 消 订</ tr ><% %>v/table ></ form ><br ><br >vform action ="DishServlet?method=submitorder"method - '
77、;post" ><in put type ="submit"n ame="submit"value ="提 交 订style =" width : 120px; height : 50px;" ></ form ></ center ></ body ></ html >Orderdetail.jsp 文件:订单详情页面<%page language ="java" import ="java.util.*&quo
78、t;pageEncoding ="UTF-8"%><%page language ="java" import ="com.dingcan.javabean.*"%><%Stri ng path - request.getC on textPath();Stri ng basePath - request.getScheme() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%> <! DOCTYPEHTMLPUBLIC &quo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2030年中国蜂蜜市场消费需求趋势及发展潜力研究报告
- 2024-2030年中国船用热浸锌合金项目申请报告
- 2024-2030年中国自动化立体仓储(自动化立体仓库)行业发展规划及投资前景预测报告
- 2024-2030年中国红木家具行业生产销售模式及未来5发展趋势报告
- 2024-2030年中国等离子废气净化器行业需求趋势及发展策略研究报告版
- 2024-2030年中国立体停车场行业前景展望发展规划分析报告
- 2024-2030年中国砂磨机内套行业发展状况规划分析报告
- 2024年醋酸乙酯项目评价分析报告
- 2023年打包机械项目成效分析报告
- 新疆维吾尔自治区2025届物理高三上期中学业质量监测模拟试题含解析
- GB/T 1957-2006光滑极限量规技术条件
- GB/T 1423-1996贵金属及其合金密度的测试方法
- 产城(产业发展基础、城服务功能)融合示范建设总体方案
- 钻孔应力计安装步骤及注意事项
- 智能家居ppt模板
- 中学生行为习惯的养成主题班会(共26张)课件
- 模具基础整本书课件完整版电子教案(最新)
- 议论文阅读-2016-2021河北语文中考真题汇编
- 校企合作资源共享管理制度
- 护理教育学第7章护理教学的组织形式2021课件
- 胫骨平台骨折手术治疗及术后PPT课件
评论
0/150
提交评论