-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfheader.php
309 lines (243 loc) · 13.6 KB
/
fheader.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
<!DOCTYPE html>
<html lang="en">
<?php
include("dbCon.php");
$con=connection();
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
$_SESSION["directory"]="http://localhost/auction/";
if(!isset($_SESSION["isLogedIn"])){
$_SESSION["isLogedIn"]=false;
}
?>
<head>
<title>Crop Auction</title>
<!-- META -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- FAVICON -->
<link rel="shortcut icon" href="favicon.ico">
<!-- BOOTSTRAP -->
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/bootstrap.min.css" media="all" />
<!-- FONT AWESOME -->
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/font-awesome.css" media="all" />
<!-- STYLE -->
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/style.css">
<!-- ANIMATE -->
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/animate.css">
<!-- MAGNIFIC POPUP -->
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/magnific-popup.css">
<!-- FLEXSLIDER -->
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>plugins/FlexSlider/jquery.flexslider.css">
<!-- OWL CAROUSEL -->
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>plugins/owl-carousel/owl.carousel.css">
<!-- OWL CAROUSEL THEME -->
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>plugins/owl-carousel/owl.theme.css">
<!-- slick -->
<link rel="stylesheet" type="text/css" href="<?=$_SESSION["directory"]?>css/slick.css">
<!-- slick-theme -->
<link rel="stylesheet" type="text/css" href="<?=$_SESSION["directory"]?>css/slick-theme.css">
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/flaticon.css" media="all" />
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/owl.carousel.css" media="all" />
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/owl.theme.css" media="all" />
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/woocommerce.css">
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/jquery-ui.css">
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/slider-pro.min.css">
<link rel="stylesheet" href="<?=$_SESSION["directory"]?>css/starw.css" media="all" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- WEB FONTS -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700' rel='stylesheet' type='text/css'>
<link href="http://fonts.googleapis.com/css?family=Raleway:500,800" rel="stylesheet" property="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<!-- Header -->
<div class="header header-static">
<!-- Topbar -->
<div class="topbar">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="col-xs-3 custom-col-left form-group">
<div class="spa-search">
<form action="<?=$_SESSION["directory"]?>farmer/cropsearch.php" method="post">
<input type="text" placeholder="search your keyword ..." value="" class="form-control input-group-lg" style="width: 150%" name="Search">
<!--<button type="submit" class="spa-submit btn btn-default" name="serachButton"><i class="fa fa-search" aria-hidden="true"></i>
</button>-->
</form>
</div>
</div>
<ul class="list-inline topbar-right pull-right">
<li>
<?php if((isset($_SESSION["isLogedIn"]) && $_SESSION["isLogedIn"]==true) &&(isset($_SESSION["role"]) && $_SESSION["role"]=="0")){ ?>
<a href="<?=$_SESSION["directory"]?>farmer/fprofile.php">Account</a>
<?php } ?>
</li>
<li>
<?php
if((isset($_SESSION["isLogedIn"]) && $_SESSION["isLogedIn"]==true)){ ?>
<a href="<?=$_SESSION["directory"]?>logout.php" onclick="return confirm_alert(this);">Logout (<?php if(isset($_SESSION["username"])){echo($_SESSION["username"]);} ?>)</a>
<?php }else{ ?>
<a href="<?=$_SESSION["directory"]?>login.php">Login</a> | <a href="<?=$_SESSION["directory"]?>login.php">Register</a></li>
<?php } ?>
</ul>
</div>
</div>
</div><!--container-->
</div>
<!-- End Topbar -->
<!-- Navbar -->
<div class="navbar navbar-default mega-menu" role="navigation" style="background-color: white;">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".cd-navbar-collapse">
<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="<?=$_SESSION["directory"]?>home.php">
<img id="logo-header" src="<?=$_SESSION["directory"]?>img/logo.png" alt="Logo" style="width: 150px; height: inherit;">
</a>
</div>
<!-- Shopping Cart -->
<div class="shop-badge badge-icons pull-right">
<a href="#"><i class="fa fa"> <img style="width: 30px" src="<?=$_SESSION["directory"]?>img/icon/notification.png" ></i></a>
<?php
if((isset($_SESSION["isLogedIn"]) && $_SESSION["isLogedIn"]==true) &&(isset($_SESSION["role"]) && $_SESSION["role"]=="0")){ ?>
<span class="badge badge-sea rounded-x"></span>
<div class="badge-open">
<ul class="list-unstyled mCustomScrollbar" data-mcs-theme="minimal-dark" id="watchlist">
<!-- ajax use here -->
</ul> </div>
<?php } ?>
<?php
if((isset($_SESSION["isLogedIn"]) && $_SESSION["isLogedIn"]==true) &&(isset($_SESSION["role"]) && $_SESSION["role"]=="1")){
?>
<span class="badge badge-sea rounded-x" id="count"></span>
<div class="badge-open">
<a onClick="clearall()">clear all</a>
<ul class="list-unstyled mCustomScrollbar" data-mcs-theme="minimal-dark" id="notification">
<!-- ajax use here -->
</ul>
</div>
<?php } ?>
</div>
<!-- End Shopping Cart -->
<div class="collapse navbar-collapse cd-navbar-collapse">
<!-- Nav Menu -->
<ul class="nav navbar-nav">
<!-- Pages -->
<li class="btn-product">
</li>
<!-- End Pages -->
<!-- Promotion -->
<li class="dropdown">
<?php if((isset($_SESSION["isLogedIn"]) && $_SESSION["isLogedIn"]==true) &&(isset($_SESSION["role"]) && $_SESSION["role"]=="1")){ ?>
<a href="<?=$_SESSION["directory"]?>admin/report.php">
Dashboard
</a>
<?php }else{ ?>
<a href="<?=$_SESSION["directory"]?>home.php">Home</a>
<?php } ?>
</li>
<!-- End Promotion -->
<!-- Pages -->
<li class="dropdown">
<a href="javascript:void(0);" class="dropdown-toggle" data-hover="dropdown" data-toggle="dropdown">
crop
</a>
<ul class="dropdown-menu">
<?php
if((isset($_SESSION["isLogedIn"]) && $_SESSION["isLogedIn"]==true) &&(isset($_SESSION["role"]) && $_SESSION["role"]=="1")){ ?>
<li><a href="<?=$_SESSION["directory"]?>admin/Editcar.php">Vegetable</a></li>
<li><a href="<?=$_SESSION["directory"]?>admin/EditBike.php">Fruit</a></li>
<?php }else{ ?>
<li><a href="<?=$_SESSION["directory"]?>farmer/editveggie.php">Vegetable</a></li>
<li><a href="<?=$_SESSION["directory"]?>farmer/editfruit.php">Fruit</a></li>
<?php } ?>
</ul>
</li>
<!-- End Pages -->
<?php
if((isset($_SESSION["isLogedIn"]) && $_SESSION["isLogedIn"]==true) &&(isset($_SESSION["role"]) && $_SESSION["role"]!="1")){ ?>
<li class="btn-product">
<a href="<?=$_SESSION["directory"]?>farmer/croplist.php" >
Crop List
</a>
</li>
<li class="btn-product">
<a href="<?=$_SESSION["directory"]?>farmer/Addcrop.php" >
Add Crop
</a>
</li>
<li class="btn-product">
<a href="<?=$_SESSION["directory"]?>farmer/ftopBidder.php" >
Bidder List
</a>
</li>
<?php } ?>
<!-- End Promotion -->
</ul>
<!-- End Nav Menu -->
</div>
</div>
</div>
<!-- End Navbar -->
</div>
<!-- End Header-->
<script>
setInterval(function(){
var vid=1;
$.get('<?=$_SESSION["directory"]?>customer/Addwatchlist.php',{ID:vid},function(data){
$("#watchlist").html(data);
});
},1000);
function removeList(ID){
$.get('<?=$_SESSION["directory"]?>customer/Addwatchlist.php',{removeID:ID},function(data){
alert(data);
});
}
function noti(){
setInterval(function(){
$.get('<?=$_SESSION["directory"]?>admin/notification.php',function(data){
//alert(data);
$("#notification").html(data);
});
},1000);
}
noti();
function removenoti(id){
$.get('<?=$_SESSION["directory"]?>admin/notification.php',{RID:id},function(data){
//alert(data);
});
}
function clearall(){
var c=2;
$.get('<?=$_SESSION["directory"]?>admin/notification.php',{clAll:c},function(data){
//alert(data);
});
}
function notiC(){
setInterval(function(){
var count=0;
$.get('<?=$_SESSION["directory"]?>admin/notificationCount.php',{Count:count},function(data){
$("#count").html(data);
});
},1000);
}
notiC();
</script>
<script type="text/javascript">
function confirm_alert(node) {
return confirm("Are you sure want to Logout?");
}
</script>