Skip to content

Commit

Permalink
add profile.jsp
Browse files Browse the repository at this point in the history
  • Loading branch information
HoaAyWK committed Dec 4, 2021
1 parent a2c9355 commit 9224e39
Show file tree
Hide file tree
Showing 12 changed files with 452 additions and 11 deletions.
4 changes: 2 additions & 2 deletions WebContent/final-project/add-session.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<div class="mb-2">
<label class="form-label" for="title">Movie Name</label>
<select class="form-select" name="movieName">
<c:forEach var="movie" items="movies" varStatus="loop">
<c:forEach var="movie" items="${movies}" varStatus="loop">
<c:if test="${loop.index == 0}">
<option selected>${movie.title}</option>
</c:if>
Expand All @@ -89,7 +89,7 @@
<div class="mb-2">
<label class="form-label" for="imgPath">Cinema</label>
<select class="form-select" name="cinemaName">
<c:forEach var="cinema" items="cinemas" varStatus="loop">
<c:forEach var="cinema" items="${cinemas}" varStatus="loop">
<c:if test="${loop.index == 0}">
<option selected>${cinema.name}</option>
</c:if>
Expand Down
1 change: 0 additions & 1 deletion WebContent/final-project/book-tickets.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="shortcut icon" type="image/png/x-icon" href="<c:url value='/assets/favicon/popcorn-favicon.ico'/>">
<script src="https://kit.fontawesome.com/d99e1d4bab.js"></script>
<link href="<c:url value='/final-project/css/nice-select1.css'/>" rel="stylesheet"/>
<link href="<c:url value='/final-project/css/book1.css'/>" rel="stylesheet"/>
</head>
<body>
Expand Down
156 changes: 156 additions & 0 deletions WebContent/final-project/css/user-profile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
*::-webkit-scrollbar {
width: 4px;
background-color: #F5F5F5;
}

*::-webkit-scrollbar-thumb {
background-color: #000;
border-radius: 3px;
}

*::-webkit-scrollbar-track {
background: #f1f1f1;
}

*::-webkit-scrollbar-thumb:hover {
background: #555;
}

body {
color: #fff;
background: rgb(8 3 37 / 96%);
}

.dropdown-menu {
left: -5rem!important;
background: rgb(8 3 37 / 70%);
}

.dropdown-menu li {
padding-top: 0.2rem;
padding-bottom: 0.2rem;
}

.dropdown-menu li:hover {
background: rgb(8 3 37 / 90%)!important;
}

.dropdown-menu li a {
text-decoration: none;
padding: 1rem;
}


.navbar {
background: rgb(8 3 37 / 40%)!important;
position: fixed;
top: 0;
left: 0;
z-index: 1020;
width: 100%;
}

a {
color: #fff!important;
}

.change-bg {
background-color: rgb(8 3 37 / 95%)!important;
}

@media only screen and (max-width: 992px) {
.dropdown-menu {
left: 1rem!important;
}
}

@media only screen and (max-width: 767px) {
.dropdown-menu {
left: 1rem!important;
}
.banner-section {
padding: 220px 0 140px;
}
}

.bg-img {
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}

.details-banner {
position: relative;
}

.hero-area {
padding-top: 120px;
padding-bottom: 60px;
}

.details-banner-wrapper {
position: relative;
z-index: 1;
display: flex;
justify-content: center;
}

.details-banner .hero-area .details-banner-wrapper .detals-banner-content {
text-align: center;
}

.details-banner .hero-area .details-banner-wrapper .detals-banner-content .title {
text-transform: capitalize;
font-weight: 600;
}

.page-title {
padding: 40px 0;
border-top: 1px solid #17305f;
border-bottom: 1px solid #17305f;
}

.bg-one {
background: #032055;
}

.page-title-area {
display: flex;
justify-content: center;
margin: 0 -15px -20px;
align-items: center;
}

.page-title-area .item {
margin: 0 15px 20px;
}

.page-title-area .date-item {
display: flex;
align-items: center;
}

.page-title-area .date-item .select-bar .list li:hover, .page-title-area .date-item .select-bar .list li.selected {
background: #001232;
}

.page-title-area .date-item .select-bar .list li {
padding-top: 0;
padding-bottom: 0;
}

.profile-info {
background: rgb(34 69 94 / 80%);
}

.footer {
background-color: rgb(8 3 37)!important;
}

.footer .horizontal-line {
border-bottom: 1px solid #495057!important;
}

