<?php

session_start();

if (!isset($_SESSION['cno'])) {
	echo ("<script>location.href = 'index.php';</script>");
}

require_once 'admin/db.php';
$cno = $_SESSION['cno'];
$query = "SELECT * FROM parcel WHERE cno = '$cno'";
$queryy = "SELECT * FROM track WHERE cno = '$cno' ORDER BY id DESC";
$result = mysqli_query($db, $query);
$row = mysqli_fetch_assoc($result);




$resultt = mysqli_query($db, $queryy);
//$resultt1 = mysqli_query($db, $queryy);
//$rows = mysqli_fetch_assoc($resultt);



		

?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <!-- metas -->
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <!-- title  -->
        <title>Swift Hawk Logistics | Track Now</title>
        <!-- favicon -->
        <link rel="shortcut icon" href="img/logos/favicon.png">

        <!-- plugins -->
        <link rel="stylesheet" href="css/plugins.css">

        <!-- search css -->
        <link rel="stylesheet" href="search/search.css">

        <!-- quform css -->
        <link rel="stylesheet" href="quform/css/base.css">

        <!-- core style css -->
        <link href="css/styles.css" rel="stylesheet">
        <link href="css/bootstrap.css" rel="stylesheet">
        <link href="css/style.css" rel="stylesheet">
        <link href="css/responsive.css" rel="stylesheet">
        <link rel="stylesheet" type="text/css" href="./process/custom-style.css">
        <link rel="stylesheet" type="text/css" href="./process/carousel.css">
        <script type="text/javascript" src="./process/jquery.min.js.download"></script>
        <script type="text/javascript" src="./process/jquery-ui.min.js.download"></script>
        <script type="text/javascript" src="./process/bootstrap.min.js.download"></script>
        <script type="text/javascript" src="./process/carousel.js.download"></script>
        <script type="text/javascript" src="./process/common.js.download"></script>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
        <!-- start Gist JS code-->
        	<style>
table {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #dddddd;
}
</style>

