-
Notifications
You must be signed in to change notification settings - Fork 0
/
cart.jspx
88 lines (80 loc) · 2.6 KB
/
cart.jspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsp/jstl/fmt" version="2.0">
<jsp:directive.page contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" session="false" />
<jsp:output doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
omit-xml-declaration="true" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cart</title>
<link rel="stylesheet" href="res/main.css" type="text/css"
charset="utf-8" />
</head>
<body>
<form action="Start" method="POST">
<div id="banner">
<a href="home.jspx"> <img src="images/Banner.jpg" alt="Banner"
width="250" height="100"></img>
</a> <span id="banner2"> <img id="banner2"
src="images/Banner2.jpg" alt="Banner" width="400" height="100"></img>
</span>
</div>
<ul>
<li><a href="home.jspx">Home</a></li>
<c:choose>
<c:when test="${isLogedIn == 'true'}">
<li><a href="logout.jspx">Log Out</a></li>
</c:when>
<c:otherwise>
<li><a href="login.jspx">Log In</a></li>
</c:otherwise>
</c:choose>
<li>
<div class="dropdown">
<button class="dropbtn">Category</button>
<div class="dropdown-content">
<a href="#">Science</a> <a href="#">Fiction</a> <a href="#">Engineering</a>
</div>
</div>
</li>
<li id="searchbar" style="float: right"><input type="text"
id="search" placeholder="Search" name="searchValue" /> <input
type="submit" id="searchbutton" value="Search" name="searchSubmit" /></li>
</ul>
<br /> <br /> <br />
<div class="body">
<span></span>
<H2>Items in ${user.userName}'s cart</H2>
<H3>Cart Items</H3>
<TABLE style="width: 65%" border="2">
<thead>
<tr>
<th class="row-1 row-ID">Picture</th>
<th class="row-2 row-name">Name</th>
<th class="row-3 row-job">Price</th>
<th class="row-4 row-email">Quantity</th>
</tr>
</thead>
<c:forEach items="${list}"
var="item">
<tr>
<td width="20%"><img src="images/${item.bid}.jpg" alt="Books"
height="200" width="140"></img></td>
<td width="20%">${item.title}</td>
<td width="20%">$${item.price}0</td>
<td width="5%"><input type="number" min="0" max="99" size="2"
maxlength="2" name="numberOfItem"></input></td>
</tr>
</c:forEach>
</TABLE>
<label> Total price</label> <Label name="price">The price
goes here</Label>
</div>
</form>
</body>
</html>
</jsp:root>