forked from abhishekdudhal/online-shopping
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fsubmit.php
177 lines (157 loc) · 5.08 KB
/
fsubmit.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
<?php
require 'config.php';
require 'dbconfig.php';
require 'connect.php';
session_start();
$id=$_SESSION['eid'];
if(isset($_REQUEST['send']))
{
$b=$_REQUEST['name'];
$f=$_REQUEST['comments'];
if( mysql_query("INSERT INTO feedback (user_name,comment)
VALUES ('$b' ,'$f')"))
{
$sql=mysql_query("select * from users where user_name='$id'");
if($sql==false)
{
die(mysql_error());
}
while($mat = mysql_fetch_array($sql))
{
$umail=$mat['user_mail'];
}
$msg="THANK YOU FOR UR FEEDBACK : ";
mail($umail,"WE WILL REPLY YOU SOON",$msg);
echo"<h2 align='center'><strong>Thank you</strong></h2>";
}
else
{
die(mysql_error());
}
}
if(isset($_REQUEST['log'])=='out')
{
session_destroy();
header("location:index.php");
}
else if($id=="")
{
header("location:login.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Feedback</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="form-basic.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style>
.modal-header, h4, .close {
background-color: #b7b795;
color:white !important;
text-align: center;
font-size: 30px;
}
.modal-footer {
background-color: #b7b795;
}
body
{
background-image: url(back.jpg);
background-size: cover;
background-repeat: no-repeat;
}
</style>
</head>
<body>
<br/>
<br/>
<br/>
<div class="container">
<div class="container-fluid bg-grey">
<h2 class="text-center"><font color="white">FeedBack Form</font></h2>
<div class="row">
<div class="col-sm-5">
<p></span><font color="black" size="4px">Contact us and we'll get back to you within 24 hours.</font></p>
<p><font color="black" size="3px"><span class="glyphicon glyphicon-map-marker"></span>Mumbai,Maharashtra,India</font></p>
<p><font color="black" size="3px"><span class="glyphicon glyphicon-phone"></span></span> +91-7768000788</font></p>
<p><font color="black" size="3px"><span class="glyphicon glyphicon-envelope"></span></span>[email protected]</font></p>
</div>
<div class="col-sm-6">
<div class="row">
<form method="post" action='fsubmit.php' name="f1" onSubmit="return vali()">
<div class="col-sm-6 form-group">
<input class="form-control" id="name" name="name" placeholder="Name" readonly="readonly" type="text" value="<?php echo $id;?>" required>
</div>
<textarea class="form-control" id="comments" name="comments" placeholder="Comment" rows="5"></textarea><br>
<div class="row">
<div class="col-sm-12 form-group">
<button class="btn btn-default pull-right" id='send' name='send' type="submit">Send</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="googleMap" style="height:350px;width:100%;"></div>
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script>
var myCenter = new google.maps.LatLng(19.0224 , 72.8556);
function initialize() {
var mapProp = {
center:myCenter,
zoom:12,
scrollwheel:false,
draggable:false,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
var marker = new google.maps.Marker({
position:myCenter,
});
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="index.php">NewBooks</a></li>
<li><a href="oldbook.php">OldBooks</a></li>
<li ><a href="rentbook.php">Rent a book</a></li>
<li class="active"><a href="feedback.php">Feedback</a></li>
<li><a href="contact.php">ContactUs</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="login.php"><span class="glyphicon glyphicon-user"></span> MyProfile</a></li>
<?php
session_start();
$id=isset($_SESSION['eid']);
if($id!="")
echo"<li><a href='?log=out'><span class='glyphicon glyphicon-log-out'></span> Logout</a></li>";
if(isset($_REQUEST['log'])=='out')
{
session_destroy();
header("location:index.php");
}
?>
</ul>
</div>
</div>
</nav>
<div id="Bottom" align='center'>
<h5 class="down" align='center'><b>DONT USE THIS PROJECT FOR COMMERCIAL PURPOSE</b></h5>
<h5 class="down" align='center'><b>Copyright © ABHISHEK DUDHAL</b></h5>
</div>
</body>
</html>