<!-- end Gist JS code-->

    </head>

    <body>

        <!-- PAGE LOADING
        ================================================== -->
        <div id="preloader"></div>

                

        <!-- MAIN WRAPPER
        ================================================== -->
        <div class="main-wrapper">

            <!-- HEADER
            ================================================== -->
            <header class="header-style1 menu_area-light">

                <div class="navbar-default border-bottom border-color-light-white">

                    <div class="container-fluid px-lg-1-6 px-xl-2-5 px-xxl-2-9">
                        <div class="row align-items-center">
                            <div class="col-12 col-lg-12">
                                <div class="menu_area alt-font">
                                    <nav class="navbar navbar-expand-lg navbar-light p-0">
                                        <div class="navbar-header navbar-header-custom">
                                            <!-- start logo -->
                                            <a href="index-1.htm" class="navbar-brand logochange"><img id="logo" src="img/logos/logo-inner.png" style="height:60px" alt="logo"></a>
                                            <!-- end logo -->
                                        </div>

                                        <div class="navbar-toggler bg-primary"></div>

                                        <!-- menu area -->
                                        <ul class="navbar-nav ms-auto" id="nav" style="display: none;">
                                            <li class="active">
                                                <a href="index.htm">Home</a>
                                            </li>
                                            <li class="">
                                                <a href="about.html">About</a>
                                            </li>
                                            <li class=""><a href="services.html">Services</a>
                                            </li>
                                            <li class="">
                                                <a href="track.html">Track Shipment</a>
                                            </li>
                                            <li class="">
                                                <a href="contact.html">Contact</a>
                                            </li>
                                        </ul>
                                        <!-- end menu area -->

                                        <!-- start attribute navigation -->
                                        <div class="attr-nav align-items-xl-center ms-xl-auto main-font">
                                            <ul>
                                                <li class="d-none d-xl-inline-block"><a href="track.html" class="butn md"><span class="text-white" style="font-size:16px">Track Now</span></a></li>
                                            </ul>
                                        </div>
                                        <!-- end attribute navigation -->
                                    </nav>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>            

            </header>       <section class="page-title-section bg-img cover-background top-position1 left-overlay-dark" data-overlay-dark="9" data-background="img/banner/banner-01.jpg">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <h1 class="text-animation" data-in-effect="fadeInUp">Track</h1>
                    </div>
                    <div class="col-md-12">
                        <ul class="wow fadeInUp" data-wow-delay="400ms">
                            <li><a href="index-1.htm">Home</a></li>
                            <li><a href="#!">Track</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>     
	
	<!--Sidebar Page Container-->
    <div class="sidebar-page-container">
    	<div class="auto-container">
        	<div class="row clearfix">
				
				
				
		<!-- Featured Section -->
	<div class="auto-container">
        	<!--Widgets Section-->
            <div class="widgets-section">
            	<div class="row clearfix">
                	
                    <!--Column-->
                    <div class="big-column col-lg-12 col-md-12 col-sm-12">
						<div class="row clearfix">
						
                        	<!--Footer Column-->
                            <div class="footer-column col-lg-6 col-md-6 col-sm-6">
                                <div class="footer-widget news-widget" style="margin-bottom:20px;">
										<center><strong>
							<font size="5" color="#ef7715" face="arial,helvetica,sans-serif">Senders's  Details</font></strong></center>
							<br>
								<table>
					  <tr>
						<th>Name:</th>
						<td><?php echo $row['sname']; ?></td>

					  </tr>
					  
					  <tr>
						<th>Email:</th>
						<td><?php echo $row['semail']; ?></td>
					  </tr>
					  
					   <tr>
						<th>Mobile:</th>
						<td><?php echo $row['sphone']; ?></td>

					  </tr>
					  
					  <tr>
						<th>Address:</th>
						<td><?php echo $row['saddress']; ?> </td>
					  </tr>
					  
					 
					  
					</table>
									
                                   
								</div>
							</div>
							
							<!--Footer Column-->
                            <div class="footer-column col-lg-6 col-md-6 col-sm-6">
                                <div class="footer-widget news-widget">
								
									<center><strong>
							<font size="5" color="#ef7715" face="arial,helvetica,sans-serif">Receiver's  Details</font></strong></center>
							<br>
								<table>
					  <tr>
						<th>Name:</th>
						<td><?php echo $row['rname']; ?> </td>

					  </tr>
					  
					  <tr>
						<th>Email:</th>
						<td><?php echo $row['remail']; ?></td>
					  </tr>
					  
					   <tr>
						<th>Mobile:</th>
						<td><?php echo $row['rphone']; ?></td>

					  </tr>
					  
					  <tr>
						<th>Address:</th>
						<td><?php echo $row['raddress']; ?></td>
					  </tr>
					  
					 
					  
					</table>
                                   
								</div>
							</div>
							
						</div>
					</div>
					
				
					
				</div>
			</div>
		</div>		
				
				
				
				
				
				<br><br/>
				
				<!--Content Side-->
                <div class="content-side col-lg-7 col-md-12 col-sm-12">
                	<div class="track-section">
						<!-- Sec Title Two -->
						<div class="sec-title-two sec-title">
						<br><br/><br><br/>
							<h2>Track & <span>Trace Shipment</span></h2>
							<div class="separater"></div>
						</div>
						
						<!-- Quote Form Box -->
						
						
						
						


		

						  						
				 <tr>
         <td colspan="2"><div align="left">
           <table width="50%" border="0">
               <tr>

               	<?php
               	while($rowaw = mysqli_fetch_assoc($resultt)){
              echo '<img src="images/arw.gif" width="40" height="14" border="0">'. $rowaw['location'];

				}

?>
               </tr>
               </table>
         </div></td>
         </tr>
		 
							                    


						  
			  
						<!-- Tracking Info -->
						<div class="tracking-info-detail">
						
						  						
					
						<?php

					
						   while($rowaw = mysqli_fetch_assoc($resultt)){


echo '<ul class="delivered-grid-box" >


					           <li>
									
                                       <div class="delivered-left"> <span>'.$rowaw['udate'].',.<br>'.$rowaw['utime'].'</span></div>
                                     <span class="d-bulte"><i class=""></i></span>
                                       <div class="delivered-right"> <strong>'.$rowaw['about'].'.</strong>
                                      <br>'.$rowaw['remark'].'.<br>'.
									  $rowaw['location'].'<br>
									  <span>&nbsp;<span id="order-status" class="default">'.$rowaw['status'].'</span>
									  </div>
									 
                                      
                                      
                                    </li><br><br>
                                  </ul>';


						   	}
						   


