-
Notifications
You must be signed in to change notification settings - Fork 4
/
Customerhome.php
316 lines (261 loc) · 10.8 KB
/
Customerhome.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Rapid Delivery</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<style>
/* Always set the map height explicitly to define the size of the div
* element that contains the map. */
#map {
height: 100%;
}
/* Optional: Makes the sample page fill the window. */
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/scrolling-nav.css" rel="stylesheet">
</head>
<!-- The #page-top ID is part of the scrolling feature - the data-spy and data-target are part of the built-in Bootstrap scrollspy function -->
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-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 page-scroll" href="#page-top">Rapid Delivery</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="hidden">
<a class="page-scroll" href="#page-top"></a>
</li>
<li>
<a class="page-scroll" href="#about">About</a>
</li>
<li>
<a class="page-scroll" href="#services">Services</a>
</li>
<li>
<a class="page-scroll" href="#contact">Contact</a>
</li>
<li>
<a class="page-scroll" href="#track">Tracking</a>
</li>
</ul>
<ul>
<div class="userName">
<?php
include('customerSession.php');
echo "<h3> $login_session </h3>";
?>
<form action="logout.php" method="post">
<div class="logout">
<input name="btn_logout" type="submit" value="Logout">
</form>
</div>
</ul>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Intro Section -->
<section id="intro" class="intro-section">
<div class="container">
<div class="row">
<div class="welcomePane">
<h1>Welcome to Rapid Delivery</h1>
<img src="images/courier-services-2.jpg" class="img-responsive">
<br/>
</div>
</div>
<script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/style4.css">
<form action="addParcel.php">
<button data-hover="Go to page"><div>Place a courier</div></button>
</form>
</section>
<!-- About Section -->
<section id="about" class="about-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1>About Rapid Delivery</h1>
<p align="justify"> Rapid Delivery is a 24/7 courier service, located in Colombo, Sri Lanka. Our company was founded in mid-2017 by Prasanga Fernando. A final year software engineering student of the University of the west of England with the aim of providing a better courier service that is focused on delivery transparency with the support of GPS.
</p>
</div>
</div>
</div>
</section>
<!-- Services Section -->
<section id="services" class="services-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1>Services Section</h1>
<p align="justify">
Rapid Delivery originally only delivers parcels to Sri Lankan addresses, they now deliver parcels to any global location requested by incorporated clients.
Rapid Delivery us, utilize Intelligent Dispatch, which is an artificial intelligence and fleet management system to allocate a booking to the most appropriate vehicle for transport mode (including bicycles, motorbikes and vans of varying sizes).
<br/>
Our couriers are rewarded and motivated with high pay for the service levels they provide, supported by the information technology. Thus, Rapid Delivery customers can render a courier service that is reliable, trustworthy and transparent than other traditional courier services all around the island. This industrial and organization philosophy is complex to initiate and also requiring explicit training to be given to the couriers to change the way in which they worked in their lives in the purpose of courier service and behaved in order to fit the new organizational practices and image, enabled by new information technology.
<br/>
Additionally, other than giving features to the employees, Rapid Delivery has been provided a new feature to the customers for the real time tracking of their parcel on a map, in the power of GPS technology. They are also shown the shortest route from the starting point to the final destination, for which they are billed, from pick-up to dispatch. So the customer can keep monitoring their parcel on the map till the package been delivered. That will be a relief for the customers to identify the package has reached to the final destination successfully. It is this high level of human-to-system connectivity at the heart of Rapid Delivery, makes it a unique e-courier service with fulfilling the customer satisfaction.
</p>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="contact-section">
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1>Receiver Details</h1>
<?php
require 'connect.php';
$sql = "SELECT * FROM
receiver where pickup_address like '$pickup_addr' AND state_address like '$state_address'";
if (mysqli_query($con, $sql)) {
$results = mysqli_query($con, $sql) or die(mysql_error());
$x=1;
while ($row = mysqli_fetch_array($results, MYSQLI_ASSOC)) {
if ($x <= 1)
{
extract($row);
echo "<table id=\"keywords\" cellspacing=\"0\" cellpadding=\"0\">";
echo "<thead>
<br/><br/>
<br/>
<tr>
<th><span>ID</span></th>
<th><span>pickup_address</span></th>
<th><span>delivery_address</span></th>
</tr>
</thead>
<tbody>
<tr>
<td class=\"lalign\">".$id ."</td>
<td>".$pickup_address."</td>
<td>".$delivery_address."</td>
</tr>
</tr>
</tbody>
</table>";
}
}
}
?>
///////////////
</div>
</div>
</div>
</section>
<!-- Tracking Section -->
<section id="track" class="track-section">
<div class="container">
<div class="row">
<div class="">
<h1>Tracking</h1>
</div>
</div>
<form action="CustomerParcels.php" method="post">
<input type="text" name="parcel_ID" placeholder="Parcel ID">
<input type="submit">
</form>
<form action="DeleteParcels.php" method="post">
<input type="text" name="parcel_ID" placeholder="Parcel ID">
<input type="submit" value="Received">
</form>
<?php
require 'connect.php';
$sql = "SELECT id from customer where username = '$login_session'";
if (mysqli_query($con, $sql)) {
$results = mysqli_query($con, $sql) or die(mysql_error());
while ($row = mysqli_fetch_array($results, MYSQLI_ASSOC)) {
extract($row);
$id;//Getting the customer_ID
}
}
$sql1 = "SELECT status from parcel_status where customer_id = '$id'";
if (mysqli_query($con, $sql1)) {
$results = mysqli_query($con, $sql1) or die(mysql_error());
while ($row = mysqli_fetch_array($results, MYSQLI_ASSOC)) {
extract($row);
$status;//Getting parcel status
}
}
$sql = "SELECT parcel_reports.parcel_ID, parcel_reports.pickup_address, parcel_reports.delivery_address,parcel_reports.package_type, parcel_reports.contact_no, parcel_status.status FROM parcel_reports INNER JOIN parcel_status on parcel_reports.parcel_ID = parcel_status.parcel_ID WHERE parcel_status.status = 'Pickedup' AND parcel_reports.customer_id = '1'";
if (mysqli_query($con, $sql)) {
$results = mysqli_query($con, $sql) or die(mysql_error());
echo "<table border=\"2\">";
$x=1;
echo "<tr>";
while ($row = mysqli_fetch_array($results, MYSQLI_ASSOC)) {
if ($x <= 1)
{
$x = $x + 1;
extract($row);
echo "<td style=\"padding-right:35px;\">";
echo $parcel_ID .'<br/>';
echo "<td style=\"padding-right:15px;\">";
echo $pickup_address .'<br/>';
echo "</td>";
echo "<td style=\"padding-right:15px;\">";
echo $delivery_address .'<br/>';
echo "</td>";
echo "<td style=\"padding-right:15px;\">";
echo $package_type .'<br/>';
echo "<td style=\"padding-right:15px;\">";
echo $contact_no .'<br/>';
echo "</td>";
}
$x=0;
echo "</tr><tr>";
}
echo "</table>";
}
?>
<!--
<div class="map-Border">
<div id="map"></div>
<script>
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
//center: {lat: 7.8731, lng: 80.7718},
center: {lat: 7.1824795, lng: 79.9043215},
//zoom: 8
zoom:15
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDPtg5NhcYerzCS0sHvWAff9XqUipqY8LU&callback=initMap"
async defer></script>
</div>
</section>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Scrolling Nav JavaScript -->
<script src="js/jquery.easing.min.js"></script>
<script src="js/scrolling-nav.js"></script>
</body>
</html>