.footer p {
font-size: 0.9rem;
}
2 changes: 1 addition & 1 deletion WebContent/final-project/header.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
style="">
<li><a class="dropdown-item" href="<c:url value='/admin/admin-profile'/>">Profile</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Sign out</a></li>
<li><a class="dropdown-item" href="<c:url value='/movietickets/signout'/>">Sign out</a></li>
</ul>
</div>
</div>
2 changes: 1 addition & 1 deletion WebContent/final-project/list-session.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<tr>
<td>${loop.count}.</td>
<td class="fw-bold"><c:out value="${lstMovieName.get(loop.index)}"/></td>
<td><c:out value="${lstCinemaName.get(loop.index}"/></td>
<td><c:out value="${lstCinemaName.get(loop.index)}"/></td>
<td><c:out value="${showtime.start}"/></td>
<td><c:out value="${showtime.end}"/></td>
<td>${showtime.date}</td>
Expand Down
2 changes: 1 addition & 1 deletion WebContent/final-project/orders.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<thead>
<tr class="table-dark">
<th>No.</th>
<th>Account</th>
<th>Name</th>
<th>Email</th>
<th>Movie</th>
<th>Cinema</th>
Expand Down
2 changes: 1 addition & 1 deletion WebContent/final-project/sidebar.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</a></li>
<li><a href="<c:url value='/admin/cinemas'/>"
class="nav-link text-white"> <i
class="fas fa-user-alt me-2 bi"></i> Cinemas
class="fas fa-video me-2 bi"></i> Cinemas
</a></li>
<li><a href="<c:url value='/admin/sessions'/>" class="nav-link text-white">
<i class="fas fa-clipboard-list me-2 bi"></i> Sessions
Expand Down
8 changes: 5 additions & 3 deletions WebContent/final-project/topbar.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
<a href="#" class="nav-link dropdown-toggle" id="navbarDropdown"
role="button" data-bs-toggle="dropdown" aria-expanded="false">${account.username}</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a href="#">Sign Out</a></li>
<li class="ps-2"><a href="<c:url value='/movietickets/profile'/>">Profile</a></li>
<li class="ps-2"><a href="<c:url value='/movietickets/signout'/>">Sign Out</a></li>
</ul>
</c:if>
<c:if test="${validAccount == false || validAccount == null}">
<a href="<c:url value='/movietickets/signin'/>"
<a href="<c:url value='/movietickets/signin'/>" class="nav-link">Sign In</a>
<%-- <a href="<c:url value='/movietickets/signin'/>"
class="nav-link dropdown-toggle" id="navbarDropdown"
role="button" data-bs-toggle="dropdown" aria-expanded="false">Sign In</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a href="<c:url value='/movietickets/signup'/>">Sign Up</a></li>
</ul>
</ul> --%>
</c:if>
</div>
</div>
Expand Down
98 changes: 98 additions & 0 deletions WebContent/final-project/user-profile.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Profile</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="shortcut icon" type="image/png/x-icon" href="<c:url value='/assets/favicon/popcorn-favicon.ico'/>">
<script src="https://kit.fontawesome.com/d99e1d4bab.js"></script>
<link href="<c:url value='/final-project/css/user-profile.css'/>" rel="stylesheet"/>
</head>
<body>
<%@ include file="/final-project/topbar.jsp" %>
<section class="details-banner hero-area bg_img seat-plan-banner" data-background="<c:url value='/assets/images/banner04.jpg'/>" style="background-image: url(<c:url value='/assets/images/banner04.jpg'/>)">
<div class="container">
<div class="details-banner-wrapper">
<div class="details-banner-content style-two">
<div class="d-flex justify-content-center">
<h1 class="title">Your Profile</h1>
</div>
<form action="" class="p-2 rounded profile-info" method="post" style="min-width: 500px;">
<div class="mb-2">
<label class="form-lable" for="name">Name</label>
<input class="form-control" name="name" value="${account.username}" required>
</div>
<div class="mb-2">
<label class="form-lable" for="email">Email</label>
<input class="form-control" name="email" value="${account.email}" disabled>
</div>
<div class="mb-2">
<label class="form-lable" for="phone">Phone</label>
<input class="form-control" name="phone" value="${account.phone}">
</div>
<div class="mb-2">
<label class="form-lable" for="address">Address</label>
<input class="form-control" name="address" value="${account.address}">
</div>
<div class="d-flex justify-content-center">
<button class="btn btn-success" type="submit">Update</button>
</div>
</form>
</div>
</div>
</div>
</section>
<section class="page-title bg-one">
<div class="container">
<div class="row">
<div class="col d-flex justify-content-center align-items-center">
<div class="select-showtime d-flex justify-content-center align-items-center">
<h2 class="text-capitalize">List of purchased movies</h2>
</div>
</div>
</div>
</div>
</section>
<div class="ticket-plan-section py-5">
<div class="container">
<div class="row d-flex justify-content-center">
<div class="col-lg-9 mb-5 mb-lg-0">
<table class="table">
<thead>
<tr style="background: #162f5f; color: #fff;">
<th>No.</th>
<th>Movie</th>
<th>Cinema</th>
<th>Start At</th>
<th>Date</th>
<th>No. Tickets</th>
<th>Total Price</th>
</tr>
</thead>
<tbody>
<c:forEach var="reservation" items="${reservations}" varStatus="loop">
<tr style="background: #001232; color: #ccc;">
<td>${loop.count}.</td>
<td><c:out value="${lstMovieName.get(loop.index)}"/></td>
<td><c:out value="${lstCinemaName.get(loop.index)}"/></td>
<td>${reservation.startAt}</td>
<td>${reservation.date}</td>
<td>${reservation.total}</td>
<td><span>$</span>${reservation.total * 10}</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</div>
<%@ include file="/final-project/footer.jsp" %>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js" ></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="<c:url value='/assets/js/topbar-scroll.js'/>"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/fp/controller/AddSessionServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Servlet implementation class AddSessionServlet
*/
@WebServlet("/AddSessionServlet")
@WebServlet(name = "AddSessionServlet", urlPatterns = {"/admin/sessions/add"})
public class AddSessionServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

Expand Down
Loading

0 comments on commit 9224e39

Please sign in to comment.