-
Notifications
You must be signed in to change notification settings - Fork 1
/
contact.php
213 lines (204 loc) · 6.01 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
<?php
include_once("includes/db_connect.php");
session_start();
if(isset($_GET['city']))
{
//echo $_GET['city'];
$_SESSION['city']=$_GET['city'];
//echo $_SESSION['city'];
}
else if(isset($_SESSION['city']))
{
header("Location:contact.php?city=$_SESSION[city]");
unset($_SESSION['city']);
$_SESSION['city']=="";
//exit();
//echo "<script>window.location.href = 'women.php?city=$_SESSION[city]';</script>";
}
if(isset($_POST['sub']) && $_POST['sub']=="Submit Us")
{
$uname=mysql_real_escape_string(trim($_POST['uname']));
if($_POST['umail']=="")
{
$umail="Not Provided";
}
else
{
$umail=mysql_real_escape_string(trim($_POST['umail']));
}
$umobile=mysql_real_escape_string(trim($_POST['umobile']));
$umessage=mysql_real_escape_string(trim($_POST['umsg']));
//echo "$uname<br/>$umail<br/>$umobile<br/>$umessage";
$admin_mail='[email protected]';
$subject='A Person Contacted Through Online';
$message='
<html>
<body>
<font size=4>Dear Admin,</font><br/><br/>
Person Details are,<br/>
<table bgcolor=#fff8dc border=1 cellpadding=3 cellspacing=3>
<tr>
<td>
Name
</td>
<td>:</td>
<td>'.$uname.'</td>
</tr>
<tr>
<td>
Email Id
</td>
<td>:</td>
<td>'.$umail.'</td>
</tr>
<tr>
<td>
Phone Number
</td>
<td>:</td>
<td>'.$umobile.'</td>
</tr>
<tr>
<td>
Message
</td>
<td>:</td>
<td>'.$umessage.'</td>
</tr>
</table>
<br/>
<br/><br/>
<strong><font size=3>Thanks and Regards</font>,</strong><br/>
<font style=font-size:20px;color:#008080;font-weight:bold>Discount Ka Mall</font>
</body>
</html>
';
if($umail!="Not Provided")
{
$user_subject='Your Details Submitted Successfully';
$user_message='
<html>
<body>
<font size=4>Dear '.$uname.',</font><br/><br/>
Thanks for submitting your details at <a href=http://www.discountkamall.com target=_blank>www.discountkamall.com</a> as soon as possible we will get back to you.<br/><br/>
Discount Ka Mall Team is happy to help you. <br/><br/>
For any enquires mail us at [email protected] or call us on 0866-6888855.
<br/><br/>
<strong><font size=3>Thanks and Regards</font>,</strong><br/>
<font style=font-size:20px;color:#008080;font-weight:bold>Discount Ka Mall Team.</font>
</body>
</html>
';
$mailto_user=mail($umail, $user_subject, $user_message, $headers);
}
$mailto_admin=mail($admin_mail, $subject, $message, $headers);
if($mailto_admin)
{
echo '<script> alert("Your details submitted successfully ") </script>';
echo '<script language="JavaScript"> window.location.href ="contact.php" </script>';
}
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Discount Ka Mall - Contact Us</title>
<link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
<!-- jQuery (necessary JavaScript plugins) -->
<script type='text/javascript' src="js/jquery-1.11.1.min.js"></script>
<!-- Custom Theme files -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- Custom Theme files -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!--webfont-->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<!-- start menu -->
<link href="css/megamenu.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="js/megamenu.js"></script>
<script>$(document).ready(function(){$(".megamenu").megamenu();});</script>
<script src="js/menu_jquery.js"></script>
<script type="text/javascript">
$(function(){
$("#city").change(function(){
window.location='http://www.discountkamall.com/contact.php?city=' + this.value
});
});
</script>
<script type="text/javascript">
function valid_details()
{
var con=/^[789]\d{9}$/;
if(document.getElementById('uname').value=="")
{
alert("Please Enter Your Name");
document.getElementById('uname').focus();
return false;
}
if(document.getElementById('umobile').value=="")
{
alert("Please Enter Your Mobile Number");
document.getElementById('umobile').focus();
return false;
}
else if(!document.getElementById('umobile').value.match(con))
{
alert("Please Enter Valid Mobile Number");
document.getElementById('umobile').focus();
return false;
}
if(document.getElementById('umsg').value=="")
{
alert("Please Enter Your Message");
document.getElementById('umsg').focus();
return false;
}
}
</script>
</head>
<body>
<!-- header_top -->
<?php include_once('header.php'); ?>
<!-- content -->
<div class="container">
<div class="main">
<div class="contact">
<div class="contact_info">
<h2>Contact Us</h2>
<div class="map">
<iframe src="https://www.google.com/maps/d/u/1/embed?mid=z9fXBH4pjzTk.kkZzJ5tj_WwE" width="100%" height="400"></iframe>
</div>
</div>
<div class="contact-form">
<h2>Contact Us</h2>
<form method="post" action="" onsubmit="return valid_details();">
<div>
<span><label>Name</label></span>
<span><input type="text" class="textbox" name="uname" id="uname" placeholder="Enter Your Name"></span>
</div>
<div>
<span><label>E-mail(Optional)</label></span>
<span><input type="text" class="textbox" name="umail" id="umail" placeholder="Enter Your E-mail"></span>
</div>
<div>
<span><label>Mobile</label></span>
<span><input type="text" class="textbox"name="umobile" id="umobile" placeholder="Enter Your Mobile"></span>
</div>
<div>
<span><label>Message</label></span>
<span><textarea name="umsg" id="umsg" placeholder="Enter Your Message"></textarea></span>
</div>
<div>
<span><input type="submit" name="sub" value="Submit Us"></span>
</div>
</form>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- footer_top -->
<?php include_once('footer.php'); ?>
</body>
</html>