-
Notifications
You must be signed in to change notification settings - Fork 1
/
contactus.php
196 lines (153 loc) · 6.45 KB
/
contactus.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
<?php
session_start();
?>
<html>
<head>
<title> Contact | ZenHospitality' </title>
</head>
<link rel="stylesheet" type = "text/css" href ="css/contactus.css">
<link rel="stylesheet" type = "text/css" href ="css/bootstrap.min.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<body>
<button onclick="topFunction()" id="myBtn" title="Go to top">
<span class="glyphicon glyphicon-chevron-up"></span>
</button>
<script type="text/javascript">
window.onscroll = function()
{
scrollFunction()
};
function scrollFunction(){
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
document.getElementById("myBtn").style.display = "block";
} else {
document.getElementById("myBtn").style.display = "none";
}
}
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<nav class="navbar navbar-inverse navbar-fixed-top navigation-clean-search" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#myNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">ZenHospitality</a>
</div>
<div class="collapse navbar-collapse " id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="index.php">Home</a></li>
<li><a href="aboutus.php">About</a></li>
<li class="active"><a href="contactus.php">Contact Us</a></li>
</ul>
<?php
if(isset($_SESSION['login_user1'])){
?>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Welcome <?php echo $_SESSION['login_user1']; ?> </a></li>
<li><a href="myrestaurant.php">MANAGER CONTROL PANEL</a></li>
<li><a href="logout_m.php"><span class="glyphicon glyphicon-log-out"></span> Log Out </a></li>
</ul>
<?php
}
else if (isset($_SESSION['login_user2'])) {
?>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Welcome <?php echo $_SESSION['login_user2']; ?> </a></li>
<li><a href="foodlist.php"><span class="glyphicon glyphicon-cutlery"></span> Food Zone </a></li>
<li><a href="cart.php"><span class="glyphicon glyphicon-shopping-cart"></span> Cart
(<?php
if(isset($_SESSION["cart"])){
$count = count($_SESSION["cart"]);
echo "$count";
}
else
echo "0";
?>)
</a></li>
<li><a href="logout_u.php"><span class="glyphicon glyphicon-log-out"></span> Log Out </a></li>
</ul>
<?php
}
else {
?>
<ul class="nav navbar-nav navbar-right">
<li><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-user"></span> Sign Up <span class="caret"></span> </a>
<ul class="dropdown-menu">
<li> <a href="customersignup.php"> User Sign-up</a></li>
<li> <a href="managersignup.php"> Manager Sign-up</a></li>
</ul>
</li>
<li><a href="#" class="dropdown-toggle active" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="glyphicon glyphicon-log-in"></span> Login <span class="caret"></span></a>
<ul class="dropdown-menu">
<li> <a href="customerlogin.php"> User Login</a></li>
<li> <a href="managerlogin.php"> Manager Login</a></li>
</ul>
</li>
</ul>
<?php
}
?>
</div>
</div>
</nav>
<br>
<div class="heading">
<strong>Want to contact <span class="edit"> ZenHospitality </span>?</strong>
<br>
Here are a few ways to get in touch with us.
</div>
<div class="col-xs-12 line"><hr></div>
<div class="container" >
<div class="col-md-5" style="float: none; margin: 0 auto;">
<div class="form-area">
<form method="post" action="">
<br style="clear: both">
<h3 style="margin-bottom: 25px; text-align: center; font-size: 30px;"> Contact Form</h3>
<div class="form-group">
<input type="text" class="form-control" id="name" name="name" placeholder="Name" required autofocus="">
</div>
<div class="form-group">
<input type="email" class="form-control" id="email" name="email" placeholder="Email" required>
</div>
<div class="form-group">
<input type="Number" class="form-control" id="mobile" name="mobile" placeholder="Mobile Number" required>
</div>
<div class="form-group">
<input type="text" class="form-control" id="subject" name="subject" placeholder="Subject" required>
</div>
<div class="form-group">
<textarea class="form-control" type="textarea" id="message" name="message" placeholder="Message" maxlength="140" rows="7"></textarea>
<span class="help-block"><p id="characterLeft" class="help-block">Max Character length : 140 </p></span>
</div>
<input type="submit" name="submit" type="button" id="submit" name="submit" class="btn btn-primary pull-right"/>
</form>
</div>
</div>
</div>
<?php
if (isset($_POST['submit'])){
require 'connection.php';
$conn = Connect();
$Name = $conn->real_escape_string($_POST['name']);
$Email_Id = $conn->real_escape_string($_POST['email']);
$Mobile_No = $conn->real_escape_string($_POST['mobile']);
$Subject = $conn->real_escape_string($_POST['subject']);
$Message = $conn->real_escape_string($_POST['message']);
$query = "INSERT into contact(Name,Email,Mobile,Subject,Message) VALUES('$Name','$Email_Id','$Mobile_No','$Subject','$Message')";
$success = $conn->query($query);
if (!$success){
die("Couldnt enter data: ".$conn->error);
}
$conn->close();
}
?>
</body>
</html>