?>
						   		
							
							
							
							
							                 						
					
						
						
						 <!--  <ul class="delivered-grid-box" >
					           <li>
									
                                       <div class="delivered-left"> <span>16th May 2025,<br>12:26 PM GMT</span></div>
                                     &nbsp;&nbsp;&nbsp;&nbsp;<span class="d-bulte"><i class=""></i></span>
                                       <div class="delivered-right"> <strong>Item received at </strong>
                                      <br>Origin Facility<br>
									  London, United Kingdom<br>
									  <span>&nbsp;<span id="order-status" class="default">IN TRANSIT</span>
									  </div>
									 
                                      
                                      
                                    </li><br><br>
                                  </ul>
							-->
							
							
							                    
						</div>
					
						
					</div>
				</div>
				
				<!--Sidebar Side-->
                <div class="sidebar-side col-lg-5 col-md-6 col-sm-6">
                	<aside class="sidebar">
						
						   <div>
						
					<center><img src="images/move.gif" width="190" height="65" border="0">	</center>
					<br>
				<center> <font face="helvetica">
     <font size="5" color="#2c2c2c">Tracking:</font> <font size="5" color="#ef7715" face="arial,helvetica,sans-serif"><strong><?php echo $row['cno']; ?> 
	 </strong>
                                            </font><br />
                                            </font>	</center>
					  <br>
					<table>	
						
						<tr>
						<th>Est. Delivery Date :</th>
						<td><?php echo $row['expdelivdate']; ?></td>

					  </tr>
					  <tr>
						<th>Origin Service Area:</th>
						<td><?php echo $row['origin']; ?> </td>
					  </tr>
					  <tr>
						<th>Destination Area:</th>
						<td><?php echo $row['destination']; ?> </td>
					  </tr>

				</table>

                 
							
					  
					
					  
					  
					  <br><br>
							
						<center><strong>
							<font size="5" color="#ef7715" face="arial,helvetica,sans-serif">Shipment Details</font></strong></center>
							<br>
								<table>
					  <tr>
						<th>Bill of Lading:</th>
						<td><?php echo $row['bol']; ?> </td>

					  </tr>
					  
					  <tr>
						<th>Type of Shipment:</th>
						<td><?php echo $row['shipment_type']; ?></td>
					  </tr>
					  
					  <tr>
						<th>Content of Shipment:</th>
						<td><?php echo $row['product']; ?></td>
					  </tr>
					  
					  <tr>
						<th>Quantity of Product:</th>
						<td><?php echo $row['quantity']; ?> </td>

					  </tr>
					  
					  
					  <tr>
						<th>Weight of Product:</th>
						<td><?php echo $row['weight']; ?></td>

					  </tr>
					  <tr>
						<th>Mode of Transport:</th>
						<td><?php echo $row['mode']; ?></td>

					  </tr>
					  <tr>
						<th>Total Charges:</th>
						<td><?php echo $row['total']; ?></td>

					  </tr>
					</table>
					
					</table>
						
							<br><br/>
							<!--<div style="width: 100%"><iframe width="100%" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=Origin Facility&amp;t=k&amp;z=13&amp;ie=UTF8&amp;iwloc=&amp;output=embed"><a href="https://www.gps.ie/">gps tracker sport</a></iframe></div>-->
							<br><br/>
							
						<center><form method="post" action="print.php?cid=<?php echo $row['id']; ?>" target="_blank" style="display:inline;" width="60px" height="40px">
				<a href="print.php?cid=<?php echo $row['id']; ?>" target="_blank"> <button id="order-status" class="btn btn-dark" >PRINT INVOICE</button></a></form>	</center>
							
			
				
			</div>
						
					</aside>
				</div>
				
			</div>
		</div>
	</div>
	
	<!--Main Footer-->
            <footer class="position-relative">
                <div class="container z-index-9 position-relative">                
                    <div class="row py-8">
                        <div class="col-lg-4 col-xl-3 col-md-6 col-sm-6 wow fadeIn" data-wow-delay="200ms">
                            <div class="footer-logo mb-1">
                                <img src="img/logos/footer-light-logo.png" style="height:50px !important;" alt="...">
                            </div>
                            <p class="text-white" style="font-size:14px;">Swift Hawk Logistics was built on a firm foundation of trust and ethics, we take pride in serving our customers with the utmost honesty and integrity.</p>
                        </div>
                        <div class="col-lg-2 col-xl-2 col-md-3 col-sm-6 mt-2-2 mt-sm-0 wow fadeIn" data-wow-delay="350ms">
                            <h3 class="text-white h5 mb-3">Quick links</h3>
                            <ul class="footer-list list-unstyled">
                                <li><a href="/about.html">About</a></li>
                                <li><a href="track.html">Track Shipment</a></li>
                                <li><a href="/faq.html">FAQ</a></li>
                            </ul>
                        </div>
                        <div class="col-lg-2 col-xl-2 col-md-3 col-sm-6 mt-2-2 mt-md-0 wow fadeIn" data-wow-delay="500ms">
                            <h3 class="text-white h5 mb-3">Our Services</h3>
                            <ul class="footer-list list-unstyled">
                                <li><a href="services/air-freight.html">Air Freight</a></li>
                                <li><a href="services/road-transport.html">Road Freight</a></li>
                                <li><a href="services/ocean-freight.html">Ocean Freight</a></li>
                                <li><a href="services/rail-freight.html">Rail Freight</a></li>
                            </ul>
                        </div>
                        <div class="col-lg-4 col-xl-4 col-md-12 col-sm-6 offset-xl-1 wow fadeIn mt-2-2 mt-lg-0" data-wow-delay="650ms">
                            <div class="d-flex align-items-center">
                                <div class="flex-grow-1">
                                    <h3 class="text-white h5">Contact Us</h3>
                                </div>
                            </div>
                            <ul class="list-unstyled mb-0">
                                <li class="mb-3 d-flex align-items-baseline">
                                    <a href="#!" class="text-white text-primary-hover"><i class="far fa-envelope text-primary display-25 me-4"></i>support@swifthawklogistics.com</a>
                                </li>
                                <li class="mb-3 d-flex align-items-baseline">
                                    <a href="#!" class="text-white text-primary-hover"><i class="fas fa-mobile-alt text-primary display-25 me-4"></i>+44 (748) 060-9655</a>
                                </li>
                                <li class="text-white d-flex align-items-baseline">
                                    <i class="fas fa-map-marker-alt text-primary display-25 me-4"></i> Widnes 400, Gorsey Ln, Mersey Gateway, Widnes WA8 0QR UK</li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="border-top border-color-light-white z-index-9 position-relative wow fadeIn" data-wow-delay="700ms">
                    <div class="container">
                        <div class="row align-items-center py-3">
                            <div class="col-md-7 col-lg-6 text-center text-md-start order-2 order-md-1">
                                <p class="d-inline-block text-white mb-0">&copy; Copyright<span class="current-year"></span> Swift Hawk Logistics. All Rights Reserved </p>
                            </div>
                        </div>
                    </div>
                </div>
            </footer>
	
