This repository was archived by the owner on Apr 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.php
More file actions
executable file
·130 lines (123 loc) · 5.48 KB
/
Copy pathcontact.php
File metadata and controls
executable file
·130 lines (123 loc) · 5.48 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
<?php
include('boilerplate.php');
include "dbConfig.php";
$sendEmail = new sendEmail;
$queries = new queries;
if (isset($_POST['submit'])) {
$fullName = $_POST['fullName'];
$email = $_POST['email'];
$msg = $_POST['msg'];
$phone = $_POST['phone'];
$url = "https://" . $_SERVER['SERVER_NAME'] . "/aanav/shop.php";
$url2 = "https://" . $_SERVER['SERVER_NAME'] . "/aanav/contact.php";
$subject = 'Thank you';
$body = '<p style="color:#66FCF1; font-size: 32px;" >Hi ' . $fullName . '</p><p style="color:grey; font-size: 16px;" > Thank you for contacting us.We will reply you as soon as possible</p>
<p><a style="background-color: #66FCF1;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
-webkit-transition-duration: 0.4s;
transition-duration: 0.4s;"
href="' . $url . '">Latest Co-ordinator</a></p><p style="color:red; font-size: 10px;" href="' . $url2 . '"> Need Help ? <a>Contact Us</a></p>';
if ($queries->query("INSERT INTO msg (name, email, phone, msg, type, created_date) VALUES
('$fullName', '$email', '$phone', '$msg', 'contact', now()) ")) {
if ($sendEmail->send($fullName, $email, $subject, $body)) {
$_SESSION['msgSent'] = "Thank you for contacting us.";
}
}
}
?>
<div class="map carousel-info">
<div class="container">
<div class="map-inner">
<div style="width: 100%">
<iframe width="100%" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?width=100%25&height=600&hl=en&q=Main%20Office,%20BulandShahr+(aanav)&t=&z=17&ie=UTF8&iwloc=B&output=embed">
</iframe>
</div>
<div class="icon">
<i class="fa fa-map-marker"></i>
</div>
</div>
</div>
</div>
<?php if (isset($_SESSION['msgSent'])) : ?>
<div class="col-md-6 mx-auto mt-3 text-center">
<div class="alert alert-success">
<?php echo $_SESSION['msgSent']; ?>
</div>
</div>
<?php endif; ?>
<?php unset($_SESSION['msgSent']); ?>
<section class="contact-section carousel-info">
<div class="container">
<div class="row">
<div class="col-lg-5">
<div class="contact-title">
<h4>Contacts Us</h4>
<p>We are always near you 😉</p>
</div>
<div class="contact-widget">
<div class="cw-item">
<div class="ci-icon">
<i class="ti-location-pin"></i>
</div>
<div class="ci-text">
<span>Address:</span>
<p>Aanav LLC GT Road</p>
</div>
</div>
<div class="cw-item">
<div class="ci-icon">
<i class="ti-mobile"></i>
</div>
<div class="ci-text">
<span>Mobile:</span>
<p>+91 9917955610</p>
</div>
</div>
<div class="cw-item">
<div class="ci-icon">
<i class="ti-email"></i>
</div>
<div class="ci-text">
<span>Email:</span>
<p>ahampriyanshu@gmail.com</p>
</div>
</div>
</div>
</div>
<div class="col-lg-6 offset-lg-1">
<div class="contact-form">
<div class="leave-comment">
<h4>Leave A Comment</h4>
<form method="post" class="comment-form">
<div class="row">
<div class="col-lg-12">
<input name="fullName" type="text" placeholder="Your name" required />
</div>
<div class="col-lg-6">
<input name="phone" type="number" placeholder="Your mobile" required />
</div>
<div class="col-lg-6">
<input name="email" type="email" placeholder="Your email" required />
</div>
<div class="col-lg-12">
<textarea name="msg" placeholder="Your message" required ></textarea>
<button type="submit" name="submit" class="site-btn">Send message</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<?php include('footer.php'); ?></body>
</html>