├── README.md
└── Restaurant Management
└── cse310Project
├── build.xml
├── build
└── web
│ ├── Footer
│ ├── BG.png
│ ├── email.png
│ ├── fb.png
│ ├── feed.png
│ ├── googlePlus.png
│ ├── location.png
│ ├── tt.png
│ └── yt.png
│ ├── META-INF
│ ├── MANIFEST.MF
│ └── context.xml
│ ├── WEB-INF
│ └── lib
│ │ └── mysql-connector-java-5.1.46.jar
│ ├── adminimg
│ ├── dash1.png
│ ├── dash2.png
│ ├── dash3.png
│ ├── dash4.png
│ ├── dash5.png
│ └── logo.png
│ ├── adminlogin.jsp
│ ├── adminloginaction.jsp
│ ├── adminloginsuccess.jsp
│ ├── adminlogout.jsp
│ ├── adminorder.jsp
│ ├── adminorderaction.jsp
│ ├── adminorderad.jsp
│ ├── adminorderc.jsp
│ ├── adminorderd.jsp
│ ├── checkout.jsp
│ ├── checkoutaction.jsp
│ ├── checkoutsuccess.jsp
│ ├── index.jsp
│ ├── indeximg
│ ├── home1.jpg
│ ├── home2.jpg
│ ├── home3.jpg
│ ├── logo.png
│ └── middleg.png
│ ├── jquery-3.3.1.min.js
│ ├── loader.js
│ ├── orderonline.jsp
│ ├── register.jsp
│ ├── registeraction.jsp
│ ├── registersuccess.jsp
│ ├── saleanalytics.jsp
│ ├── saleanalytics2.jsp
│ ├── userlogin.jsp
│ ├── userloginaction.jsp
│ ├── userloginsuccess.jsp
│ ├── userlogout.jsp
│ └── userorders.jsp
├── dist
└── cse310Project.war
├── lib
└── mysql-connector-java-5.1.46.jar
├── nbproject
├── ant-deploy.xml
├── build-impl.xml
├── genfiles.properties
├── private
│ ├── private.properties
│ └── private.xml
├── project.properties
└── project.xml
├── src
└── conf
│ └── MANIFEST.MF
└── web
├── Footer
├── BG.png
├── email.png
├── fb.png
├── feed.png
├── googlePlus.png
├── location.png
├── tt.png
└── yt.png
├── META-INF
└── context.xml
├── adminimg
├── dash1.png
├── dash2.png
├── dash3.png
├── dash4.png
├── dash5.png
└── logo.png
├── adminlogin.jsp
├── adminloginaction.jsp
├── adminloginsuccess.jsp
├── adminlogout.jsp
├── adminorder.jsp
├── adminorderaction.jsp
├── adminorderad.jsp
├── adminorderc.jsp
├── adminorderd.jsp
├── checkout.jsp
├── checkoutaction.jsp
├── checkoutsuccess.jsp
├── index.jsp
├── indeximg
├── home1.jpg
├── home2.jpg
├── home3.jpg
├── logo.png
└── middleg.png
├── jquery-3.3.1.min.js
├── loader.js
├── orderonline.jsp
├── register.jsp
├── registeraction.jsp
├── registersuccess.jsp
├── saleanalytics.jsp
├── saleanalytics2.jsp
├── userlogin.jsp
├── userloginaction.jsp
├── userloginsuccess.jsp
├── userlogout.jsp
└── userorders.jsp
/README.md:
--------------------------------------------------------------------------------
1 | Link to video
2 |
3 | https://www.youtube.com/watch?v=xmm9AONIHt0
4 |
5 |
6 | About me:
7 |
8 | Rashedul Hoque Arif
9 | CSE, BRAC University
10 | email: rashedulhoque049@gmail.com
11 |
12 | Project Name: Online Restaurant Management System
13 |
14 | Tools Used:
15 |
16 | Front-end: HTML, CSS,
17 | Back-end: Java, Mysql, jsp, servlet and javaScript.
18 | Database: workbench for database
19 | Apache Tomcat for localhost server
20 | and I have coded everything on Netbeans..
21 |
22 | Description:
23 |
24 | 1. Designed Complete template using Photoshop then converted to HTML, CSS
25 |
26 | 2. Sign in/Sign up for users
27 |
28 | 3. Place an order Online
29 |
30 | 4. Admin Panel. Admin can take actin on Awaiting delivery and mark them as delivered or cancel an order.
31 |
32 | 5. From Sales analytics admin can generate graph within selected range of dates and generate graph on metrics like
33 | "How much quantity sold of each items on the certain time frame and how much revenue earned from each item " and many more.
34 |
35 | 6. Also I have maintained session properly so that admin can access everything as long as they are logged in,
36 | once logged out, admin wont be able to access anything. same applies for user as well.
37 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Builds, tests, and runs the project cse310Project.
12 |
13 |
71 |
72 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/Footer/BG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/Footer/BG.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/Footer/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/Footer/email.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/Footer/fb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/Footer/fb.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/Footer/feed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/Footer/feed.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/Footer/googlePlus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/Footer/googlePlus.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/Footer/location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/Footer/location.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/Footer/tt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/Footer/tt.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/Footer/yt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/Footer/yt.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 |
3 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/META-INF/context.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/WEB-INF/lib/mysql-connector-java-5.1.46.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/WEB-INF/lib/mysql-connector-java-5.1.46.jar
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminimg/dash1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/adminimg/dash1.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminimg/dash2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/adminimg/dash2.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminimg/dash3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/adminimg/dash3.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminimg/dash4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/adminimg/dash4.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminimg/dash5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/adminimg/dash5.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminimg/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/adminimg/logo.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminlogin.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminlogin
3 | Created on : Mar 22, 2018, 4:30:59 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 |
8 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
9 |
10 |
11 |
12 |
13 |
14 | Admin Login
15 |
16 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
364 |
365 | <%
366 | if ((session.getAttribute("adn") == null) || (session.getAttribute("adn") == "")) {
367 |
368 |
369 | } else {
370 |
371 | response.sendRedirect("adminloginsuccess.jsp");
372 |
373 | }
374 | %>
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
Admin Login
383 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
417 |
418 |
419 |
420 |
421 |
422 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminloginaction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminloginaction
3 | Created on : Mar 22, 2018, 4:31:19 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 |
8 | <%@ page import ="java.sql.*" %>
9 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
10 |
11 |
12 |
13 |
14 | User Login Action
15 |
16 |
17 |
18 | <%
19 | String userid = request.getParameter("email");
20 | String pwd = request.getParameter("pass");
21 | Class.forName("com.mysql.jdbc.Driver");
22 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
23 | Statement st = con.createStatement();
24 |
25 | ResultSet rs;
26 | rs = st.executeQuery("select * from admin where email='" + userid + "' and password='" + pwd + "'");
27 | //ResultSet rs2= st.executeQuery("select * from user where email='" + userid + "'");
28 |
29 |
30 | //out.println(name);
31 | if (rs.next()) {
32 | String an =rs.getString("fname");
33 | session.setAttribute("adn", an);
34 |
35 | //out.println("welcome " + userid);
36 | //out.println("Log out");
37 | response.sendRedirect("adminloginsuccess.jsp");
38 | } else {
39 | %>
40 |
45 | <%
46 | }
47 | %>
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminloginsuccess.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminloginsuccess
3 | Created on : Mar 22, 2018, 4:31:46 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Admin Login Success
13 |
14 |
15 |
240 |
241 |
242 |
264 |
342 |
343 |
344 |
345 |
346 | <%
347 | if ((session.getAttribute("adn") == null) || (session.getAttribute("adn") == "")) {
348 | %>
349 |
350 |
351 |
CSE310: Object Oriented Programming (ADN)
352 |
353 |
354 |
355 |
356 |
357 |
Control Panel
358 |
359 |
364 |
365 |
366 |
367 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 | <%} else {
431 | %>
432 |
433 |
434 |
435 |
436 |
437 | Design & Developed by- Rashedul Hoque Arif
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
450 |
451 |
452 |
453 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
Dashboard
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 | <%
547 | }
548 | %>
549 |
550 |
551 |
552 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminlogout.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminlogout
3 | Created on : Mar 22, 2018, 4:48:17 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Admin Logout
13 |
14 |
15 | <%
16 |
17 | session.setAttribute("adn", null);
18 | session.invalidate();
19 |
20 | response.sendRedirect("adminloginsuccess.jsp");
21 | %>
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/adminorderaction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminorderaction
3 | Created on : Mar 24, 2018, 6:38:00 PM
4 | Author : WorkSpace
5 | --%>
6 | <%@ page import ="java.sql.*" %>
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Admin Order Update
13 |
14 |
15 |
16 |
17 |
18 | <%
19 | String oid = request.getParameter("oid");
20 |
21 | String orderstatus = request.getParameter("orderstatus");
22 |
23 | Class.forName("com.mysql.jdbc.Driver");
24 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
25 | //Statement st = con.createStatement();
26 |
27 | //ResultSet rs;
28 | //rs = st.executeQuery("UPDATE orders SET orderstatus='" + orderstatus + "' WHERE oid='" + oid + "'");
29 | //ResultSet rs2= st.executeQuery("select * from user where email='" + userid + "'");
30 |
31 | String sql = "UPDATE orders SET orderstatus=? WHERE oid=?";
32 |
33 | PreparedStatement statement = con.prepareStatement(sql);
34 | statement.setString(1, orderstatus);
35 | statement.setString(2, oid);
36 |
37 |
38 | int rowsUpdated = statement.executeUpdate();
39 |
40 | if (rowsUpdated > 0) {
41 | %>
42 |
47 | <%
48 | }else{
49 |
50 | %>
51 |
56 | <%
57 |
58 | }
59 | %>
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/checkout.jsp:
--------------------------------------------------------------------------------
1 |
2 | <%--
3 | Document : orderonline
4 | Created on : Mar 23, 2018, 2:04:08 AM
5 | Author : WorkSpace
6 | --%>
7 |
8 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
9 |
10 |
11 |
12 |
13 |
14 | BurgerVille
15 |
16 |
375 |
376 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
423 |
424 | <%
425 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
426 | %>
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 | HI! You are not logged in
435 | Please Login
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 | <%} else {
444 | %>
445 |
446 | Welcome <%=session.getAttribute("userid")%>
447 |
Log out
448 |
449 |
450 |
451 |
452 | <%
453 | String tp = request.getParameter("type");
454 | String qt = request.getParameter("quantity");
455 | int pr = Integer.parseInt(qt);
456 | int price=0;
457 |
458 |
459 |
460 |
461 |
462 |
463 | if (tp.equals("hamburger"))
464 | {
465 |
466 | price = 150* pr;
467 | }else if(tp.equals("cheeseburger")){
468 | price = 200* pr;
469 | }else if(tp.equals("doublecheeseburger")){
470 | price = 250* pr;
471 | }else{
472 |
473 | }
474 |
475 | String pri = Integer.toString(price);
476 | String qua = Integer.toString( pr);
477 |
478 | session.setAttribute("item", tp);
479 | session.setAttribute("quantity", qua);
480 | session.setAttribute("price", pri);
481 |
482 | %>
483 |
484 |
485 | Please Confirm your Order contains
486 | Item: <%=session.getAttribute("item")%>
487 |
488 | Quantity: <%=session.getAttribute("quantity")%>
489 |
490 | Price (BDT): <%=session.getAttribute("price")%>
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 | <%
543 | }
544 | %>
545 |
546 |
547 |
548 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/checkoutaction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : checkoutaction
3 | Created on : Mar 23, 2018, 10:00:04 PM
4 | Author : WorkSpace
5 | --%>
6 | <%@page import="java.text.SimpleDateFormat"%>
7 | <%@page import="java.util.Date"%>
8 | <%@page import="java.text.DateFormat"%>
9 | <%@ page import ="java.sql.*" %>
10 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
11 |
12 |
13 |
14 |
15 | Checking out
16 |
17 |
18 |
19 | <%
20 | String item=(String)session.getAttribute("item");
21 | String fname = request.getParameter("fname");
22 | String lname = request.getParameter("lname");
23 | String address = request.getParameter("address");
24 | String area = request.getParameter("area");
25 | String city = request.getParameter("city");
26 | String zipcode = request.getParameter("zipcode");
27 | String phone = request.getParameter("phone");
28 | String ddate = request.getParameter("ddate");
29 | String dtime = request.getParameter("dtime");
30 | String quantity=(String)session.getAttribute("quantity");
31 |
32 | String price=(String)session.getAttribute("price");
33 | String email=(String)session.getAttribute("email");
34 | String orderstatus = "waiting";
35 |
36 |
37 | DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
38 | Date date = new Date();
39 | String orderdate=dateFormat.format(date);
40 |
41 |
42 |
43 | //out.println(item+fname+lname+address+area+city+zipcode+phone+ddate+dtime+price+email+orderstatus+quantity);
44 |
45 | Class.forName("com.mysql.jdbc.Driver");
46 |
47 |
48 | try{
49 |
50 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
51 | Statement st = con.createStatement();
52 | //ResultSet rs;
53 | int i = st.executeUpdate("insert into orders(oid,item,fname,lname,address,area,city,zipcode,phone,ddate,dtime,quantity,price,email,orderstatus,orderdate)values(null,'"+item+"','"+fname+"','"+lname+"','"+address+"','"+area+"','"+city+"','"+zipcode+"','"+phone+"','"+ddate+"','"+dtime+"','"+quantity+"','"+price+"','"+email+"','"+orderstatus+"','"+orderdate+"')");
54 | if (i > 0) {
55 |
56 | response.sendRedirect("checkoutsuccess.jsp");
57 |
58 | } else {
59 | response.sendRedirect("orderonline.jsp");
60 | }
61 |
62 | }catch (Exception e)
63 | {
64 |
65 | %>
66 |
71 | <%
72 |
73 | }
74 |
75 |
76 |
77 |
78 |
79 | %>
80 |
81 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/checkoutsuccess.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : checkoutsuccess
3 | Created on : Mar 23, 2018, 11:12:19 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Order is Successful.
13 |
14 |
15 |
16 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/index.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : index
3 | Created on : Mar 21, 2018, 7:25:18 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 |
8 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
9 |
10 |
11 |
12 |
13 |
14 | BurgerVille
15 |
16 |
295 |
296 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
Design & Developed by- Rashedul Hoque Arif
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
353 |
354 | <%
355 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
356 | %>
357 |
358 |
359 |
360 |
361 |
362 |
363 |

