-
Notifications
You must be signed in to change notification settings - Fork 0
/
confirm.php
277 lines (213 loc) · 7.22 KB
/
confirm.php
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
<html>
<head>
<style>
header {
background-color: #020202;
padding: 20px;
}
.header-container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo-container img {
height: 100px;
width: 130px;
}
.hotel-name {
text-align: center;
font-size: 36px;
font-weight: bold;
margin: 0;
text-transform: uppercase;
color: gold;
letter-spacing: 2px;
}
nav li {
display: inline-block;
margin: 0 10px;
}
nav li a {
color: white;
font-size: larger;
}
nav li a.active {
background-color: white;
}
nav li a:hover {
background-color: white;
}
.book-now {
background-image: linear-gradient(to bottom right, gold, gold);
color: #020202;
font-size: x-large;
padding: 30px;
margin-left: 20px;
border-radius: 5px;
}
footer {
background-color: #000;
color: #fff;
}
.footer-content {
display: flex;
justify-content: space-between;
padding: 50px;
background-color: #000;
color: #fff;
}
.contact-info, .address, .social-media {
width: 42%;
}
.contact-info h3, .address h3, .social-media h3 {
font-size: 26px;
margin-bottom: 15px;
}
.contact-info p, .address p {
font-size: 20px;
margin: 0;
line-height: 1.5;
}
.social-media ul {
list-style: none;
display: flex;
justify-content: space-between;
}
.social-media a {
color: #fff;
font-size: 18px;
text-decoration: none;
transition: color 0.2s ease-in-out;
}
.social-media a:hover {
color: #ccc;
}
</style>
</head>
<header>
<div class="header-container">
<div class="logo-container">
<img src="https://thumbs.dreamstime.com/b/initial-circle-ak-letter-modern-typography-vector-template-creative-abstract-logo-design-173826139.jpg" alt="AK">
</div>
<h1 class="hotel-name">    AK HOTEL</h1>
<nav>
<ul>
<li><a href="hotel2.html"> HOME</a></li>
<li><a href="review.html">REVIEW</a></li>
<li><a href="book.html" class="book-now">BOOK NOW</a></li>
</ul>
</nav>
</div>
</header>
<body>
<!DOCTYPE html>
<html>
<head>
<title>Hotel Booking Confirmation</title>
<body>
<h2> CONGRATULATIONS ! </h2>
<strong> YOUR BOOKING IS CONFIRMED <br> <br> <br>
<?php
/*if ($_SERVER["REQUEST_METHOD"] == "POST")
// Get the form data
$name = $_POST["name"];
$Password = $_POST["Password"];
$checkdate = $_POST["check-in-date"];
$numberofdays = $_POST["numberofdays"];
$numberofACrooms = $_POST["number-ofAC-rooms"];
$Total = $Total
/*$data = "Name: $name\nPassword: $Password\ncheck in date: $checkdate\nnumber of days of stay: $numberofdays\n Number of AC Rooms:$$numberofACroom\n Total amount : $Total";
// Open the file for appending
$file = "data.txt";
$handle = fopen($file, "a");
// Write the form data to the file
fwrite($handle, $data);
// Close the file
fclose($handle); */
/*Check if the form was submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Get the form data
$name = $_POST["name"];
$password = $_POST["password"];
$check_in_date = $_POST["check_in_date"];
$num_rooms = $_POST["number-of-rooms"];
// Create a string with the form data
$form_data = "Name: $name\nPassword: $password\nCheck-in Date: $check_in_date\nNumber of Rooms: $num_rooms\nTotal Amount: $total_amount\n";
// Create a unique filename for this person based on their name
$filename = "booking_data_" . strtolower(str_replace(" ", "_", $name)) . ".txt";
// Open the file for appending
$handle = fopen($filename, "a");
// Write the form data to the file
fwrite($handle, $form_data);
// Close the file
fclose($handle);
// Redirect the user back to the booking page
header("Location: booking.php?status=success");
exit();
}*/
?>
<?php /*
<h1>Booking Confirmation</h1>
<p>Thank you for booking with us, </p>
<h2>Check-In Details</h2>
<p><strong>Check-In Date:</strong> <?php echo $name ?> </p>
<p><strong>Number of days of stay :</strong> <?php echo $numberofdays ?></p>
<p><strong>Number of Rooms:</strong> <?php echo $num_rooms ?></p>
<p><strong> AC Rooms :</strong> <?php echo $numberofACrooms ?></p>
<p><strong>Total Amount:</strong> <?php echo $Total ?></p>
<p> <strong> Password:</strong> <?php echo $_POST['Password'] ?></p>*/
// Check if the form was submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Get the form data
$name = $_POST["name"];
$password = $_POST["password"];
$check_in = $_POST["check-in-date"];
$num_days = $_POST["numberofdays"];
$num_rooms = $_POST["number-of-rooms"];
$numACrooms = $_POST["number-ofAC-rooms"] ;
// Format the data as a string
$total_amount = $num_days * $numACrooms * 5000 + $num_days*($num_rooms-$numACrooms)*3000;
$data = "<tr><td>Name:</td><td>$name</td></tr>\n";
$data .= "<tr><td>Password:</td><td>$password</td></tr>\n";
$data .= "<tr><td>Check-in date:</td><td>$check_in</td></tr>\n";
$data .= "<tr><td>Number of days:</td><td>$num_days</td></tr>\n";
$data .= "<tr><td>Number of rooms:</td><td>$num_rooms</td></tr>\n";
$data .= "<tr><td>Total amount:</td><td>$total_amount</td></tr>\n";
// Open the file for appending and write the data to it
$filename = "booking_data_" . strtolower(str_replace(" ", "_", $name)) . ".txt";
$handle = fopen($filename, "a");
fwrite($handle, $data);
fclose($handle);
// Display the saved data in an HTML table to the user
echo "<table border=\"1\">\n" . $data . "</table>";
exit();
}
?>
</body>
</html>
</body>
<footer>
<div class="footer-content">
<div class="contact-info">
<h3>Contact Us</h3>
<p>Phone: 8250298373</p>
<p>Email: AK47@ gmail.com</p>
</div>
<div class="address">
<h3>Address</h3>
<p>Sector 17 Royal Place </p>
<p>Mumbai </p>
</div>
<div class="social-media">
<h3>       Follow Us</h3>
<ul>
<li><a href="https://www.bing.com/ck/a?!&&p=30f263c8e7c1e007JmltdHM9MTY4MjU1MzYwMCZpZ3VpZD0zMDE0ZjBkYy1iZjBhLTY0ZWEtMjgzOC1lMmM0YmUwYzY1NzcmaW5zaWQ9NTIxNg&ptn=3&hsh=3&fclid=3014f0dc-bf0a-64ea-2838-e2c4be0c6577&psq=marriott+facebook+page&u=a1aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL01hcnJpb3R0Lw&ntb=1">Facebook</a></li>
<li><a href="https://www.bing.com/ck/a?!&&p=4bacfa0f0ecae801JmltdHM9MTY4MjU1MzYwMCZpZ3VpZD0zMDE0ZjBkYy1iZjBhLTY0ZWEtMjgzOC1lMmM0YmUwYzY1NzcmaW5zaWQ9NTE5NA&ptn=3&hsh=3&fclid=3014f0dc-bf0a-64ea-2838-e2c4be0c6577&psq=marriott+twitter+page&u=a1aHR0cHM6Ly90d2l0dGVyLmNvbS9NYXJyaW90dA&ntb=1">Twitter</a></li>
<li><a href="https://www.bing.com/ck/a?!&&p=1033581bdb1e0cceJmltdHM9MTY4MjU1MzYwMCZpZ3VpZD0zMDE0ZjBkYy1iZjBhLTY0ZWEtMjgzOC1lMmM0YmUwYzY1NzcmaW5zaWQ9NTE5OA&ptn=3&hsh=3&fclid=3014f0dc-bf0a-64ea-2838-e2c4be0c6577&psq=marriott+instagram+page&u=a1aHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9tYXJyaW90dGhvdGVscy8&ntb=1">Instagram</a></li>
</ul>
</div>
</div>
</footer>
</body>
</html>
</html>