-
Notifications
You must be signed in to change notification settings - Fork 1
/
login.php
238 lines (215 loc) · 7.8 KB
/
login.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
session_start();
if(isset($_SESSION['customer']))
{
header("location:cust-index.php");
}
include("connection.php");
error_reporting(0);
?>
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<!-- for-mobile-apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta property="og:title" content="Vide" />
<meta name="keywords" content="Login Page" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //for-mobile-apps -->
<link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
<!-- Custom Theme files -->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!-- js -->
<script src="js/jquery-1.11.1.min.js"></script>
<!-- //js -->
<!-- start-smoth-scrolling -->
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
});
});
</script>
<!-- start-smoth-scrolling -->
<link href="css/font-awesome.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Noto+Sans:400,700' rel='stylesheet' type='text/css'>
<!--- start-rate---->
<script src="js/jstarbox.js"></script>
<link rel="stylesheet" href="css/jstarbox.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript">
jQuery(function() {
jQuery('.starbox').each(function() {
var starbox = jQuery(this);
starbox.starbox({
average: starbox.attr('data-start-value'),
changeable: starbox.hasClass('unchangeable') ? false : starbox.hasClass('clickonce') ? 'once' : true,
ghosting: starbox.hasClass('ghosting'),
autoUpdateAverage: starbox.hasClass('autoupdate'),
buttons: starbox.hasClass('smooth') ? false : starbox.attr('data-button-count') || 5,
stars: starbox.attr('data-star-count') || 5
}).bind('starbox-value-changed', function(event, value) {
if(starbox.hasClass('random')) {
var val = Math.random();
starbox.next().text(' '+val);
return val;
}
})
});
});
</script>
<!---//End-rate---->
</head>
<body>
<div class="header">
<div class="container">
<div class="logo">
<h1><a href="index.php"><img src="images/vegykart.png" alt="logo" width="310" height="95">
<span>आपकी अपनी सब्जी मंडी</span></a></h1>
</div>
<div class="head-t">
<ul class="card">
<li><a href="login.php" ><i class="fa fa-user" aria-hidden="true"></i>Login</a></li>
<li><a href="register.php" ><i class="fa fa-arrow-right" aria-hidden="true"></i>Register</a></li>
<li><a href="vendor-index.php" ><i class="fa fa-user" aria-hidden="true"></i>Vendor Login</a></li>
<li><a href="about.php" ><i class="fa fa-file-text-o" aria-hidden="true"></i> About Us </a></li>
<li><a href="shipping.php" ><i class="fa fa-ship" aria-hidden="true"></i>Shipping</a></li>
</ul>
</div>
<div class="header-ri">
<ul class="social-top">
<li><a href="https://www.instagram.com/vegykart.wale/" class="icon twitter"><i class="fa fa-facebook" aria-hidden="true"></i><span></span></a></li>
<li><a href="https://twitter.com/vegykart" class="icon twitter"><i class="fa fa-twitter" aria-hidden="true"></i><span></span></a></li>
<li><a href="https://www.instagram.com/vegykart.wale/" class="icon twitter"><i class="fa fa-instagram" aria-hidden="true"></i><span></span></a></li>
<li><a href="https://api.whatsapp.com/send?phone=919431609503&text=Hi there!" class="icon twitter"><i class="fa fa-whatsapp" aria-hidden="true"></i><span></span></a></li>
<li><a href="mailto:shop.vegykart@gmail.com" class="icon twitter"><i class="fa fa-google-plus" aria-hidden="true"></i><span></span></a></li>
</ul>
</div>
<?php include_once("top.php"); ?>
</div>
</div>
</div>
<!---->
<!--banner-->
<div class="banner-top">
<div class="container">
<h3 >Login</h3>
<h4><a href="index.php">Home</a><label>/</label>Login</h4>
<div class="clearfix"> </div>
</div>
</div>
<!--login-->
<div class="login">
<div class="main-agileits">
<div class="form-w3agile">
<h3>Login</h3>
<form action="" method="post">
<div class="key">
<i class="fa fa-envelope" aria-hidden="true"></i>
<input type="text" value="Email" name="Email" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email';}" required="">
<div class="clearfix"></div>
</div>
<div class="key">
<i class="fa fa-lock" aria-hidden="true"></i>
<input type="password" value="Password" name="Password" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Password';}" required="">
<div class="clearfix"></div>
</div>
<input type="submit" name="submit" value="Login">
</form>
<?php
if(isset($_POST['submit']))
{
$email= $_POST['Email'];
$passwd= $_POST['Password'];
if($email != "" && $passwd != ""){
$query= "SELECT * from customers where email='$email' && password='$passwd'";
$data= mysqli_query($conn, $query);
$total= mysqli_num_rows($data);
if($total == 1){
$_SESSION['customer']= $email;
echo "<script type='text/javascript'> window.location='cust-index.php'; </script>";
}
else{
echo "Invalid Username or Password";
}
}
else{
echo "All Fields Required";
}
}
?>
</div>
<div class="forg">
<a href="forget.php" class="forg-left">Forgot Password</a>
<a href="register.php" class="forg-right">Register</a>
<div class="clearfix"></div>
</div>
</div>
</div>
<!--footer-->
<?php include_once("footer.php"); ?>
<!-- //footer-->
<!-- smooth scrolling -->
<script type="text/javascript">
$(document).ready(function() {
/*
var defaults = {
containerID: 'toTop', // fading element id
containerHoverID: 'toTopHover', // fading element hover id
scrollSpeed: 1200,
easingType: 'linear'
};
*/
$().UItoTop({ easingType: 'easeOutQuart' });
});
</script>
<a href="#" id="toTop" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a>
<!-- //smooth scrolling -->
<!-- for bootstrap working -->
<script src="js/bootstrap.js"></script>
<!-- //for bootstrap working -->
<script type='text/javascript' src="js/jquery.mycart.js"></script>
<script type="text/javascript">
$(function () {
var goToCartIcon = function($addTocartBtn){
var $cartIcon = $(".my-cart-icon");
var $image = $('<img width="30px" height="30px" src="' + $addTocartBtn.data("image") + '"/>').css({"position": "fixed", "z-index": "999"});
$addTocartBtn.prepend($image);
var position = $cartIcon.position();
$image.animate({
top: position.top,
left: position.left
}, 500 , "linear", function() {
$image.remove();
});
}
$('.my-cart-btn').myCart({
classCartIcon: 'my-cart-icon',
classCartBadge: 'my-cart-badge',
affixCartIcon: true,
checkoutCart: function(products) {
$.each(products, function(){
console.log(this);
});
},
clickOnAddToCart: function($addTocart){
goToCartIcon($addTocart);
},
getDiscountPrice: function(products) {
var total = 0;
$.each(products, function(){
total += this.quantity * this.price;
});
return total * 1;
}
});
});
</script>
</body>
</html>