<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
<title><%=PizzaServiceApplication.MAIN_TITLE%> - Sitzung beenden</title>
</head>
--- /dev/null
+<%--
+ Document : login
+ Created on : 11.08.2015, 11:35:53
+ Author : Roland Haeder
+--%>
+
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
+ <title><%=PizzaServiceApplication.MAIN_TITLE%> - Einloggen</title>
+ </head>
+
+ <body>
+ <div id="title">
+ <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Einloggen</h1>
+ </div>
+
+ <jsp:include page="/static/menu.jsp" flush="true" />
+
+ <div id="content_outer">
+ <div id="content_title">
+ <h2>Einloggen als bestehender Kunde:</h2>
+ </div>
+
+ <div id="content">
+ <div class="para">
+ Noch kein Kunde? Einfach beim Bestellen anmelden oder <a href="<%=request.getContextPath()%>/register.jsp">hier</a> anmelden.
+ </div>
+
+ <div class="para">
+ <jsp:include page="/static/forms/login.jsp" flush="true" />
+ </div>
+
+ <div class="para">
+ <a href="<%=request.getContextPath()%>/lost_passwd.jsp">Passwort vergessen?</a>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
--- /dev/null
+<%--
+ Document : register
+ Created on : 11.08.2015, 11:56:22
+ Author : Roland Haeder
+--%>
+
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
+ <title><%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde</title>
+ </head>
+
+ <body>
+ <div id="title">
+ <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde</h1>
+ </div>
+
+ <jsp:include page="/static/menu.jsp" flush="true" />
+
+ <div id="content_outer">
+ <div id="content_title">
+ <h2>Anmelden zum <%=PizzaServiceApplication.MAIN_TITLE%>:</h2>
+ </div>
+
+ <div id="content">
+ <div>
+ Sie sind bereits Kunde? Dann <a href="<%=request.getContextPath()%>/login.jsp">hier</a> einloggen.
+ </div>
+
+ <form action="<%=request.getContextPath()%>/form_handler/do_register.jsp" accept-charset="utf-8" id="form" method="post">
+ <div class="table">
+ <div class="table_header">
+ Bitte geben Sie mindestens Name, Anschrift und Telefonnummer ein:
+ </div>
+
+ <div class="table_footer">
+ <input type="reset" value="Formular zurücksetzen" />
+ <input type="submit" name="send" value="Anmelden" />
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </body>
+</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
<title><%=PizzaServiceApplication.MAIN_TITLE%> - Fehler</title>
</head>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
<title><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</title>
</head>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
<title><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</title>
</head>
--- /dev/null
+<%--
+ Document : order
+ Created on : 04.08.2015, 10:55:10
+ Author : Roland Haeder
+--%>
+
+<%--<%@page errorPage="errorHandler.jsp" %>--%>
+<%@page import="java.util.Iterator"%>
+<%@page import="java.util.Map"%>
+<%@page import="org.mxchange.jcore.contact.Gender"%>
+<%@page import="org.mxchange.pizzaapplication.product.Product"%>
+<%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
+<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
+<%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %>
+<%@page contentType="text/html" pageEncoding="UTF-8"%>
+
+<%
+ // Init application instance
+ PizzaApplication app = PizzaServiceApplication.getInstance(application);
+
+ // Is it post?
+ if ("POST".equals(request.getMethod())) { //NOI18N
+ // "Walk" through all products and unmark them as ordered
+ for (final Product product : app.getUnmarkedProducts(session)) {
+ // Is it choosen and amount set?
+ if (app.isProductChoosen(product, request, session)) {
+ // Then mark it as choosen
+ app.markProductAsChoosen(product, session);
+ }
+ }
+ // Redirect to proper URL
+ // @TODO Commented out for developing:
+ //response.sendRedirect(request.getContextPath() + "/finished.jsp");
+%>
+<jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
+<jsp:setProperty name="customer" property="*" />
+<jsp:forward page="../preview.jsp" />
+<%
+ }
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
+ <title><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</title>
+ </head>
+
+ <body>
+ <div id="title">
+ <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</h1>
+ </div>
+
+ <jsp:include page="/static/menu.jsp" flush="true" />
+
+ <div id="content_outer">
+ <div id="content_title">
+ <h2>Bitte nicht direkt aufrufen:</h2>
+ </div>
+
+ <div id="content">
+ Bitte rufen Sie diese Seite nicht direkt auf.
+ </div>
+ </div>
+ </body>
+</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
<title><%=PizzaServiceApplication.MAIN_TITLE%> - Eingangsseite</title>
</head>
</div>
<div id="content">
- <form action="<%=request.getContextPath()%>/preview.jsp" accept-charset="utf-8" id="form" method="post">
+ <form action="<%=request.getContextPath()%>/form_handler/do_preview.jsp" accept-charset="utf-8" id="form" method="post">
<table class="table">
<thead class="table_header">
<tr>
+++ /dev/null
-<%--
- Document : login
- Created on : 11.08.2015, 11:35:53
- Author : Roland Haeder
---%>
-
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="style.css" type="text/css"/>
- <title><%=PizzaServiceApplication.MAIN_TITLE%> - Einloggen</title>
- </head>
-
- <body>
- <div id="title">
- <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Einloggen</h1>
- </div>
-
- <jsp:include page="/static/menu.jsp" flush="true" />
-
- <div id="content_outer">
- <div id="content_title">
- <h2>Einloggen als bestehender Kunde:</h2>
- </div>
-
- <div id="content">
- <div>
- Noch kein Kunde? Einfach beim Bestellen anmelden oder <a href="<%=request.getContextPath()%>/register.jsp">hier</a> anmelden.
- </div>
-
- <form action="<%=request.getContextPath()%>/form_handler/do_login.jsp" accept-charset="utf-8" id="form" method="post">
- <div class="table">
- <div class="table_header">
- Bitte geben Sie Ihre Kundennummer und Passwort ein:
- </div>
-
- <fieldset id="login_data">
- <legend title="Bitte Daten eingeben:">Bitte Daten eingeben:</legend>
-
- <div class="table_row">
- <div class="data_left">
- Kundennummer:
- </div>
- <div class="data_right">
- <input type="text" name="id" size="10" maxlength="20" />
- </div>
- </div>
-
- <div class="clear"></div>
-
- <div class="table_row">
- <div class="data_left">
- Passwort:
- </div>
- <div class="data_right">
- <input type="password" name="password" size="10" maxlength="255" />
- </div>
- </div>
-
- <div class="clear"></div>
- </fieldset>
-
- <div class="table_footer">
- <input type="reset" value="Formular zurücksetzen" />
- <input type="submit" name="send" value="Einloggen" />
- </div>
- </div>
- </form>
- </div>
- </div>
- </body>
-</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="style.css" type="text/css"/>
+ <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
<title><%=PizzaServiceApplication.MAIN_TITLE%> - Bestellung anzeigen</title>
</head>
</div>
<div class="data_right">
- <select name="gender" id="gender" size="1" <%=app.getDisabledHtmlFromSession(request, session)%>>
- <%
- // "Walk" through all genders and output them
- for (final Gender gender : Gender.values()) {
- %>
- <option value="<%=gender.name()%>"<%
- // Get gender from bean
- Gender value= customer.getGender();
-
- // Test it
- if (value.equals(gender)) {
- // Output selected="selected"
- out.print("selected=\"selected\"");
- }
- %>><%=gender%></option>
- <%
- }
- %>
- </select>
+ <jsp:include page="/static/gender_selection_box.jsp" flush="true" />
</div>
<div class="clear"></div>
+++ /dev/null
-<%--
- Document : register
- Created on : 11.08.2015, 11:56:22
- Author : Roland Haeder
---%>
-
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="style.css" type="text/css"/>
- <title><%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde</title>
- </head>
-
- <body>
- <div id="title">
- <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Neukunde</h1>
- </div>
-
- <jsp:include page="/static/menu.jsp" flush="true" />
-
- <div id="content_outer">
- <div id="content_title">
- <h2>Einloggen als bestehender Kunde:</h2>
- </div>
-
- <div id="content">
- <div>
- Sie sind bereits Kunde? Dann <a href="<%=request.getContextPath()%>/login.jsp">hier</a> einloggen.
- </div>
-
- <form action="<%=request.getContextPath()%>/form_handler/do_register.jsp" accept-charset="utf-8" id="form" method="post">
- <div class="table">
- <div class="table_header">
- Bitte geben Sie mindestens Name, Anschrift und Telefonnummer ein:
- </div>
-
- <div class="table_footer">
- <input type="reset" value="Formular zurücksetzen" />
- <input type="submit" name="send" value="Anmelden" />
- </div>
- </div>
- </form>
- </div>
- </div>
- </body>
-</html>
--- /dev/null
+<%--
+ Document : login
+ Created on : 11.08.2015, 12:28:03
+ Author : Roland Haeder
+--%>
+<div id="login_form">
+ <form action="<%=request.getContextPath()%>/form_handler/do_login.jsp" accept-charset="utf-8" id="form" method="post">
+ <div class="table">
+ <div class="table_header">
+ Bitte geben Sie Ihre Kundennummer und Passwort ein:
+ </div>
+
+ <fieldset id="login_data">
+ <legend title="Bitte Daten eingeben:">Bitte Daten eingeben:</legend>
+
+ <div class="table_row">
+ <div class="data_left">
+ Kundennummer:
+ </div>
+ <div class="data_right">
+ <input type="text" name="id" size="10" maxlength="20" />
+ </div>
+ </div>
+
+ <div class="clear"></div>
+
+ <div class="table_row">
+ <div class="data_left">
+ Passwort:
+ </div>
+ <div class="data_right">
+ <input type="password" name="password" size="10" maxlength="255" />
+ </div>
+ </div>
+
+ <div class="clear"></div>
+ </fieldset>
+
+ <div class="table_footer">
+ <input type="hidden" name="redirect" value="<%=request.getRequestURI()%>" />
+ <input type="reset" value="Formular zurücksetzen" />
+ <input type="submit" name="send" value="Einloggen" />
+ </div>
+ </div>
+ </form>
+</div>
--- /dev/null
+<%--
+ Document : gender_selection_box
+ Created on : 11.08.2015, 13:02:12
+ Author : Roland Haeder
+--%>
+<%@page import="org.mxchange.jcore.contact.Gender"%>
+<%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
+<%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
+<%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %>
+
+<jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
+
+<%
+ // Init application instance
+ PizzaApplication app = PizzaServiceApplication.getInstance(application);
+%>
+
+<select name="gender" id="gender" size="1" <%=app.getDisabledHtmlFromSession(request, session)%>>
+ <%
+ // "Walk" through all genders and output them
+ for (final Gender gender : Gender.values()) {
+ %>
+ <option value="<%=gender.name()%>"<%
+ // Get gender from bean
+ Gender value= customer.getGender();
+
+ // Test it
+ if (value.equals(gender)) {
+ // Output selected="selected"
+ out.print("selected=\"selected\"");
+ }
+ %>><%=gender%></option>
+ <%
+ }
+ %>
+</select>
</ul>
<ul>
- <li><a href="<%=request.getContextPath()%>/login.jsp" title="Login für bestehende Kunden">Einloggen</a></li>
- <li><a href="<%=request.getContextPath()%>/register.jsp" title="Anmeldung als neuer Kunde">Neuer Kunde</a></li>
- <li><a href="<%=request.getContextPath()%>/lost_passwd.jsp" title="Neues Passwort erstellen">Passwort vergessen?</a></li>
+ <li><a href="<%=request.getContextPath()%>/customer/login.jsp" title="Login für bestehende Kunden">Einloggen</a></li>
+ <li><a href="<%=request.getContextPath()%>/customer/register.jsp" title="Anmeldung als neuer Kunde">Neuer Kunde</a></li>
+ <li><a href="<%=request.getContextPath()%>/customer/lost_passwd.jsp" title="Neues Passwort erstellen">Passwort vergessen?</a></li>
</ul>
</div>
clear: both;
}
-table {
+table, .table {
margin: 0px;
padding: 0px;
}
+.table {
+ width: 500px;
+}
+
.table_row {
width: 300px;
}