364 |
365 |
378 |
379 |
380 |

381 |
382 |
402 |
403 | <%} else {
404 | %>
405 |
406 | Welcome <%=session.getAttribute("userid")%>
407 |
Log out
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
429 |
430 |
431 |
432 |
433 |
453 |
454 |
455 | <%
456 | }
457 | %>
458 |
459 |
460 |
461 |
462 |
463 |
464 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/indeximg/home1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/indeximg/home1.jpg
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/indeximg/home2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/indeximg/home2.jpg
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/indeximg/home3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/indeximg/home3.jpg
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/indeximg/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/indeximg/logo.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/indeximg/middleg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/build/web/indeximg/middleg.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/orderonline.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : orderonline
3 | Created on : Mar 23, 2018, 2:04:08 AM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 |
13 | BurgerVille
14 |
15 |
374 |
375 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
422 |
423 | <%
424 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
425 | %>
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 | HI! You are not logged in
434 | Please Login
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 | <%} else {
443 | %>
444 |
445 | Welcome <%=session.getAttribute("userid")%>
446 |
Log out
447 |
448 |
449 |
450 |
451 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 | <%
482 | }
483 | %>
484 |
485 |
486 |
487 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/register.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : register
3 | Created on : Mar 22, 2018, 3:19:38 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 | Create New Account
12 |
13 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
359 |
360 | <%
361 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
362 |
363 |
364 | } else {
365 |
366 | response.sendRedirect("index.jsp");
367 |
368 | }
369 | %>
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/registeraction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : registeraction
3 | Created on : Mar 22, 2018, 3:44:48 PM
4 | Author : WorkSpace
5 | --%>
6 | <%@ page import ="java.sql.*" %>
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Registration
13 |
14 |
15 |
16 | <%
17 |
18 | String fname = request.getParameter("fname");
19 | String lname = request.getParameter("lname");
20 | String pwd2 = request.getParameter("password");
21 | String email2 = request.getParameter("email");
22 | Class.forName("com.mysql.jdbc.Driver");
23 |
24 |
25 | try{
26 |
27 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
28 | Statement st = con.createStatement();
29 | //ResultSet rs;
30 | int i = st.executeUpdate("insert into user(id,fname,lname,email,password)values(null,'"+fname+"','"+lname+"','"+email2+"','"+pwd2+"')");
31 | if (i > 0) {
32 | //session.setAttribute("userid", user);
33 | response.sendRedirect("registersuccess.jsp");
34 | // out.print("Registration Successfull!"+"Go to Login");
35 | } else {
36 | response.sendRedirect("register.jsp");
37 | }
38 |
39 | }catch (Exception e)
40 | {
41 | %>
42 |
47 | <%
48 |
49 | }
50 | %>
51 |
52 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/registersuccess.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : registersuccess
3 | Created on : Mar 22, 2018, 3:51:35 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Registration is Successful.
13 |
14 |
15 |
16 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/userlogin.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : userlogin
3 | Created on : Mar 21, 2018, 7:19:31 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 |
13 | User Login
14 |
15 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
338 |
339 | <%
340 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
341 | %>
342 |
343 | <%} else {
344 |
345 | response.sendRedirect("index.jsp");
346 | }
347 | %>
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
User Login
358 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
392 |
393 |
394 |
395 |
396 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/userloginaction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : login
3 | Created on : Mar 21, 2018, 4:54:22 PM
4 | Author : WorkSpace
5 | --%>
6 | <%@ page import ="java.sql.*" %>
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | User Login Action
13 |
14 |
15 |
16 | <%
17 | String userid = request.getParameter("email");
18 | String pwd = request.getParameter("pass");
19 | Class.forName("com.mysql.jdbc.Driver");
20 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
21 | Statement st = con.createStatement();
22 |
23 | ResultSet rs;
24 | rs = st.executeQuery("select * from user where email='" + userid + "' and password='" + pwd + "'");
25 | //ResultSet rs2= st.executeQuery("select * from user where email='" + userid + "'");
26 |
27 |
28 | //out.println(name);
29 | if (rs.next()) {
30 | String un =rs.getString("fname");
31 | String email =rs.getString("email");
32 | session.setAttribute("userid", un);
33 | session.setAttribute("email", email);
34 |
35 | //out.println("welcome " + userid);
36 | //out.println("Log out");
37 | response.sendRedirect("userloginsuccess.jsp");
38 | } else {
39 | %>
40 |
45 | <%
46 | }
47 | %>
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/userloginsuccess.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : userloginsuccess
3 | Created on : Mar 21, 2018, 7:45:52 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | User Login Success
13 |
14 |
15 | <%
16 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
17 | %>
18 | You are not logged in
19 | Please Login
20 | <%} else {
21 |
22 | response.sendRedirect("index.jsp");
23 |
24 |
25 |
26 | }
27 | %>
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/build/web/userlogout.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : userlogout
3 | Created on : Mar 21, 2018, 7:48:45 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Logout
13 |
14 |
15 | <%
16 | session.setAttribute("userid", null);
17 | session.setAttribute("email", null);
18 | session.setAttribute("item", null);
19 | session.setAttribute("quantity", null);
20 | session.setAttribute("price", null);
21 | session.invalidate();
22 |
23 | response.sendRedirect("index.jsp");
24 | %>
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/dist/cse310Project.war:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/dist/cse310Project.war
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/lib/mysql-connector-java-5.1.46.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/lib/mysql-connector-java-5.1.46.jar
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/nbproject/ant-deploy.xml:
--------------------------------------------------------------------------------
1 |
2 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
64 |
67 |
68 |
69 |
70 |
71 |
73 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=ed391a99
2 | build.xml.script.CRC32=b2229552
3 | build.xml.stylesheet.CRC32=651128d4@1.77.1.1
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=ed391a99
7 | nbproject/build-impl.xml.script.CRC32=3d4fb6fd
8 | nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1
9 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | deploy.ant.properties.file=C:\\Users\\WorkSpace\\AppData\\Roaming\\NetBeans\\8.2\\tomcat90.properties
2 | j2ee.server.home=C:/Program Files/Apache Software Foundation/Tomcat 9.0
3 | j2ee.server.instance=tomcat90:home=C:\\Program Files\\Apache Software Foundation\\Tomcat 9.0
4 | javac.debug=true
5 | javadoc.preview=true
6 | selected.browser=SL[/Browsers/MicrosoftEdgeBrowser
7 | user.properties.file=C:\\Users\\WorkSpace\\AppData\\Roaming\\NetBeans\\8.2\\build.properties
8 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/C:/Users/WorkSpace/Documents/NetBeansProjects/cse310Project/web/userorders.jsp
7 | file:/C:/Users/WorkSpace/Documents/NetBeansProjects/cse310Project/web/orderonline.jsp
8 | file:/C:/Users/WorkSpace/Documents/NetBeansProjects/cse310Project/web/index.jsp
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/nbproject/project.properties:
--------------------------------------------------------------------------------
1 | annotation.processing.enabled=true
2 | annotation.processing.enabled.in.editor=true
3 | annotation.processing.processors.list=
4 | annotation.processing.run.all.processors=true
5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6 | build.classes.dir=${build.web.dir}/WEB-INF/classes
7 | build.classes.excludes=**/*.java,**/*.form
8 | build.dir=build
9 | build.generated.dir=${build.dir}/generated
10 | build.generated.sources.dir=${build.dir}/generated-sources
11 | build.test.classes.dir=${build.dir}/test/classes
12 | build.test.results.dir=${build.dir}/test/results
13 | build.web.dir=${build.dir}/web
14 | build.web.excludes=${build.classes.excludes}
15 | client.urlPart=
16 | compile.jsps=false
17 | conf.dir=${source.root}/conf
18 | debug.classpath=${build.classes.dir}:${javac.classpath}
19 | debug.test.classpath=\
20 | ${run.test.classpath}
21 | display.browser=true
22 | # Files to be excluded from distribution war
23 | dist.archive.excludes=
24 | dist.dir=dist
25 | dist.ear.war=${dist.dir}/${war.ear.name}
26 | dist.javadoc.dir=${dist.dir}/javadoc
27 | dist.war=${dist.dir}/${war.name}
28 | endorsed.classpath=\
29 | ${libs.javaee-endorsed-api-7.0.classpath}
30 | excludes=
31 | file.reference.mysql-connector-java-5.1.46.jar=lib/mysql-connector-java-5.1.46.jar
32 | includes=**
33 | j2ee.compile.on.save=true
34 | j2ee.copy.static.files.on.save=true
35 | j2ee.deploy.on.save=true
36 | j2ee.platform=1.7-web
37 | j2ee.platform.classpath=${j2ee.server.home}/lib/annotations-api.jar:${j2ee.server.home}/lib/catalina-ant.jar:${j2ee.server.home}/lib/catalina-ha.jar:${j2ee.server.home}/lib/catalina-storeconfig.jar:${j2ee.server.home}/lib/catalina-tribes.jar:${j2ee.server.home}/lib/catalina.jar:${j2ee.server.home}/lib/ecj-4.6.3.jar:${j2ee.server.home}/lib/el-api.jar:${j2ee.server.home}/lib/jasper-el.jar:${j2ee.server.home}/lib/jasper.jar:${j2ee.server.home}/lib/jaspic-api.jar:${j2ee.server.home}/lib/jsp-api.jar:${j2ee.server.home}/lib/servlet-api.jar:${j2ee.server.home}/lib/tomcat-api.jar:${j2ee.server.home}/lib/tomcat-coyote.jar:${j2ee.server.home}/lib/tomcat-dbcp.jar:${j2ee.server.home}/lib/tomcat-i18n-es.jar:${j2ee.server.home}/lib/tomcat-i18n-fr.jar:${j2ee.server.home}/lib/tomcat-i18n-ja.jar:${j2ee.server.home}/lib/tomcat-jdbc.jar:${j2ee.server.home}/lib/tomcat-jni.jar:${j2ee.server.home}/lib/tomcat-util-scan.jar:${j2ee.server.home}/lib/tomcat-util.jar:${j2ee.server.home}/lib/tomcat-websocket.jar:${j2ee.server.home}/lib/websocket-api.jar
38 | j2ee.server.type=Tomcat
39 | jar.compress=false
40 | javac.classpath=\
41 | ${file.reference.mysql-connector-java-5.1.46.jar}
42 | # Space-separated list of extra javac options
43 | javac.compilerargs=
44 | javac.debug=true
45 | javac.deprecation=false
46 | javac.processorpath=\
47 | ${javac.classpath}
48 | javac.source=1.8
49 | javac.target=1.8
50 | javac.test.classpath=\
51 | ${javac.classpath}:\
52 | ${build.classes.dir}
53 | javac.test.processorpath=\
54 | ${javac.test.classpath}
55 | javadoc.additionalparam=
56 | javadoc.author=false
57 | javadoc.encoding=${source.encoding}
58 | javadoc.noindex=false
59 | javadoc.nonavbar=false
60 | javadoc.notree=false
61 | javadoc.preview=true
62 | javadoc.private=false
63 | javadoc.splitindex=true
64 | javadoc.use=true
65 | javadoc.version=false
66 | javadoc.windowtitle=
67 | lib.dir=${web.docbase.dir}/WEB-INF/lib
68 | persistence.xml.dir=${conf.dir}
69 | platform.active=default_platform
70 | resource.dir=setup
71 | run.test.classpath=\
72 | ${javac.test.classpath}:\
73 | ${build.test.classes.dir}
74 | # Space-separated list of JVM arguments used when running a class with a main method or a unit test
75 | # (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
76 | runmain.jvmargs=
77 | source.encoding=UTF-8
78 | source.root=src
79 | src.dir=${source.root}/java
80 | test.src.dir=test
81 | war.content.additional=
82 | war.ear.name=${war.name}
83 | war.name=cse310Project.war
84 | web.docbase.dir=web
85 | webinf.dir=web/WEB-INF
86 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.web.project
4 |
5 |
6 | cse310Project
7 | 1.6.5
8 |
9 |
10 | ${file.reference.mysql-connector-java-5.1.46.jar}
11 | WEB-INF/lib
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/src/conf/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 |
3 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/Footer/BG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/Footer/BG.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/Footer/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/Footer/email.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/Footer/fb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/Footer/fb.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/Footer/feed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/Footer/feed.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/Footer/googlePlus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/Footer/googlePlus.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/Footer/location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/Footer/location.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/Footer/tt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/Footer/tt.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/Footer/yt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/Footer/yt.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/META-INF/context.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminimg/dash1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/adminimg/dash1.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminimg/dash2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/adminimg/dash2.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminimg/dash3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/adminimg/dash3.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminimg/dash4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/adminimg/dash4.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminimg/dash5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/adminimg/dash5.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminimg/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/adminimg/logo.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminlogin.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminlogin
3 | Created on : Mar 22, 2018, 4:30:59 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 |
8 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
9 |
10 |
11 |
12 |
13 |
14 | Admin Login
15 |
16 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
364 |
365 | <%
366 | if ((session.getAttribute("adn") == null) || (session.getAttribute("adn") == "")) {
367 |
368 |
369 | } else {
370 |
371 | response.sendRedirect("adminloginsuccess.jsp");
372 |
373 | }
374 | %>
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
Admin Login
383 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
417 |
418 |
419 |
420 |
421 |
422 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminloginaction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminloginaction
3 | Created on : Mar 22, 2018, 4:31:19 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 |
8 | <%@ page import ="java.sql.*" %>
9 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
10 |
11 |
12 |
13 |
14 | User Login Action
15 |
16 |
17 |
18 | <%
19 | String userid = request.getParameter("email");
20 | String pwd = request.getParameter("pass");
21 | Class.forName("com.mysql.jdbc.Driver");
22 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
23 | Statement st = con.createStatement();
24 |
25 | ResultSet rs;
26 | rs = st.executeQuery("select * from admin where email='" + userid + "' and password='" + pwd + "'");
27 | //ResultSet rs2= st.executeQuery("select * from user where email='" + userid + "'");
28 |
29 |
30 | //out.println(name);
31 | if (rs.next()) {
32 | String an =rs.getString("fname");
33 | session.setAttribute("adn", an);
34 |
35 | //out.println("welcome " + userid);
36 | //out.println("Log out");
37 | response.sendRedirect("adminloginsuccess.jsp");
38 | } else {
39 | %>
40 |
45 | <%
46 | }
47 | %>
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminloginsuccess.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminloginsuccess
3 | Created on : Mar 22, 2018, 4:31:46 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Admin Login Success
13 |
14 |
15 |
240 |
241 |
242 |
264 |
342 |
343 |
344 |
345 |
346 | <%
347 | if ((session.getAttribute("adn") == null) || (session.getAttribute("adn") == "")) {
348 | %>
349 |
350 |
351 |
CSE310: Object Oriented Programming (ADN)
352 |
353 |
354 |
355 |
356 |
357 |
Control Panel
358 |
359 |
364 |
365 |
366 |
367 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 | <%} else {
431 | %>
432 |
433 |
434 |
435 |
436 |
437 | Design & Developed by- Rashedul Hoque Arif
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
450 |
451 |
452 |
453 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
Dashboard
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 | <%
547 | }
548 | %>
549 |
550 |
551 |
552 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminlogout.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminlogout
3 | Created on : Mar 22, 2018, 4:48:17 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Admin Logout
13 |
14 |
15 | <%
16 |
17 | session.setAttribute("adn", null);
18 | session.invalidate();
19 |
20 | response.sendRedirect("adminloginsuccess.jsp");
21 | %>
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/adminorderaction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : adminorderaction
3 | Created on : Mar 24, 2018, 6:38:00 PM
4 | Author : WorkSpace
5 | --%>
6 | <%@ page import ="java.sql.*" %>
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Admin Order Update
13 |
14 |
15 |
16 |
17 |
18 | <%
19 | String oid = request.getParameter("oid");
20 |
21 | String orderstatus = request.getParameter("orderstatus");
22 |
23 | Class.forName("com.mysql.jdbc.Driver");
24 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
25 | //Statement st = con.createStatement();
26 |
27 | //ResultSet rs;
28 | //rs = st.executeQuery("UPDATE orders SET orderstatus='" + orderstatus + "' WHERE oid='" + oid + "'");
29 | //ResultSet rs2= st.executeQuery("select * from user where email='" + userid + "'");
30 |
31 | String sql = "UPDATE orders SET orderstatus=? WHERE oid=?";
32 |
33 | PreparedStatement statement = con.prepareStatement(sql);
34 | statement.setString(1, orderstatus);
35 | statement.setString(2, oid);
36 |
37 |
38 | int rowsUpdated = statement.executeUpdate();
39 |
40 | if (rowsUpdated > 0) {
41 | %>
42 |
47 | <%
48 | }else{
49 |
50 | %>
51 |
56 | <%
57 |
58 | }
59 | %>
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/checkout.jsp:
--------------------------------------------------------------------------------
1 |
2 | <%--
3 | Document : orderonline
4 | Created on : Mar 23, 2018, 2:04:08 AM
5 | Author : WorkSpace
6 | --%>
7 |
8 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
9 |
10 |
11 |
12 |
13 |
14 | BurgerVille
15 |
16 |
375 |
376 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
423 |
424 | <%
425 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
426 | %>
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 | HI! You are not logged in
435 | Please Login
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 | <%} else {
444 | %>
445 |
446 | Welcome <%=session.getAttribute("userid")%>
447 |
Log out
448 |
449 |
450 |
451 |
452 | <%
453 | String tp = request.getParameter("type");
454 | String qt = request.getParameter("quantity");
455 | int pr = Integer.parseInt(qt);
456 | int price=0;
457 |
458 |
459 |
460 |
461 |
462 |
463 | if (tp.equals("hamburger"))
464 | {
465 |
466 | price = 150* pr;
467 | }else if(tp.equals("cheeseburger")){
468 | price = 200* pr;
469 | }else if(tp.equals("doublecheeseburger")){
470 | price = 250* pr;
471 | }else{
472 |
473 | }
474 |
475 | String pri = Integer.toString(price);
476 | String qua = Integer.toString( pr);
477 |
478 | session.setAttribute("item", tp);
479 | session.setAttribute("quantity", qua);
480 | session.setAttribute("price", pri);
481 |
482 | %>
483 |
484 |
485 | Please Confirm your Order contains
486 | Item: <%=session.getAttribute("item")%>
487 |
488 | Quantity: <%=session.getAttribute("quantity")%>
489 |
490 | Price (BDT): <%=session.getAttribute("price")%>
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 | <%
543 | }
544 | %>
545 |
546 |
547 |
548 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/checkoutaction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : checkoutaction
3 | Created on : Mar 23, 2018, 10:00:04 PM
4 | Author : WorkSpace
5 | --%>
6 | <%@page import="java.text.SimpleDateFormat"%>
7 | <%@page import="java.util.Date"%>
8 | <%@page import="java.text.DateFormat"%>
9 | <%@ page import ="java.sql.*" %>
10 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
11 |
12 |
13 |
14 |
15 | Checking out
16 |
17 |
18 |
19 | <%
20 | String item=(String)session.getAttribute("item");
21 | String fname = request.getParameter("fname");
22 | String lname = request.getParameter("lname");
23 | String address = request.getParameter("address");
24 | String area = request.getParameter("area");
25 | String city = request.getParameter("city");
26 | String zipcode = request.getParameter("zipcode");
27 | String phone = request.getParameter("phone");
28 | String ddate = request.getParameter("ddate");
29 | String dtime = request.getParameter("dtime");
30 | String quantity=(String)session.getAttribute("quantity");
31 |
32 | String price=(String)session.getAttribute("price");
33 | String email=(String)session.getAttribute("email");
34 | String orderstatus = "waiting";
35 |
36 |
37 | DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
38 | Date date = new Date();
39 | String orderdate=dateFormat.format(date);
40 |
41 |
42 |
43 | //out.println(item+fname+lname+address+area+city+zipcode+phone+ddate+dtime+price+email+orderstatus+quantity);
44 |
45 | Class.forName("com.mysql.jdbc.Driver");
46 |
47 |
48 | try{
49 |
50 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
51 | Statement st = con.createStatement();
52 | //ResultSet rs;
53 | int i = st.executeUpdate("insert into orders(oid,item,fname,lname,address,area,city,zipcode,phone,ddate,dtime,quantity,price,email,orderstatus,orderdate)values(null,'"+item+"','"+fname+"','"+lname+"','"+address+"','"+area+"','"+city+"','"+zipcode+"','"+phone+"','"+ddate+"','"+dtime+"','"+quantity+"','"+price+"','"+email+"','"+orderstatus+"','"+orderdate+"')");
54 | if (i > 0) {
55 |
56 | response.sendRedirect("checkoutsuccess.jsp");
57 |
58 | } else {
59 | response.sendRedirect("orderonline.jsp");
60 | }
61 |
62 | }catch (Exception e)
63 | {
64 |
65 | %>
66 |
71 | <%
72 |
73 | }
74 |
75 |
76 |
77 |
78 |
79 | %>
80 |
81 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/checkoutsuccess.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : checkoutsuccess
3 | Created on : Mar 23, 2018, 11:12:19 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Order is Successful.
13 |
14 |
15 |
16 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/index.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : index
3 | Created on : Mar 21, 2018, 7:25:18 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 |
8 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
9 |
10 |
11 |
12 |
13 |
14 | BurgerVille
15 |
16 |
295 |
296 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
Design & Developed by- Rashedul Hoque Arif
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
353 |
354 | <%
355 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
356 | %>
357 |
358 |
359 |
360 |
361 |
362 |
363 |

