-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.php
More file actions
134 lines (119 loc) · 4.37 KB
/
contact.php
File metadata and controls
134 lines (119 loc) · 4.37 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>GrandStay - Contact</title>
<link rel="icon" href="images/logo/hotel-logo.avif">
<?php require('inc/links.php'); ?>
<style>
.pop:hover{
border-top-color: var(--teal) !important;
transform: scale(1.03);
transition: all 0.3s;
}
</style>
</head>
<body class="bg-light">
<?php require('inc/header.php'); ?>
<div class="my-5 px-4">
<h2 class="fw-bold h-font text-center">CONTACT US</h2>
<div class="h-line bg-dark "></div>
<p class="text-center mt-3">
Reach us anytime! We're here to assist with bookings,<br>
inquiries, or feedback. Connect via phone,<br>
email, or visit us directly."
</p>
</div>
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 mb-5 px-4">
<div class="bg-white rounded shadow p-4">
<iframe class="w-100 rounded mb-4" height="320px" src="<?php echo $contact_r['iframe']?>" loading="lazy"></iframe>
<h5>Address</h5>
<a href="<?php echo $contact_r['gmap']?>" target="_blank" class="d-inline-block text-decoration-none text-dark mb-2">
<i class="bi bi-geo-alt-fill"></i> <?php echo $contact_r['address']?>
</a>
<h5 class="mt-4">Call Us</h5>
<a href="tel:+<?php echo $contact_r['pn1']?>" class="d-inline-block mb-2 text-decoration-none text-dark">
<i class="bi bi-telephone-fill"></i> +<?php echo $contact_r['pn1']?>
</a>
<br>
<?php
if($contact_r['pn2']!=''){
echo<<<data
<a href="tel: +$contact_r[pn2]" class="d-inline-block text-decoration-none text-dark">
<i class="bi bi-telephone-fill"></i> +$contact_r[pn2]
</a>
data;
}
?>
<h5 class="mt-4">Email</h5>
<a href="mailto: <?php echo $contact_r['email']?>" class="d-inline-block text-decoration-none text-dark">
<i class="bi bi-envelope-at-fill"></i> <?php echo $contact_r['email']?>
</a>
<h5 class="mt-4">Follow Us</h5>
<?php
if($contact_r['tw']!=''){
echo<<<data
<a href="$contact_r[tw]" class="d-inline-block text-dark fs-5 me-2">
<span class="badge bg-light text-dark fs-6">
<i class="bi bi-twitter"></i></span>
</a>
data;
}
?>
<a href="<?php echo $contact_r['insta']?>" class="d-inline-block text-dark fs-5 me-2">
<span class="badge bg-light text-dark fs-6">
<i class="bi bi-instagram"></i></span>
</a>
<a href="<?php echo $contact_r['fb']?>" class="d-inline-block text-dark fs-5">
<span class="badge bg-light text-dark fs-6">
<i class="bi bi-facebook"></i></span>
</a>
</div>
</div>
<div class="col-lg-6 col-md-6 px-4">
<div class="bg-white rounded shadow p-4">
<form method="POST">
<h5>Send a message</h5>
<div class="mt-3 ">
<label class="form-label" style="font-weight: 500;">Name</label>
<input name="name" required type="text" class="form-control shadow-none">
</div>
<div class="mt-3 ">
<label class="form-label" style="font-weight: 500;">Email</label>
<input name="email" required type="email" class="form-control shadow-none">
</div>
<div class="mt-3 ">
<label class="form-label" style="font-weight: 500;">Subject</label>
<input name="subject" required type="text" class="form-control shadow-none">
</div>
<div class="mt-3 ">
<label class="form-label" style="font-weight: 500;">Message</label>
<textarea name="message" required class="form-control shadow-none" rows="5" style="resize: none;"></textarea>
</div>
<button type="submit" name="send" class="btn text-white custom-bg mt-3">SEND</button>
</form>
</div>
</div>
</div>
</div>
<?php
if(isset($_POST['send']))
{
$frm_data = filteration($_POST);
$q = "INSERT INTO `user_queries`(`name`, `email`, `subject`, `message`) VALUES (?,?,?,?)";
$values = [$frm_data['name'],$frm_data['email'],$frm_data['subject'],$frm_data['message']];
$res = insert($q,$values,'ssss');
if($res==1){
alert('success','Mail sent!');
}
else{
alert('error','Server Down! Try again later');
}
}
?>
<?php require('inc/footer.php');?>
</body>
</html>