</div>
<!--End pagewrapper-->

<!--Scroll to top-->
 <a href="#!" class="scroll-to-top"><i class="fas fa-angle-up" aria-hidden="true"></i></a>

<script src="js/jquery.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="js/jquery.fancybox.js"></script>
<script src="js/appear.js"></script>
<script src="js/owl.js"></script>
<script src="js/wow.js"></script>
<script src="js/jquery-ui.js"></script>
<script src="js/script.js"></script>
<script src="js/core.min.js"></script>
<!--Google Map APi Key-->
<script src="https://maps.google.com/maps/api/js?key=AIzaSyCcavdONRtu_0BfV63xiQX1LiJpX1ZJ2N0"></script>
<script src="js/map-script.js"></script>
<!--End Google Map APi-->
<script src="process/jquery.min.js"></script>
<script src="process/jquery.validate.js"></script>
<!-- all js include end -->
<script src="js/main.js"></script>
<script src="npm/sweetalert2%4011"></script>
<!-- form plugins js -->
<script src="quform/js/plugins.js"></script>
<!-- form scripts js -->
<script src="quform/js/scripts.js"></script>
<script src="js/app.js"></script>
<div class="gtranslate_wrapper"></div>
<script>window.gtranslateSettings = {"default_language":"en","wrapper_selector":".gtranslate_wrapper","float_switcher_open_direction":"bottom"}</script>
<script src="widgets/latest/float.js" defer=""></script>
	
<script>
	$.validator.setDefaults({
		submit: function() {
			alert("submitted!");
		}
	});

	$(document).ready(function() {
		$("#userForm").validate({
			rules: {
				name: "required",
				Consignment: {
					required: true,
					minlength: 13
				},
			   
			},
			messages: {
				name: "Please enter your name",           
				Consignment: {
						required: "Please enter a valid tracking number...",
						minlength: "Tracking ID must consist of at least 13 characters"
				},           
			}
		});
	});
	
	</script>
	<script>
	$(document).ready(function(){
		$(".nav-tabs a").click(function(){
			$(this).tab('show');
		});
	});
	</script>
</body>

</html>