364 |
365 |
378 |
379 |
380 |

381 |
382 |
402 |
403 | <%} else {
404 | %>
405 |
406 | Welcome <%=session.getAttribute("userid")%>
407 |
Log out
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
429 |
430 |
431 |
432 |
433 |
453 |
454 |
455 | <%
456 | }
457 | %>
458 |
459 |
460 |
461 |
462 |
463 |
464 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/indeximg/home1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/indeximg/home1.jpg
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/indeximg/home2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/indeximg/home2.jpg
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/indeximg/home3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/indeximg/home3.jpg
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/indeximg/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/indeximg/logo.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/indeximg/middleg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rashedulhoque049/Java-Web-Project-Restaurant-Management-System/1b23c530c8720c7cd224f4e5bcb52d975c3bc7ad/Restaurant Management/cse310Project/web/indeximg/middleg.png
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/orderonline.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : orderonline
3 | Created on : Mar 23, 2018, 2:04:08 AM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 |
13 | BurgerVille
14 |
15 |
374 |
375 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
422 |
423 | <%
424 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
425 | %>
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 | HI! You are not logged in
434 | Please Login
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 | <%} else {
443 | %>
444 |
445 | Welcome <%=session.getAttribute("userid")%>
446 |
Log out
447 |
448 |
449 |
450 |
451 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 | <%
482 | }
483 | %>
484 |
485 |
486 |
487 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/register.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : register
3 | Created on : Mar 22, 2018, 3:19:38 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 | Create New Account
12 |
13 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
359 |
360 | <%
361 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
362 |
363 |
364 | } else {
365 |
366 | response.sendRedirect("index.jsp");
367 |
368 | }
369 | %>
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/registeraction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : registeraction
3 | Created on : Mar 22, 2018, 3:44:48 PM
4 | Author : WorkSpace
5 | --%>
6 | <%@ page import ="java.sql.*" %>
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Registration
13 |
14 |
15 |
16 | <%
17 |
18 | String fname = request.getParameter("fname");
19 | String lname = request.getParameter("lname");
20 | String pwd2 = request.getParameter("password");
21 | String email2 = request.getParameter("email");
22 | Class.forName("com.mysql.jdbc.Driver");
23 |
24 |
25 | try{
26 |
27 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
28 | Statement st = con.createStatement();
29 | //ResultSet rs;
30 | int i = st.executeUpdate("insert into user(id,fname,lname,email,password)values(null,'"+fname+"','"+lname+"','"+email2+"','"+pwd2+"')");
31 | if (i > 0) {
32 | //session.setAttribute("userid", user);
33 | response.sendRedirect("registersuccess.jsp");
34 | // out.print("Registration Successfull!"+"Go to Login");
35 | } else {
36 | response.sendRedirect("register.jsp");
37 | }
38 |
39 | }catch (Exception e)
40 | {
41 | %>
42 |
47 | <%
48 |
49 | }
50 | %>
51 |
52 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/registersuccess.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : registersuccess
3 | Created on : Mar 22, 2018, 3:51:35 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Registration is Successful.
13 |
14 |
15 |
16 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/userlogin.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : userlogin
3 | Created on : Mar 21, 2018, 7:19:31 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 |
13 | User Login
14 |
15 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
338 |
339 | <%
340 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
341 | %>
342 |
343 | <%} else {
344 |
345 | response.sendRedirect("index.jsp");
346 | }
347 | %>
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
User Login
358 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
392 |
393 |
394 |
395 |
396 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/userloginaction.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : login
3 | Created on : Mar 21, 2018, 4:54:22 PM
4 | Author : WorkSpace
5 | --%>
6 | <%@ page import ="java.sql.*" %>
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | User Login Action
13 |
14 |
15 |
16 | <%
17 | String userid = request.getParameter("email");
18 | String pwd = request.getParameter("pass");
19 | Class.forName("com.mysql.jdbc.Driver");
20 | Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/cse310","root", "root");
21 | Statement st = con.createStatement();
22 |
23 | ResultSet rs;
24 | rs = st.executeQuery("select * from user where email='" + userid + "' and password='" + pwd + "'");
25 | //ResultSet rs2= st.executeQuery("select * from user where email='" + userid + "'");
26 |
27 |
28 | //out.println(name);
29 | if (rs.next()) {
30 | String un =rs.getString("fname");
31 | String email =rs.getString("email");
32 | session.setAttribute("userid", un);
33 | session.setAttribute("email", email);
34 |
35 | //out.println("welcome " + userid);
36 | //out.println("Log out");
37 | response.sendRedirect("userloginsuccess.jsp");
38 | } else {
39 | %>
40 |
45 | <%
46 | }
47 | %>
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/userloginsuccess.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : userloginsuccess
3 | Created on : Mar 21, 2018, 7:45:52 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | User Login Success
13 |
14 |
15 | <%
16 | if ((session.getAttribute("userid") == null) || (session.getAttribute("userid") == "")) {
17 | %>
18 | You are not logged in
19 | Please Login
20 | <%} else {
21 |
22 | response.sendRedirect("index.jsp");
23 |
24 |
25 |
26 | }
27 | %>
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Restaurant Management/cse310Project/web/userlogout.jsp:
--------------------------------------------------------------------------------
1 | <%--
2 | Document : userlogout
3 | Created on : Mar 21, 2018, 7:48:45 PM
4 | Author : WorkSpace
5 | --%>
6 |
7 | <%@page contentType="text/html" pageEncoding="UTF-8"%>
8 |
9 |
10 |
11 |
12 | Logout
13 |
14 |
15 | <%
16 | session.setAttribute("userid", null);
17 | session.setAttribute("email", null);
18 | session.setAttribute("item", null);
19 | session.setAttribute("quantity", null);
20 | session.setAttribute("price", null);
21 | session.invalidate();
22 |
23 | response.sendRedirect("index.jsp");
24 | %>
25 |
26 |
27 |
--------------------------------------------------------------------------------