版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、前臺界面是用HTML實(shí)現(xiàn),具體代碼功能如下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 +"/"%> <! DOC
2、TYPEHTMLPUBLIC "-/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" >=&quo
3、t;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">
4、>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" ><tabl
5、e 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、;td > 密碼 </ td ><td ><input type ="password" name="Password" size ="10" ></ td > </ tr ><tr ><td colspan ="2" ><input type ="submit" name="submit" value ="登錄"> <ahref ="re
7、gister.jsp">注冊新用戶 </a></td>v/tr ></table > </ form ></ body ></ html >Login_admi n.jsp 文件:用于管理員的登錄<%page language ="java"pageEncoding ="UTF-8"%><%Stri ng path = request.getC on textPath();Stri ng basePath = request.getScheme
8、() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%> <! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html > <head><basehref =" <%=)asePath %>' ><title登錄頁面</ title ><meta
9、<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" >="key
10、words" 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"
11、; 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" n
12、ame="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 ="
13、;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 ng
14、 basePath = request.getScheme() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%><! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"> <html ><head><basehref =" <%=basePath %> ><title<m
15、eta<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" &g
16、t;="keywords" content ="keyword1,keyword2,keyword3" >="descripti on"content ="This is my page"<stylebody background-image : url(images/background/6.jpg) background-repeat: repeat-x ;</ style ></head><body bgcolor =lightblue ><a href
17、=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 ><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 >&
19、lt;tr ><td >確認(rèn)密碼</ td ><td ><input type ="password" name="Password2" size ="10" ></ td ></ tr ><tr ><td >聯(lián)系電話</ td ><td ><input type ="text" name="User_Tel" size ="10" >&l
20、t;/ 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" name="
21、;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.getSch
22、eme() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%> <! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"> <html ><head><base href =" <%=basePath %>' ><title>管理員 </ title >
23、<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,keyword2,keywo
24、rd3" ><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 link =r
25、ed 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"method=&q
26、uot;post" >歡迎你,<%=session.getAttribute("User_ID" ) %><input type -'submit" name="submit" value ="退出"></ form ><% %><table ><tr ><td ><form name="form2" action ="Dish_copyServlet?method=type&quo
27、t;method -"post" ><select n ame=Type_Name<option >面食<option >川菜<option >粵菜<option >魯菜<option >浙菜<option >徽菜<option >閩菜<option >湘菜<option >蘇菜</ select ><p><input type -submit value ="搜索"></ form >&
28、lt;/ td ></ table ><form name="form2" action -"Dish_copyServlet?method-select"method-"post"><p align - center ><input type -'submit" name="submit" value ="DK一下"> </ p></ form ><br ><br ><
29、br ><br ><center >vform action ="dingdan.jsp"method="get" ><inputtype -'submit"name="button"value ="查看訂單" id ="button"style -"width : 150px; height : 30px;" ></ form ></ center ></ body >&l
30、t;/ html >Detail.jsp文件:用于查看美食的詳細(xì)信息,在此頁面可以提交訂單<%page Ianguage -"java" import -"java.util.*"pageEncoding ="UTF-8"%><%page Ianguage -"java" import -"com.dingcan.javabean.*"%><%Stri ng path - request.getC on textPath();Stri ng basePath
31、- request.getScheme() +":/"+ request.getServerName() +":" + request.getServerPort()+ path +"/"%><! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 TransitionaI/EN"><html ><head><base href -" <%=basePath %>' ><title >管理員 &
32、lt;/ title > body <meta<meta<metahttp-equivhttp-equivhttp-equiv-"pragma" content -"no-cache" > -"cache-control"content -"no-cache" ><meta<meta<stylehttp-equivhttp-equivtype -"text/css" >-"expires"content -"
33、;0" >-"keywords" content -"keyword1,keyword2,keyword3" >-"description"content -"This is my page">background-image : url(images/background/6.jpg)background-repeat : repeat-x ;</ style ></head >vbody bgcolor =lightyellow text =black lin
34、k =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"metho
35、d="post" >歡迎你,<%=session.getAttribute("User_ID" ) %><input type -'submit"name="submit" value ="退出"></ form ><% %><table ><tr ><td ><form name="form2" action ="Dish_copyServlet?method=type&
36、quot;method -"post" ><selectn ame=Type_Name<option >面食<option >川菜<option >粵菜<option >魯菜<option >浙菜<option >徽菜<option >閩菜<option >湘菜<option >蘇菜</ select ><p><input type -submit value -"搜索"></ form >
37、;</ td ></ table ><form n ame="form2" acti on ="Dish_copyServlet?method=select"method-"post"><p align - center ><input type -"text" name="Dish_Name" size -"40" ><input type -"submit" name-"sub
38、mit" value ="DK一下"></ p></ form ><br ><br ><center >vform action ="OrderServlet?method=fahuo"method="post" >vtable border ="1" ><%String Order_ID=(String) session.getAttribute("Order_ID");List<Orderdi
39、sh> 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"n ame="Order_ID"value =" <%=ist.get(i).getOrder_ID()%>
40、39;></ td ><td ><img src =" <%=ist.get(i).getUrl()%>' height ="40px" width ="60px" ></ td ><td >菜品編號: <%=ist.get(i).getDish_ID()</ td ><td >菜名:<%=st.get(i).getDish_Name()</ td ><td >類型:<%=st.get(i).g
41、etType_ID()</ td ><td >價(jià)格:<%=st.get(i).getDish_Name()</ td ></ tr >%>%>%>%><%> </ table ><input type ="submit" name="submit" value ="發(fā)貨"style =" width : 100px; height : 30px;" ></ form > <br >
42、; <br ></ center ></ body ></ html >Dingdan.jsp文件:管理員查看訂單詳情<%page Ianguage ="java" import ="java.util.*" pageEncoding ="UTF-8"%><%page language ="java" import ="com.dingcan.javabean.*"%><%String path = request.g
43、etC on textPath();Stri ng basePath = request.getScheme() + request.getServerName() + request.getServerPort()+ path +"/"%> <! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"><html > <head> <base href =" <%=basePath %>' ><title&g
44、t;查詢結(jié)果頁面</ title ><meta<metahttp-equiv http-equiv="pragma" content ="no-cache" >="cache-control"content ="no-cache" ><meta<meta<metahttp-equivhttp-equiv http-equiv<style body type ="text/css"="expires"content =
45、"0" >="keywords" 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><body bgcolor =
46、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 = null )%><a href ="login_admin.jsp">登錄</ a><%else %&
47、gt;vform name="form1" action ="UserServlet?method=logout_admin"method="post" >歡迎你,<%=session.getAttribute( "User_ID" ) %><input type -'submit" name="submit"value ="退出"></ form > <% %><table ><tr
48、><td >vform name="form2" action ="Dish_copyServlet?method=type"method ="post" ><selectn ame=Type_Name<option >面食<option >川菜<option >粵菜<option >魯菜<option >浙菜<option >徽菜<option >閩菜<option >湘菜<option >蘇菜&
49、lt;/ select ><p><input type =submit value ="搜索"></ form ></ td ></ table ><formn ame="form2" acti on ="Dish_copyServlet?method=select"method="post"><p align = center ><input type -'text" name="Dish_
50、Name" size ="40" ><input type -"submit" name="submit" value ="D下"></ p></ form ><br ><br ><center ><%List<Order> list-new ArrayList<Order>();OrderBea n orderBea n= new OrderBea n();list - orderBea n. g
51、etOrd();for (int i=O;i<list.size();i+)%><form action ="OrderServlet?method=detail1" method="post" ><table border ="1" ><tr ><td ><inputtype -"hidden"name="Order_ID"value ="<%=ist.get(i).getOrder_ID()%>'
52、></td><td >訂單編號:<%=ist.get(i).getOrder_ID()%></ td ><td >顧客姓名:<%=ist.get(i).getUser_ID()%></ td ><td >%>訂單狀態(tài):<%=ist.get(i).getOder_State()</ td ><td >總價(jià):<%=st.get(i).getSumPrice()%></ td ><td ><inputtype -'
53、submit"name="submit"value ="訂 單 詳 情 "style =" width : 100px; height : 30px;" ></ td ></ tr ></ table ></ form ><%><br ><br ></ center ></ body ></ html >Dkca nti ng.jsp文件:主頁面,用戶可以注冊,登錄,可以查詢關(guān)于美食的所需信息<
54、%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.javabea n.DBAccess"%>Stri ng path - request.getC on textPath();String basePath
55、- request.getScheme() + request.getServerName() + path +"/"":/"II. I!+ request.getServerPort()%> <! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN"> vhtml ><head><base<title<meta<meta<meta<meta<metahref =" <%=basePa
56、th %> >>DK餐廳,訂餐首選!</ title >http-equiv http-equiv http-equiv http-equiv http-equivtype ="text/css"="pragma" content ="no-cache" >="cache-control"content ="no-cache" >="expires"content ="0" >="keywords&
57、quot; 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 =lightyellow<%DBAccess db =db.crea
58、teC onn(); db.query( "select * from dish"System.out.pr intln("/結(jié)果集的對象 ResultSet rs= db.getRs();/對結(jié)果集進(jìn)行輸岀 while (rs.next()System.out.pri ntl n( 格:"+rs.getString( "Price");%><a href ="dkcanting.jsp">返回首頁 </a><p align = right ><%Stri ng n
59、= (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 =blue >n ewDBAccess();););"菜名:"+rs.getString("Dish_Name" )+ "t" +&qu
60、ot;價(jià)"User_ID");<%else %><form name="form1" action ="UserServlet?method=logout"method="post" >歡迎你, <a href =user_center.jsp ><%=session.getAttribute( "User_ID" ) %></ a><input type -'submit" name="submit&
61、quot; value ="退出"></ form ><% %><a href -gouwuche.jsp >我的購物車 </ a><br ><br > <table > <tr ><td ><form name="form2" action ="DishServlet?method=type"method="post" ><select n ame=Type_Name<opti
62、on >面食voption >川菜voption >粵菜voption >魯菜voption >浙菜voption >徽菜voption >閩菜voption >湘菜voption >蘇菜v/ select >vp>vinput type =submit value ="搜索">v/ form >v/td >v/ table >vformn ame="form2" acti on ="DishServlet?method=select"metho
63、d ="post"><p align = center >vinput type -'text" name="Dish_Name" size ="40" >vinput type -"submit" name="submit" value ="DK一下">v/ p>v/ form >v/ body >v/ html >Gouwuche.jsp文件:用戶將所需美食放進(jìn)購物車,在此可以提交訂單,可以取消訂單v
64、%page Ianguage -"java" import -"java.util.*"pageEncoding ="UTF-8"%>v%page language -"java" import -"com.dingcan.javabean.*"%>v%Stri ng path - request.getC on textPath();Stri ng basePath - request.getScheme() +":/"+ request.getServerNa
65、me() +":" + request.getServerPort()+ path +"/"%>v! DOCTYPEHTMLPUBLIC "-/W3C/DTD HTML 4.01 Transitional/EN">vhtml >vhead>vbase href =" v%=basePath %>' > vtitle>我的購物車v/ title > vstyle type ="text/css" >vmetahttp-equivvmetavmet
66、ahttp-equiv http-equiv-"pragma" content ="no-cache" >="cache-control"content -"no-cache" >vmetavmetahttp-equivhttp-equiv-"expires"content -"0" >-"keywords" content -"keyword1,keyword2,keyword3" >-"descri
67、ption"content -"This is my page">body background-image : url(images/background/6.jpg);background-repeat : repeat-x ;</ style ></head><body><body bgcolor =lightyellow text =black link =red alink<a href ="dkcanting.jsp">返回首頁 </ a><p align
68、 = right ><%String n = (String)session.getAttribute("User_ID");if (n = null )%><a href ="login.jsp">登錄</ a><a href ="register.jsp">注冊</ a><%else %>vform name="form1" action ="UserServlet?method=logout" 歡迎你, <
69、a href =user_center.jsp><%=sessio n.getAttribute("User_ID"</ a><input type -'submit"name="submit" value ="退出"</ form ><% %><a href -gouwuche.jsp >我的購物車 </a><br ><br ><table ><tr ><td ><form
70、 name="form2" action ="DishServlet?method=type" <selectn ame=Type_Name<option >面食<option >川菜<option >粵菜<option >魯菜<option >浙菜<option >徽菜<option >閩菜<option >湘菜<option >蘇菜green vlink -blue >method="post)%>>metho
71、d="post" ></ select ><p><input type =submit value ="搜索"></ form ></ td > </ table >vformn ame="form2" acti on ="DishServlet?method=select"method ="post" ><p align = center ><input type -'text&quo
72、t; name="Dish_Name" size ="40" ><input type -"submit" name="submit" value ="D下"></ p></ form > <br > <br ><ce nter<formacti on ="DishServlet?method=ca ncel"method -"post" ><tableborder
73、="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 (int i=O;i<list.size();i+)%><tr ><td ><imgsrc =" <%=st.get
74、(i).getUrl()%>' height ="40px" width ="60px" ></ td ><td ><in put<in put</ td >type -"hidden" name="Dish type -"hidden" name="User_ID"ID"value ="<%=ist.get(i).getDish_ID()value ="<%=ist.get(
75、i).getUser_ID()%>'>%>'><td >菜名:<%=ist.get(i).getDish_Name()%></ td ><td >菜價(jià):<%=st.get(i).getPrice()%></ td ><td >菜系:<%=st.get(i).getType_ID()%></ td ><td >n ame="submit"-"submit"<i nputstyle -"
76、;width : 100px; height : 30px;" >typevalue -" 取 消 訂</ td ></ tr ><% %>v/table ></ form ><br ><br >vform action ="DishServlet?method=submitorder"method - 'post" ><in put type ="submit"n ame="submit"value
77、="提 交 訂style =" width : 120px; height : 50px;" ></ form ></ center ></ body ></ html >Orderdetail.jsp 文件:訂單詳情頁面<%page language ="java" import ="java.util.*"pageEncoding ="UTF-8"%><%page language ="java" import
78、 ="com.dingcan.javabean.*"%><%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 > <head> <base href =" <%=basePath %&
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 高速公路CFG樁基礎(chǔ)施工合同
- 鐵路綠化帶苗木種植合同
- 醫(yī)療器械公司租賃協(xié)議
- 超市廢油回收合同范例
- 金杯投資合同三篇
- 海關(guān)監(jiān)管員勞動(dòng)合同三篇
- 解除物業(yè)服務(wù)合同(2篇)
- 外雇電工短期出差協(xié)議書
- 公積金三方扣款協(xié)議辦理流程
- 土地轉(zhuǎn)讓合同范例格式
- 2024浙江省建筑安全員B證(項(xiàng)目經(jīng)理)考試題庫
- Stevens-Johnson綜合征及中毒性表皮壞死松解癥課件
- 學(xué)前兒童健康教育與活動(dòng)指導(dǎo)(第2版)高職PPT完整全套教學(xué)課件
- 理論力學(xué)-上海交通大學(xué)中國大學(xué)mooc課后章節(jié)答案期末考試題庫2023年
- 風(fēng)景背后的地貌學(xué)-華中師范大學(xué)中國大學(xué)mooc課后章節(jié)答案期末考試題庫2023年
- 消防聯(lián)動(dòng)測試記錄表
- 【教師必備】部編版四年級語文上冊第二單元【集體備課】
- 23所行政管理博士點(diǎn)學(xué)校之一
- 靜脈導(dǎo)管常見并發(fā)癥臨床護(hù)理實(shí)踐指南1
- 學(xué)校學(xué)生勞動(dòng)教育評價(jià)表
- apt攻擊專項(xiàng)應(yīng)急預(yù)案
評論
0/150
提交評論