-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
318 lines (256 loc) · 11 KB
/
contact.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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<?php
//Tell PHP to log errors
ini_set('log_errors', 'On');
//Tell PHP to not display errors
ini_set('display_errors', 'Off');
//Set error_reporting to E_ALL
ini_set('error_reporting', E_ALL );
// Start the session
session_start();
?>
<!doctype html>
<html lang="en">
<head>
<title>Contact US</title>
<!-- Tab Icon -->
<link rel="icon" href="assests/images/logo.png" type="image/icon type">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<!-- font awesome cdn link -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css">
<!-- CSS STYLE SHEETS -->
<link rel="stylesheet" type="text/css" href="assests/css/contact.css">
<link rel="stylesheet" href="assests/css/style.css">
<link rel="stylesheet" href="assests/css/Product.css">
<style>
.slider {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
z-index: -1;
background-image: linear-gradient(to right, #621509, #712118, #812d26, #903934, #a04542, #ac4f4d, #b85958, #c46364, #d06e6e, #db7879, #e78383, #f38e8e);
margin-top: 5%;
margin-bottom: 2%;
}
section {
display: flex;
height: 80vh;
justify-content: center;
align-items: center;
margin-top: 5%;
margin-bottom: 2%;
}
.hero {
height: 60%;
width: 100%;
position: relative;
}
.hero img {
height: 100%;
width: 100%;
/* max-width:100%; */
/* height:auto; */
object-fit: cover;
}
.hero::after {
content: "";
background: black;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0.3;
}
.headline {
position: absolute;
top: 70%;
left: 10%;
font-size: 4rem;
color: white;
transform: translate(-20%, -70%);
z-index: 3;
font-family: 'Birthstone', cursive!important;
text-shadow: 0.2rem 0.2rem black;
}
</style>
</head>
<body>
<header id="topheader" style="background:black">
<?php include 'header.php'; ?>
<!-- *************************************************************************************************************************************** -->
<!-- *************************************************************************************************************************************** -->
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST'){
include '_dbConnect.php';
$name = $_POST['name'];
$email = $_POST['email'];
$subjectt = $_POST['subject'];
$message = $_POST['message'];
$sql = "INSERT INTO `contacts` (`name`, `email`, `subject`, `message`, `date`) VALUES ('$name', '$email', '$subjectt', '$message', current_timestamp())";
$result = mysqli_query($conn, $sql);
if($result){
echo '<div class="alert alert-success alert-dismissible fade show mb-0" role="alert" style="z-index:1000;">
<strong>Thankyou for contacting us!</strong> Your entry has been submitted successfully!
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
else{
echo '<div class="alert alert-danger alert-dismissible fade show mb-0" role="alert" style="z-index:1000">
<strong>Error!</strong> We are facing some technical issue and your entry is not submitted successfully! We regret the inconvinience caused!
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>';
}
$to = "[email protected]";
$subject = $subjectt;
$txt = $message."\n\n".$name;
$headers = "From: ".$email. "\r\n" .
"CC: [email protected], $email";
$mailsent = mail($to,$subject,$txt,$headers);
}
?>
<!-- *************************************************************************************************************************************** -->
<!-- *************************************************************************************************************************************** -->
<?php include 'login_signup.php'; ?>
</header>
<!-- header section ends -->
<main>
<section>
<div class="hero">
<img src="assests/images/contacthead.jpg">
<h1 class="headline"><strong>I guess there are never enough books.</strong></h1>
</div>
</section>
<div class="slider">
</div>
<div class="row">
<div class="col-lg-6 left1">
<h1 class="contact-row-heading">i see it,<br>i like it,<br>i want it,<br>i got it.<br>yeah!</h1>
</div>
<div class="col-lg-6 right1">
<div>
<p style="font-size: 1.6rem;"><strong>BOOK STORE<sup>®</sup></strong></p>
University Of Delhi,<br />
Arts Faculty Rd,<br /> University Enclave,<br />
New Delhi, Delhi 110007<br />
</p>
<a href="tel:+61396963777">+91 xxxxxxxxxx</a><br />
<a href="mailto:[email protected]">[email protected]</a>
</p>
</div>
<div class="contact">
<div class="d-flex align-items-stretch">
<form action="contact.php" method="POST" name="EmailForm">
<div class="row">
<div class="form-group col-md-6">
<input type="text" name="name" placeholder="Your Name" class="form-control"
id="name" style="background: transparent;color:black;" required>
</div>
<div class="form-group col-md-6">
<input type="email" placeholder="Your Email" class="form-control" name="email"
id="email" style="background: transparent;color:black;" required>
</div>
</div>
<div class="form-group">
<input type="text" placeholder="Subject" class="form-control" name="subject"
id="subject" style="background: transparent;color:black;" required>
</div>
<div class="form-group">
<textarea placeholder="Message" class="form-control" name="message" rows="7"
style="background: transparent;color:black;" required></textarea>
</div>
<div class="buttons d-flex flex-row align-items-center justify-content-center">
<div class="px-lg-2"><button type="submit">Send</button></div>
<div class="px-2"><button type="reset">Reset</button></div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 left2">
<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3499.7906774917033!2d77.20702441503781!3d28.695907582392763!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x390cfdec341ff0dd%3A0xb88fdcff217259a7!2sShri%20Guru%20Tegh%20Bahadur%20Khalsa%20College!5e0!3m2!1sen!2sin!4v1633094965750!5m2!1sen!2sin"
width="600" height="450" style="border:0; " allowfullscreen="" loading="lazy"></iframe>
</div>
<div class="col-lg-6 right2">
<img style="width: 100%; height: 100vh; max-width:100%;height:auto;" src="assests/images/contactdown.jpg">
</div>
</div>
<!-- footer section ********************************************************************************************************************-->
<?php include 'footer.php'; ?>
</main>
<!-- footer section -->
<?php //include 'footer.php'; ?>
<script src="assests/js/main.js"></script>
<!-- <script src="assests/js/contact.js"></script> -->
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js"></script>
<!-- Tweenmax links for animation -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/TweenMax.min.js"
integrity="sha512-DkPsH9LzNzZaZjCszwKrooKwgjArJDiEjA5tTgr3YX4E6TYv93ICS8T41yFHJnnSmGpnf0Mvb5NhScYbwvhn2w=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/TimelineMax.min.js"
integrity="sha512-0xrMWUXzEAc+VY7k48pWd5YT6ig03p4KARKxs4Bqxb9atrcn2fV41fWs+YXTKb8lD2sbPAmZMjKENiyzM/Gagw=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="text/javascript">
const hero = document.querySelector('.hero');
const slider = document.querySelector('.slider');
const headline = document.querySelector('.headline');
const mytimeline = new TimelineMax();
mytimeline.fromTo(
hero,
1,
{ height: "0%" },
{ height: "80%", ease: Power2.easeInOut }
)
.fromTo(
hero,
1.2,
{ width: "100%" },
{ width: "80%", ease: Power2.easeInOut}
)
.fromTo(
slider,
1,
{ x: "-100%" },
{ x: "0%", ease: Power2.easeInOut},
"-=1"
)
.fromTo(
headline,
1,
{ opacity: "0.4", x: "30%" },
{ opacity: "1", x: "0%", ease: Power2.easeInOut},
"-=1"
)
$(document).ready(function() {
// Load total no.of items added in the cart and display in the navbar
load_cart_item_number();
function load_cart_item_number() {
$.ajax({
url: 'action.php',
method: 'get',
data: {
cartItem: "cart_item"
},
success: function(response) {
$("#cart-item").html(response);
}
});
}
});
</script>
</body>
</html>