-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
238 lines (215 loc) · 8.39 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
<?php
include("navbar.php");
include("connection.php");
?>
<html>
<head>
</head>
<body>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body" align="center">
Some text in the modal.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<!-- Start main-content -->
<div class="main-content">
<!-- Section: inner-header -->
<section class="inner-header divider layer-overlay overlay-theme-colored-7" data-bg-img="images/bg/bg1.jpg">
<div class="container pt-120 pb-60">
<!-- Section Content -->
<div class="section-content">
<div class="row">
<div class="col-md-6">
<h2 class="text-theme-colored2 font-36">About</h2>
<ol class="breadcrumb text-left mt-10 white">
<li><a href="#">Home</a></li>
<li><a href="#">Pages</a></li>
<li class="active">Current Page</li>
</ol>
</div>
</div>
</div>
</div>
</section>
<!-- Divider: Contact -->
<section class="divider">
<div class="container pt-50 pb-70">
<div class="row pt-10">
<div class="col-md-5">
<div ><iframe width="100%" height="400" src="https://maps.google.com/maps?width=100%&height=600&hl=en&q=Behind%20hotel%20pavilion%2Cpune+(My%20Business%20Name)&ie=UTF8&t=&z=14&iwloc=B&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"><a href="https://www.maps.ie/create-google-map/">Add map to website</a></iframe></div><br />
</div>
<div class="col-md-7">
<h4 class="mt-0 mb-30 line-bottom-theme-colored-2">Interested in discussing?</h4>
<!-- Contact Form -->
<form id="contact_form" name="contact_form" class="" action="contact.php" method="post">
<?php
$result = mysqli_query($conn,"SELECT MAX(cid)+1 FROM contactus");
$row = mysqli_fetch_row($result);
$highest_id = $row[0];
?>
<div class="row">
<div class="col-sm-6">
<input type="hidden" value="<?php echo $highest_id ; ?>" class="wp-form-control wpcf7-text" id="txtcid" name="txtcid" >
<div class="form-group mb-30">
<input id="txtuname" name="txtuname" class="form-control" type="text" placeholder="Enter Name" required="">
</div>
</div>
<div class="col-sm-6">
<div class="form-group mb-30">
<input id="txtemail" name="txtemail" class="form-control required email" type="email" placeholder="Enter Email">
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-sm-6">
<div class="form-group mb-30">
<input id="form_subject" name="form_subject" class="form-control required" type="text" placeholder="Enter Subject">
</div>
</div>
<div class="col-sm-6">
<div class="form-group mb-30">
<input id="form_phone" name="form_phone" class="form-control" type="text" placeholder="Enter Phone">
</div>
</div>
</div> -->
<div class="form-group mb-30">
<textarea id="txtmsg" name="txtmsg" class="form-control required" rows="7" placeholder="Enter Message"></textarea>
</div>
<div class="form-group">
<input id="form_botcheck" name="form_botcheck" class="form-control" type="hidden" value="" />
<button type="submit" class="btn btn-flat btn-default bg-hover-theme-colored mr-5" id="btncontact" name="btncontact">Send your message</button>
<button type="reset" class="btn btn-flat btn-theme-colored2 bg-hover-theme-colored">Reset</button>
</div>
</form>
</div>
</div>
<?php
$query = mysqli_query($conn,"select * from address");
while($row = mysqli_fetch_array($query))
{
$adrs = $row['adrs'];
$cont = $row['cont'];
$email = $row['email'];
?>
<div class="row mt-60">
<div class="col-sm-12 col-md-4">
<div class="contact-info text-center bg-silver-light border-1px pt-60 pb-60">
<i class="fa fa-phone font-36 mb-10 text-theme-colored2"></i>
<h4>Call Us</h4>
<h6 class="text-gray">Phone: <?php echo $cont;?></h6>
</div>
</div>
<div class="col-sm-12 col-md-4">
<div class="contact-info text-center bg-silver-light border-1px pt-60 pb-60" >
<i class="fa fa-map-marker font-36 mb-10 text-theme-colored2"></i>
<h4>Address</h4>
<h6 class="text-gray"><?php echo $adrs;?></h6>
</div>
</div>
<div class="col-sm-12 col-md-4">
<div class="contact-info text-center bg-silver-light border-1px pt-60 pb-60">
<i class="fa fa-envelope font-36 mb-10 text-theme-colored2"></i>
<h4>Email</h4>
<h6 class="text-gray"><?php echo $email;?></h6>
</div>
</div>
<?php }?>
</div>
</div>
</section>
</div>
<!-- end main-content -->
<!-- Footer -->
<?php include("footer.php") ?>
<a class="scrollToTop" href="#"><i class="fa fa-angle-up"></i></a>
</div>
<!-- end wrapper -->
<!-- Footer Scripts -->
<!-- JS | Custom script for all pages -->
<script src="js/custom.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#btncontact').click(function(event) {
event.preventDefault();
var cid=$('#txtcid').val();
var name = $('#txtuname').val();
var email = $('#txtemail').val();
var mesg= $('#txtmsg').val();
if(name=='')
{
$('.modal-body').html("Please Enter Your User Name ");
$("#myModal").modal();
}
else if(email=='')
{
$('.modal-body').html("Please Enter Your Email Id ");
$("#myModal").modal();
}
else if (mesg=='')
{
$('.modal-body').html("Please Enter Your Message ");
$("#myModal").modal();
}
else
{
$.ajax({
type: 'POST',
url: 'contact/contact2.php',
data: ({cid:cid, name:name, email: email , mesg: mesg }),
success: function(response3)
{
// alert(response3);
if(response3 == "1")
{
$('.modal-body').html("Message send Successfully");
$("#myModal").modal();
$('#txtcid').val('');
$('#txtuname').val('');
$('#txtemail').val('');
$('#txtmsg').val('');
}
else
{
$('.modal-body').html("Message Not send");
$("#myModal").modal();
}
}
});
}
});
});
</script>
<script type="text/javascript" src="js/login.js"></script>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body" align="center">
<!-- Please login first to access dashboard. -->
If you are a student then <a href="">Click here</a><br>
If you are a parent then <a href="">Click here</a><br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</body>
</html>