-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom_order.php
More file actions
199 lines (175 loc) · 6.12 KB
/
custom_order.php
File metadata and controls
199 lines (175 loc) · 6.12 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
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
<?php
// Start session to store order details
session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Capture form data and store it in session variables
$_SESSION['book_name'] = $_POST['book_name'];
$_SESSION['authors'] = $_POST['authors'];
$_SESSION['category'] = $_POST['category'];
$_SESSION['quantity'] = $_POST['quantity'];
$_SESSION['publisher_name'] = $_POST['publisher_name'];
// Redirect to the custom_checkout.php page
header("Location: custom_checkout.php");
exit();
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://kit.fontawesome.com/d01fd9c369.js" crossorigin="anonymous"></script>
<title>Order Unavailable Book</title>
<link rel="icon" type="image/png" href="image/logo.png">
<style>
/* Global Styles */
body {
background: url(wall/hero-bg.jpg) no-repeat;
background-position: center;
background-size: cover;
font-family: 'Roboto', sans-serif;
padding: 0;
margin: 0;
}
h1 {
font-family: 'Lobster', sans-serif;
color: #2C3E50;
margin-bottom: 30px;
}
/* Order Form */
.container {
max-width: 600px;
padding: 50px;
margin-top: 10px;
background: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
animation: fadeIn 1s ease-out;
}
.form-group label {
font-weight: bold;
color: #2C3E50;
}
.form-control, .form-select {
border-radius: 0.5rem;
border: 1px solid #BDC3C7;
padding: 12px;
font-size: 14px;
transition: 0.3s ease-in-out;
height: 45px; /* Ensure consistent height for input fields and dropdown */
}
.form-control:focus, .form-select:focus {
border-color: #3498db;
box-shadow: 0 0 8px rgba(52, 152, 219, 0.2);
}
.btn-primary {
background: #3498db;
border: none;
padding: 12px 25px;
border-radius: 0.5rem;
font-size: 16px;
width: 100%;
cursor: pointer;
transition: background 0.3s;
margin-bottom: 10px;
}
.btn-primary:hover {
background: #2980b9;
}
/* Home Button */
.btn-home {
background: #5df558;
border: none;
padding: 12px 25px;
border-radius: 0.5rem;
font-size: 16px;
width: 100%;
cursor: pointer;
transition: background 0.3s;
margin-bottom: 10px;
}
.btn-home:hover {
background: #05f52d;
}
/* Input Focus Animation */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Responsive Design */
@media (max-width: 768px) {
.container {
padding: 20px;
}
h1 {
font-size: 24px;
}
}
@media (max-width: 480px) {
.form-control, .form-select {
font-size: 14px;
}
.btn-primary, .btn-home {
padding: 10px;
}
}
/* Flexbox for form buttons */
.btn-group {
display: flex;
justify-content: space-between;
gap: 10px;
}
</style>
</head>
<body>
<div class="container">
<h1 class="text-center"><i class="fa-solid fa-book"></i> Order Unavailable Book</h1>
<form action="" method="post">
<div class="form-group">
<label for="book_name">Book Name</label>
<input type="text" class="form-control" id="book_name" name="book_name" required>
</div>
<div class="form-group">
<label for="authors">Authors/Author</label>
<input type="text" class="form-control" id="authors" name="authors" required>
</div>
<div class="form-group">
<label for="category">Category</label>
<select class="form-control form-select" id="category" name="category" required>
<option value="">Select Category</option>
<option value="New">New</option>
<option value="Used">Used</option>
</select>
</div>
<div class="form-group">
<label for="quantity">Quantity</label>
<input type="number" class="form-control" id="quantity" name="quantity" required>
</div>
<div class="form-group">
<label for="publisher_name">Publisher Name (if specific)</label>
<input type="text" class="form-control" id="publisher_name" name="publisher_name">
</div>
<!-- Flexbox for the buttons -->
<div class="btn-group">
<a href="index.php" class="btn btn-home">Home</a>
<button type="submit" class="btn btn-primary">Proceed to Checkout</button>
</div>
</form>
<div class="text-center mt-3">
<p><strong>Note:</strong> ₹10 will be charged per order. Further book price details will be shared with you soon via email.</p>
</div>
</div>
<!-- Optional JavaScript -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>