-
Notifications
You must be signed in to change notification settings - Fork 1
/
vendor_register.php
329 lines (288 loc) · 11.4 KB
/
vendor_register.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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<?php
session_start();
$cust= $_SESSION['customer'];
include("connection.php");
error_reporting(0);
?>
<!DOCTYPE html>
<html>
<head>
<title>Vendor Register</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="Registration" />
<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>
<?php
if(isset($_SESSION['customer']))
{
?>
<div class="header">
<b>Welcome </b><b style="color: green;"><?php echo $cust; ?></b>
</div>
<div class="head-t">
<ul class="card">
<li><a href="order.php" ><i class="fa fa-arrow-right" aria-hidden="true"></i>Orders</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>
<li><a href="cust-logout.php" ><i class="fa fa-user" aria-hidden="true"></i>Logout</a></li>
</ul>
</div>
<?php
}
else{
?>
<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>
<?php
}
?>
<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 >Vendor Register</h3>
<h4><a href="index.php">Home</a><label>/</label>Vendor Register</h4>
<div class="clearfix"> </div>
</div>
</div>
<!--login-->
<div class="login">
<div class="main-agileits">
<div class="form-w3agile form1">
<h3>Vendor Register</h3>
<form action="" method="get">
<div class="key">
<i class="fa fa-user" aria-hidden="true"></i>
<input type="text" value="Username" name="Username" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Username';}" required="true">
<div class="clearfix"></div>
</div>
<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="true">
<div class="clearfix"></div>
</div>
<div class="key">
<i class="fa fa-phone" aria-hidden="true"></i>
<input type="text" value="Phone" name="Phone" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Phone';}" required="true">
<div class="clearfix"></div>
</div>
<div class="key">
<i class="fa fa-user" aria-hidden="true"></i>
<input type="text" value="Street Address" name="Street" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Street';}" required="true">
<div class="clearfix"></div>
</div>
<div class="key">
<i class="fa fa-user" aria-hidden="true"></i>
<input type="text" value="City" name="City" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'City';}" required="true">
<div class="clearfix"></div>
</div>
<div class="key">
<i class="fa fa-user" aria-hidden="true"></i>
<input type="text" value="Pincode/ Zipcode" name="Pincode" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Pincode';}" required="true">
<div class="clearfix"></div>
</div>
<div class="key">
<i class="fa fa-user" aria-hidden="true"></i>
<input type="text" value="Bank IFSC No." name="IFSC" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Required During Payment';}" required="true">
<div class="clearfix"></div>
</div>
<div class="key">
<i class="fa fa-user" aria-hidden="true"></i>
<input type="text" value="PAN Card No." name="pan_card" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Required During Payment';}" required="true">
<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="true">
<div class="clearfix"></div>
</div>
<div class="key">
<i class="fa fa-lock" aria-hidden="true"></i>
<input type="password" value="Confirm Password" name="ConfirmPassword" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Confirm Password';}" required="true">
<div class="clearfix"></div>
</div>
<input type="submit" name="submit" value="Submit">
</form>
<?php
if($_GET['submit']){
$uname= $_GET['Username'];
$email= $_GET['Email'];
$phone= $_GET['Phone'];
$street= $_GET['Street'];
$city= $_GET['City'];
$pincode= $_GET['Pincode'];
$passwd= $_GET['Password'];
$cpasswd= $_GET['ConfirmPassword'];
$ifsc= $_GET['IFSC'];
$pan= $_GET['pan_card'];
if($uname != "" && $email != "" && $phone != "" && $city != "" && $pincode != "" && $passwd != ""){
if($passwd == $cpasswd){
$query= "INSERT INTO vendors values (DEFAULT,'$uname','$email','$street','$city','$pincode','$passwd','$phone','$ifsc','$pan')";
$data= mysqli_query($conn, $query);
if($data == false){
echo "All Fields Required ";
}
else{
$_SESSION['user']= $email;
echo "<script type='text/javascript'> alert('Vendor Registered Successfully'); </script>";
echo "<script type='text/javascript'> window.location='vendor-index.php'; </script>";
}
}
else{
echo "Passwords don't match ";
}
}
else{
echo "All Fields Required ";
}
}
?>
<div class="forg">
<a href="vendor.php" class="forg-right">Already a Vendor?</a>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!--footer-->
<?php include_once("footer.php"); ?>
<!-- //footer-->
<script type="text/javascript">
</script>
<!-- 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>