版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、前臺(tái)界面是用HTML實(shí)現(xiàn),具體代碼功能如下: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">注冊(cè)新用戶</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文件:用于客戶的注冊(cè)<% 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>注冊(cè)頁面</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">注冊(cè)窗口</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>確認(rèn)密碼</td><td><input type="password" name="Password2" size="10"></td></tr><tr><td>
19、聯(lián)系電話</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="注冊(cè)"> </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文件:用于查看美食的詳細(xì)信息,在此頁面可以提交訂單<% 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> 菜品編號(hào): <%=list.get(i).getDish_ID() %> </td><td> 菜名: <%=list.get(i).getDish_Name() %> </td><td&g
40、t; 類型: <%=list.get(i).getType_ID() %> </td><td> 價(jià)格: <%=list.get(i).getDish_Name() %> </td></tr><%></table><input type="submit" name="submit" value="發(fā)貨" 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>查詢結(jié)果頁面</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> 訂單編號(hào):<%=list.get(i).g
51、etOrder_ID() %> </td><td> 顧客姓名:<%=list.get(i).getUser_ID() %> </td><td> 訂單狀態(tài): <%=list.get(i).getOder_State() %> </td><td> 總價(jià): <%=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文件:主頁面,用戶可以注冊(cè),登錄,可以查詢關(guān)于美食的所需信息<% 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("-");/ 結(jié)果集的對(duì)象ResultSet rs= db.getRs();/ 對(duì)結(jié)果集進(jìn)行輸出while(rs.next()System.out.println("菜名:"+rs.getString("Dish_Name")+"t"+"價(jià)格:"+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">注冊(cè)</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文件:用戶將所需美食放進(jìn)購物車,在此可以提交訂單,可以取消訂單<% 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">注冊(cè)</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; 菜價(jià): <%=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等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- GB/T 24986.3-2024家用和類似用途電器可靠性試驗(yàn)及評(píng)價(jià)第3部分:洗衣機(jī)的特殊要求
- 高考物理總復(fù)習(xí)專題一直線運(yùn)動(dòng)第1講運(yùn)動(dòng)的描述練習(xí)含答案
- 違規(guī)保證書的背景分析
- 高中化學(xué) 第3章 物質(zhì)在水溶液中的行為 3.4.2 酸堿中和滴定教案 魯科版選修4
- 2024秋四年級(jí)英語上冊(cè) Unit 5 Dinner is ready課時(shí)3 Let's spell教案 人教PEP
- 2024六年級(jí)語文下冊(cè) 第三單元 8 匆匆教案 新人教版
- 2024-2025學(xué)年高中生物 第4章 第1節(jié) 種群的特征教案 新人教版必修3
- 2024-2025學(xué)年九年級(jí)化學(xué)上冊(cè) 第三單元 物質(zhì)構(gòu)成的奧秘 課題2 原子的結(jié)構(gòu) 第2課時(shí) 離子與相對(duì)原子質(zhì)量教案 (新版)新人教版
- 2023四年級(jí)數(shù)學(xué)下冊(cè) 4 多邊形的認(rèn)識(shí) 綜合實(shí)踐 我的拼圖教案 冀教版
- 2024-2025學(xué)年高中地理 第四章 環(huán)境污染與防治 4.2 固體廢棄物的治理教案 中圖版選修6
- 八年級(jí)科學(xué)上冊(cè) 《生命活動(dòng)的調(diào)節(jié)》同步練習(xí)1 浙教版
- 硫酸儲(chǔ)罐標(biāo)準(zhǔn)
- 2023年6月四級(jí)聽力第一套真題及聽力原文
- GB/T 40016-2021基礎(chǔ)零部件通用元數(shù)據(jù)
- 統(tǒng)編小學(xué)語文五年級(jí)上冊(cè)第七單元解讀
- 搪塑成型工藝
- 體育概論全部課件
- 《整式的加減》第2課時(shí)示范課教學(xué)設(shè)計(jì)【數(shù)學(xué)七年級(jí)上冊(cè)北師大】
- 個(gè)人簡(jiǎn)歷制作指導(dǎo)培訓(xùn)課件
- 千年菩提路解說詞
- 小學(xué)科學(xué)校本課程教材
評(píng)論
0/150
提交評(píng)論