-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.php
More file actions
141 lines (115 loc) · 3.59 KB
/
Copy pathdemo.php
File metadata and controls
141 lines (115 loc) · 3.59 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Book a Guard</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
}
header {
background-color: #2c3e50;
color: white;
padding: 20px 0;
text-align: center;
}
main {
max-width: 650px;
margin: 40px auto;
background-color: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
form label {
font-weight: bold;
display: block;
margin-top: 12px;
}
form input[type="text"],
form input[type="date"],
form input[type="number"] {
width: 100%;
padding: 10px;
margin-top: 5px;
border-radius: 5px;
border: 1px solid #ccc;
}
input[type="submit"] {
background-color: #27ae60;
color: white;
padding: 12px 20px;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
margin-top: 20px;
}
input[type="submit"]:hover {
background-color: #219150;
}
.price {
color: #555;
font-size: 14px;
}
.total-box {
margin-top: 20px;
padding: 15px;
border-radius: 5px;
background: #ecf9ec;
font-size: 18px;
font-weight: bold;
color: #2c3e50;
}
</style>
</head>
<body>
<header>
<h1>Book Your Event Security</h1>
</header>
<main>
<form action="payment.html" method="post" oninput="calculateTotal()">
<label>Full Name:</label>
<input type="text" name="name" required>
<label>Contact Number:</label>
<input type="text" name="contact" required>
<label>Event Date:</label>
<input type="date" name="event_date" required>
<label>Event Location:</label>
<input type="text" name="location" required>
<h3>Select Guard Types & Quantity</h3>
<label>Bouncers <span class="price">(₹1000 each)</span></label>
<input type="number" name="bouncer_qty" id="bouncer" min="0" value="0">
<label>Watchmen <span class="price">(₹700 each)</span></label>
<input type="number" name="watchman_qty" id="watchman" min="0" value="0">
<label>VIP Escorts <span class="price">(₹1200 each)</span></label>
<input type="number" name="vip_qty" id="vip" min="0" value="0">
<label>ID Checkers <span class="price">(₹800 each)</span></label>
<input type="number" name="id_checker_qty" id="id_checker" min="0" value="0">
<h4 style="color: green;">
Note: 1 Event Security Manager will be assigned automatically (No extra cost).
</h4>
<!-- Total cost will update dynamically -->
<div class="total-box">
Total Cost: ₹<span id="total">0</span>
</div>
<input type="hidden" name="total_amount" id="total_amount">
<input type="submit" value="Proceed to Payment">
</form>
</main>
<script>
function calculateTotal() {
const bouncer = document.getElementById("bouncer").value * 1000;
const watchman = document.getElementById("watchman").value * 700;
const vip = document.getElementById("vip").value * 1200;
const id_checker = document.getElementById("id_checker").value * 800;
const total = bouncer + watchman + vip + id_checker;
document.getElementById("total").innerText = total;
document.getElementById("total_amount").value = total;
}
</script>
</body>
</html>