-
Notifications
You must be signed in to change notification settings - Fork 2
/
MovieInfo.html
277 lines (256 loc) · 14 KB
/
MovieInfo.html
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!DOCTYPE html>
<html lang="vn">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="WG Cinema - Your destination for the best movie experience in Vietnam." />
<title class="movie-title">Movie Title</title>
<link rel="icon" type="image/x-icon" href="WGLogo.ico" />
<!-- Using only one version of Bootstrap and Font Awesome for optimization -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" />
<link rel="stylesheet" href="./owlcarousel/assets/owl.carousel.min.css" />
<link rel="stylesheet" href="./owlcarousel/assets/owl.theme.default.css" />
<link rel="stylesheet" href="style.css" />
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="./owlcarousel/owl.carousel.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<!-- Jquery -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>
<!-- Sweetalert2 -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script src="js/theme.js"></script>
</head>
<body>
<header class="header">
<nav class="navbar navbar-expand-lg fixed-top">
<div class="container-fluid">
<a class="navbar-brand me-auto text-light" href="index.html">
<img src="WGLogo.png" alt="WG Cinema Logo" width="40px" />
</a>
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNavbar" aria-labelledby="offcanvasNavbarLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasNavbarLabel"><a href="index.html"><img src="WGLogo.png" alt="" width="40px"/></a></h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<ul class="navbar-nav flex-grow-1 pe-3">
<li class="nav-item">
<a class="nav-link mx-lg-2" href="ShowingMovies.html">Phim Đang Chiếu</a>
</li>
<li class="nav-item">
<a class="nav-link mx-lg-2" href="UpcomingMovies.html">Phim Sắp Chiếu</a>
</li>
<li class="nav-item">
<a class="nav-link mx-lg-2" href="aboutus.html">Về Chúng Tôi</a>
</li>
<li class="nav-item align-self-center">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" checked id="flexSwitchCheckDefault" />
<label class="form-check-label" for="flexSwitchCheckDefault">Chế Độ Tối</label>
</div>
</li>
</ul>
</div>
</div>
<a href="Login.html" class="login-button left-bt-login">Đăng Nhập</a>
<a href="Register.html" class="login-button right-bt-sign">Đăng Ký</a>
<button class="navbar-toggler" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasNavbar" aria-controls="offcanvasNavbar" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</nav>
</header>
<div class="movies" style="margin-top: 80px;">
<div class="container-fluid">
<iframe id="youtube-iframe" width="100%" height="600px" src=""></iframe>
</div>
<div id="showing-movies-container" class="row container m-auto" style="padding-top: 50px;">
<div class="col-lg-3">
<div class="card border-0" style="margin: 0;">
<img id="movie-image" class="card-img-top" style="margin: 0;" alt="Movie Poster" />
</div>
</div>
<div class="col-lg-9">
<h2 class="movie-title mt-3">Movie Title</h2>
<ul>
<li>Ngày Khởi Chiếu: <strong id="release-date"></strong> </li>
<li>Giới Hạn Độ Tuổi: <strong id="age-restriction"></strong> </li>
</ul>
<p id="description"></p>
<div id="showtimes" class="showtimes-container">
<h4 class="mt-4">Chọn suất chiếu</h4>
<div class="btn-group showtime-buttons" role="group" aria-label="Basic example">
<button type="button" class="btn btn-outline-primary" data-day="1" data-time="14:00">Thứ 2 - 14:00</button>
<button type="button" class="btn btn-outline-primary" data-day="1" data-time="20:00">Thứ 2 - 20:00</button>
<button type="button" class="btn btn-outline-primary" data-day="1" data-time="22:00">Thứ 2 - 22:00</button>
</div>
<div class="btn-group showtime-buttons" role="group" aria-label="Basic example">
<button type="button" class="btn btn-outline-primary" data-day="2" data-time="14:00">Thứ 3 - 14:00</button>
<button type="button" class="btn btn-outline-primary" data-day="2" data-time="20:00">Thứ 3 - 20:00</button>
<button type="button" class="btn btn-outline-primary" data-day="2" data-time="22:00">Thứ 3 - 22:00</button>
</div>
<div class="btn-group showtime-buttons" role="group" aria-label="Basic example">
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="14:00">Thứ 4 - 14:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="20:00">Thứ 4 - 20:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="22:00">Thứ 4 - 22:00</button>
</div>
<div class="btn-group showtime-buttons" role="group" aria-label="Basic example">
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="14:00">Thứ 5 - 16:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="20:00">Thứ 5 - 20:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="22:00">Thứ 5 - 22:00</button>
</div>
<div class="btn-group showtime-buttons" role="group" aria-label="Basic example">
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="14:00">Thứ 6 - 14:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="20:00">Thứ 6 - 20:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="22:00">Thứ 6 - 22:00</button>
</div>
<div class="btn-group showtime-buttons" role="group" aria-label="Basic example">
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="14:00">Thứ 7 - 14:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="20:00">Thứ 7 - 20:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="22:00">Thứ 7 - 22:00</button>
</div>
<div class="btn-group showtime-buttons" role="group" aria-label="Basic example">
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="14:00">Chủ nhật - 14:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="20:00">Chủ nhật - 20:00</button>
<button type="button" class="btn btn-outline-primary" data-day="3" data-time="22:00">Chủ nhật - 22:00</button>
</div>
</div>
</div>
<button class="btn btn-primary m-auto mt-2" style="width: 30%; margin-top: 30px;" onclick="openQRCodeModal()">Đặt vé ngay</button>
</div>
<div style="display: none;" id="qr-code-modal">
<h3 style="text-align: center; color: #000;">Số tiền cần thanh toán: 70.000 VNĐ</h3>
<img width="600px" src="img/QR-code.jpg" alt="QR Code"/>
<div class="d-flex justify-content-center mt-3">
<button class="btn btn-success mx-2" onclick="confirmBooking()">Xác nhận</button>
<button class="btn btn-danger mx-2" onclick="$.fancybox.close()">Hủy</button>
</div>
</div>
</div>
<footer class="text-center text-lg-start bg-primary-subtle">
<section class="">
<div class="container text-center pt-4 text-md-start mt-5">
<div class="row mt-3">
<div class="col-md-3 col-lg-5 col-xl-3 mx-auto mb-4">
<h6 class="text-uppercase mb-4" style="font-weight: bold;"><i class="fas fa-star me-2"></i>Giới thiệu</h6>
<p>
WG Cinema là rạp chiếu phim với mức giá rẻ nhất thị trường Việt Nam.<br />
Cam kết đem lại cho quý khách trải nghiệm xem phim hay nhất.
</p>
</div>
<div class="col-md-3 col-lg-3 col-xl-2 mx-auto mb-4">
<h6 class="text-uppercase mb-4" style="font-weight: bold;">
<i class="fas fa-user me-2"></i>
Mạng xã hội
</h6>
<p>
<a href="https://www.facebook.com/joshi.minh52" class="text-reset">
<i class="fab fa-facebook"></i>
Facebook
</a>
</p>
<p>
<a href="#!" class="text-reset">
<i class="fab fa-twitter"></i>
Twitter
</a>
</p>
</div>
<div class="col-md-4 col-lg-4 col-xl-3 mx-auto">
<h6 class="text-uppercase mb-4" style="font-weight: bold;"><i class="fas fa-phone me-2"></i>Liên Lạc</h6>
<p>
<i class="fas fa-envelope me-3"></i>
minhnb.23ai@vku.udn.vn
</p>
<p><i class="fas fa-phone me-3"></i> +84 907 067 721</p>
</div>
</div>
</div>
</section>
</footer>
<script>
$(document).ready(function() {
$('[data-fancybox]').fancybox({
buttons: [
"zoom",
"close"
],
});
let selectedShowtime = null;
$('.showtime-buttons .btn').click(function() {
$('.showtime-buttons .btn').removeClass('btn-primary').addClass('btn-outline-primary');
$(this).removeClass('btn-outline-primary').addClass('btn-primary');
selectedShowtime = $(this).data('day') + ' - ' + $(this).data('time');
});
});
function confirmBooking() {
Swal.fire({
icon: 'success',
title: 'Đã đặt vé thành công',
showConfirmButton: false,
timer: 2000
});
$.fancybox.close();
}
function openQRCodeModal() {
$.fancybox.open({
src: '#qr-code-modal',
type: 'inline',
});
}
</script>
<script>
document.addEventListener("DOMContentLoaded", function () {
const lineNumber = localStorage.getItem('clickedMovieLineNumber');
if (lineNumber) {
fetch('movies.txt')
.then(response => response.text())
.then(data => {
const movieLines = data.split('\n').map(line => line.trim()).filter(Boolean);
const clickedMovieLine = movieLines[parseInt(lineNumber) - 1];
if (clickedMovieLine) {
const parts = clickedMovieLine.split(' - ');
const [path, youtubeLink, age, releaseDate, description] = parts;
const [category, imageFileName] = path.split('\\');
const movieTitle = imageFileName.replace(/\.jpg$/, '');
const movieTitleElements = document.getElementsByClassName('movie-title');
for (let i = 0; i < movieTitleElements.length; i++) {
movieTitleElements[i].textContent = movieTitle;
}
document.getElementById('movie-image').src = `${category}/${imageFileName}`;
document.getElementById('youtube-iframe').src = `${youtubeLink}`;
document.getElementById('release-date').innerHTML = `${releaseDate || 'N/A'}`;
const ageRestrictionElement = document.getElementById('age-restriction');
ageRestrictionElement.innerHTML = `${age || 'N/A'}`;
switch (age) {
case 'T18':
ageRestrictionElement.style.color = 'red';
break;
case 'T13':
ageRestrictionElement.style.color = 'yellow';
break;
case 'T16':
ageRestrictionElement.style.color = 'orange';
break;
case 'K':
ageRestrictionElement.style.color = 'blue';
break;
case 'P':
ageRestrictionElement.style.color = 'green';
break;
default:
ageRestrictionElement.style.color = 'black';
}
document.getElementById('description').textContent = `${description || 'Không có mô tả.'}`;
}
})
.catch(error => console.error('Error:', error));
}
});
</script>
</body>
</html>