Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 19b861c6 authored by 65160394's avatar 65160394
Browse files

Project Round 8

parent e223d6a9
No related branches found
No related tags found
No related merge requests found
/* styles.css */
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}
.container {
width: 80%;
margin: 0 auto;
padding-top: 30px;
}
h1 {
text-align: center;
}
.tour-list {
background-color: #fff;
padding: 20px;
margin-bottom: 20px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.tour-list ul {
list-style: none;
padding: 0;
}
.tour-list li {
margin: 10px 0;
padding: 10px;
background-color: #f9f9f9;
border-radius: 5px;
border: 1px solid #ddd;
}
.booking-form {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.booking-form form {
display: flex;
flex-direction: column;
}
.booking-form label {
margin-bottom: 5px;
}
.booking-form input {
padding: 8px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 5px;
}
.booking-form button {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px;
cursor: pointer;
border-radius: 5px;
}
.booking-form button:hover {
background-color: #45a049;
}
...@@ -34,7 +34,7 @@ router.post('/edit-profile', tourController.updateProfile);// อัปเดต ...@@ -34,7 +34,7 @@ router.post('/edit-profile', tourController.updateProfile);// อัปเดต
//จองทัวร์ //จองทัวร์
router.get('/my-bookings', tourController.getUserBookings); router.get('/my-bookings', tourController.getUserBookings);
router.post('/create', tourController.createBooking); router.post('/createbooking', tourController.createBooking);
router.post('/cancel/:id', tourController.cancelBooking); router.post('/cancel/:id', tourController.cancelBooking);
module.exports = router; module.exports = router;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Book a Tour</title>
<link rel="stylesheet" href="/css/booking.css">
</head>
<body>
<div class="container">
<h1>Tour Booking</h1>
<!-- แสดงรายการทัวร์ -->
<div class="tour-list">
<h2>Available Tours</h2>
<ul>
<% tours.forEach(function(tour) { %>
<li>
<strong><%= tour.name %></strong><br>
<%= tour.description %><br>
Price: <%= tour.price %> USD<br>
Duration: <%= tour.duration %> days<br>
<a href="/book/<%= tour.id %>">Book this Tour</a>
</li>
<% }); %>
</ul>
</div>
<!-- ช่องกรอกข้อมูลจอง -->
<div class="booking-form">
<h2>Book a Tour</h2>
<form action="/api/create-booking" method="POST">
<label for="tour-id">Tour ID</label>
<input type="number" id="tour-id" name="tour-id" required>
<button type="submit">Book Now</button>
</form>
</div>
</div>
</body>
</html>
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment