<?php

session_start();

if (!isset($_SESSION['cno'])) {
	echo ("<script>location.href = '/';</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);
$rows = mysqli_fetch_assoc($resultt);


      
?>
 
 <div id="track_page_img" class="page_img">
     <!--[if lt 9]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

	<!doctype html>


<html>
	<head>
		<title>Tracking Result || Lumacks Courier Service.</title>
		<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0">
		<link rel="icon" type="image/x-icon" href="../favicon.ico">
		<link rel="stylesheet" type="text/css" href="css/style.css">
		<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
     integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
     crossorigin=""/>
    
		<!-- <link rel="stylesheet" type="text/css" href="css/jquery-ui.css"> -->
		
		<!--<script src="https://maps.googleapis.com/maps/api/js"></script>-->

		<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />

		

		
	</head><body>
	    
	 <div id="nav_wrapper" class="col-s-12 col-m-12 col-12">

		<ul id="nav_top">
		    
			
			
		</ul>
		<ul id="langs">
			<!-- GTranslate: https://gtranslate.io/ -->
<a href="#" onclick="doGTranslate('en|ar');return false;" title="Arabic" class="gflag nturl" style="background-position:-100px -0px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="Arabic" /></a><a href="#" onclick="doGTranslate('en|en');return false;" title="English" class="gflag nturl" style="background-position:-0px -0px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="English" /></a><a href="#" onclick="doGTranslate('en|fr');return false;" title="French" class="gflag nturl" style="background-position:-200px -100px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="French" /></a><a href="#" onclick="doGTranslate('en|de');return false;" title="German" class="gflag nturl" style="background-position:-300px -100px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="German" /></a><a href="#" onclick="doGTranslate('en|id');return false;" title="Indonesian" class="gflag nturl" style="background-position:-300px -300px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="Indonesian" /></a><a href="#" onclick="doGTranslate('en|it');return false;" title="Italian" class="gflag nturl" style="background-position:-600px -100px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="Italian" /></a><a href="#" onclick="doGTranslate('en|pt');return false;" title="Portuguese" class="gflag nturl" style="background-position:-300px -200px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="Portuguese" /></a><a href="#" onclick="doGTranslate('en|ru');return false;" title="Russian" class="gflag nturl" style="background-position:-500px -200px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="Russian" /></a><a href="#" onclick="doGTranslate('en|es');return false;" title="Spanish" class="gflag nturl" style="background-position:-600px -200px;"><img src="//gtranslate.net/flags/blank.png" height="16" width="16" alt="Spanish" /></a>

<style type="text/css">
<!--
a.gflag {vertical-align:middle;font-size:16px;padding:1px 0;background-repeat:no-repeat;background-image:url(//gtranslate.net/flags/16.png);}
a.gflag img {border:0;}
a.gflag:hover {background-image:url(//gtranslate.net/flags/16a.png);}
#goog-gt-tt {display:none !important;}
.goog-te-banner-frame {display:none !important;}
.goog-te-menu-value:hover {text-decoration:none !important;}
body {top:0 !important;}
#google_translate_element2 {display:none!important;}
-->
</style>

 <select onchange="doGTranslate(this);"><option value="">Select Language</option><option value="en|af">Afrikaans</option><option value="en|sq">Albanian</option><option value="en|ar">Arabic</option><option value="en|hy">Armenian</option><option value="en|az">Azerbaijani</option><option value="en|eu">Basque</option><option value="en|be">Belarusian</option><option value="en|bg">Bulgarian</option><option value="en|ca">Catalan</option><option value="en|zh-CN">Chinese (Simplified)</option><option value="en|zh-TW">Chinese (Traditional)</option><option value="en|hr">Croatian</option><option value="en|cs">Czech</option><option value="en|da">Danish</option><option value="en|nl">Dutch</option><option value="en|en">English</option><option value="en|et">Estonian</option><option value="en|tl">Filipino</option><option value="en|fi">Finnish</option><option value="en|fr">French</option><option value="en|gl">Galician</option><option value="en|ka">Georgian</option><option value="en|de">German</option><option value="en|el">Greek</option><option value="en|ht">Haitian Creole</option><option value="en|iw">Hebrew</option><option value="en|hi">Hindi</option><option value="en|hu">Hungarian</option><option value="en|is">Icelandic</option><option value="en|id">Indonesian</option><option value="en|ga">Irish</option><option value="en|it">Italian</option><option value="en|ja">Japanese</option><option value="en|ko">Korean</option><option value="en|lv">Latvian</option><option value="en|lt">Lithuanian</option><option value="en|mk">Macedonian</option><option value="en|ms">Malay</option><option value="en|mt">Maltese</option><option value="en|no">Norwegian</option><option value="en|fa">Persian</option><option value="en|pl">Polish</option><option value="en|pt">Portuguese</option><option value="en|ro">Romanian</option><option value="en|ru">Russian</option><option value="en|sr">Serbian</option><option value="en|sk">Slovak</option><option value="en|sl">Slovenian</option><option value="en|es">Spanish</option><option value="en|sw">Swahili</option><option value="en|sv">Swedish</option><option value="en|th">Thai</option><option value="en|tr">Turkish</option><option value="en|uk">Ukrainian</option><option value="en|ur">Urdu</option><option value="en|vi">Vietnamese</option><option value="en|cy">Welsh</option><option value="en|yi">Yiddish</option></select><div id="google_translate_element2"></div>
<script type="text/javascript">
function googleTranslateElementInit2() {new google.translate.TranslateElement({pageLanguage: 'en',autoDisplay: false}, 'google_translate_element2');}
</script><script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2"></script>


<script type="text/javascript">
/* <![CDATA[ */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('6 7(a,b){n{4(2.9){3 c=2.9("o");c.p(b,f,f);a.q(c)}g{3 c=2.r();a.s(\'t\'+b,c)}}u(e){}}6 h(a){4(a.8)a=a.8;4(a==\'\')v;3 b=a.w(\'|\')[1];3 c;3 d=2.x(\'y\');z(3 i=0;i<d.5;i++)4(d[i].A==\'B-C-D\')c=d[i];4(2.j(\'k\')==E||2.j(\'k\').l.5==0||c.5==0||c.l.5==0){F(6(){h(a)},G)}g{c.8=b;7(c,\'m\');7(c,\'m\')}}',43,43,'||document|var|if|length|function|GTranslateFireEvent|value|createEvent||||||true|else|doGTranslate||getElementById|google_translate_element2|innerHTML|change|try|HTMLEvents|initEvent|dispatchEvent|createEventObject|fireEvent|on|catch|return|split|getElementsByTagName|select|for|className|goog|te|combo|null|setTimeout|500'.split('|'),0,{}))
/* ]]> */
</script>

	
		<ul id="menu">

			<div id="mobile_menu">
				<div class="menu_line"></div>
				<div class="menu_line"></div>
				<div class="menu_line"></div>
				<div class="menu_line"></div>
				<div class="menu_line"></div>
				<div class="menu_line"></div>
			</div> 

					<div id="menu_wrap">
				<li><a id="home" href="https://lumackscourierservice.com">Home</a></li>
			
				<li><a href="tracking.php">Track Shipment</a></li>
			
			</div>
		</ul>
	</div>	

</div>

<div class="page_width">

		

	<div id="page_major_wu">
		


		<div id="page_content" class="left_float col-s-12 col-m-12 col-12">

			
			 <div id='track_page' class=''>

				<div id='track_details_wrapper'>
					
					<br>
<hr><hr>
					<div id='scroll_wrap'><p>Welcome to Lumacks Courier Service. At Lumacks Courier Service, we are dedicated to ensuring the timely and safe delivery of your package.</p></div>
					<hr><hr>
				
					<br><br><br>
					<h3 id='track_greeting'>Welcome, <span id='client_name'> <?php echo $row['rname']; ?> </span></h3><br><br><br><span> <form action='https://lumackscourierservice.com/parcel/app/tracking.php' method='post'> <input type='submit' id='sign_out' name='sign_out' value='Sign out'></form></span>
					<p class='track_headings'>A consignment was sent to you through Lumacks Courier Service. We recommend that you regularly keep track of your freight through our tracking system here. Feel free to contact us for any information <a href="mailto:info@lumackscourierservice.com">info@lumackscourierservice.com</a>.</p><br>
						<hr >
							<br>
					
					<div class="track_section" style="display: flex;justify-content: center;">
					    
					    
					        <img src="../parcels/<?php echo $row['image']; ?>" style ="width:200px; height:200px" /> 
					   
					</div>

					<h3 class='track_subheadings' style='text-align: center;'>Your consignment details are as stated below</h3><br>


            <center><img src="https://lumackscourierservice.com/images/pytron.jpeg" width="120px" /></center>
            <br><br>
      <center><h3><a href="https://lumackscourierservice.com/parcel/app/print-invoice/invoice-print.php?cid=<?php echo $row['id']; ?>">Print Invoice</a></h3></center>
      
      
      
      	<hr >
      	<br>
					<div class='track_section left_float col-s-12 col-m-12 col-4'>
						<h4>Receiver's Details:</h4>
						<span class='track_subheadings'>Receiver's name: </span><span class='detail_from_db'> <?php echo $row['rname']; print_r($json);?> </span> <br>
						<span class='track_subheadings'>Address: </span><span class='detail_from_db'> <?php echo $row['raddress']; print_r($json);?>   </span> <br>
						<span class='track_subheadings'>Phone: </span><span class='detail_from_db'><?php echo $row['rphone']; ?>  </span> <br>
						<span class='track_subheadings'>Email: </span><span class='detail_from_db'><?php echo $row['remail']; ?>  </span> <br><br>
						<br>
						<hr >
						<br>
						<h4>Sender's Details:</h4>
						<span class='track_subheadings'>Sender's name: </span> <span class='detail_from_db'> <?php echo $row['sname']; ?>  </span> <br>
						<span class='track_subheadings'>Address: </span><span class='detail_from_db'><?php echo $row['saddress']; ?>   </span> <br>
						<span class='track_subheadings'>Phone: </span><span class='detail_from_db'>  <?php echo $row['sphone']; ?> </span> <br> 
						
						<span class='track_subheadings'>Email: </span><span class='detail_from_db'> <?php echo $row['semail']; ?> </span> <br> 
						<br>
					</div>
					
					<hr >
<br>
					<div class='track_section left_float col-s-12 col-m-12 col-4'>
						<h4>Delivery Details:</h4>
						<div class="row">
						    <div class="col-lg-6">
					
						<span class='track_subheadings'>Package weight: </span><span class='detail_from_db'>  <?php echo $row['weight']; ?> </span><br>
						<span class='track_subheadings'>Tracking number: </span><span class='detail_from_db'> <?php echo $row['cno']; ?> </span><br>
						<span class='track_subheadings'>Current Status: </span><span class='detail_from_db' style='color:#CC0000;'>  <?php echo $row['status']; ?></span><br><br>
						
						
						
							<hr >
							<br>
						<h4>More Information:</h4>
						<span class='track_subheadings'>Type Of Service: </span><span class='detail_from_db'> <?php echo $row['service_type']; ?>  </span><br>
						<span class='track_subheadings'>Delivery Type: </span><span class='detail_from_db'> <?php echo $row['mode']; ?> </span><br>
						<span class='track_subheadings'>Delivery Completion: </span><span class='detail_from_db'><?php echo $row['percentage']; ?>% Complete </span><br>
						<span class='track_subheadings'>Origin: </span><span class='detail_from_db'> <?php echo $row['origin']; ?>  </span><br>
						<span class='track_subheadings'>Destination: </span><span class='detail_from_db'> <?php echo $row['destination']; ?> </span><br>
						<span class='track_subheadings'>Expected Delivery Date: </span><span class='detail_from_db'><?php echo $row['expdelivdate']; ?></span><br>
						<span class='track_subheadings'>Departure Time: </span><span class='detail_from_db'><?php echo $row['deptdate']; ?></span><br>
						<span class='track_subheadings'>Pickup Date: </span><span class='detail_from_db'> <?php echo $row['pickupdate']; ?>  </span><br>
						<span class='track_subheadings'>Pickup Time: </span><span class='detail_from_db'> <?php echo $row['pickuptime']; ?> </span><br>
					
						
						</div>
					
						
						<hr >
						
						
						<br>
						
						
						</div>
					</div>


					<div id='track_section_scroller_wrap' class='track_section left_float col-s-12 col-m-12 col-4'>
						<div id="track_section_scroller">
							<div id=''><p>Dear <?php echo $row['rname']; ?> , we are committed to giving you a quality service, 
Thank you.</p></div>
							<div class="opac" id="opac1"></div>
							<div class="opac" id="opac2"></div>
							<div class="opac" id="opac3"></div>
							<div class="opac" id="opac4"></div>
						</div>
					</div>
	<hr >
							<br>
					<div class='clear'></div>

					<div id='trackline_wrap'>
						<div id='grey_line'>
							<div id='startpoint'></div>

							<div id='endpoint'></div>

							<div id='movingline'></div>

							<div id='pointer_img'>
								<img src='images/pointer2.png' />
								<span id="perc_count">00%</span>
							</div>
						</div>
					</div>

			  
 
				
				
					<table class='col-s-12 col-m-12 col-12'>
						<caption>Delivery Informations</caption>
						
							<tr>
								 <th>Details</th>
								<th>Current Location</th>  
								<th>Pickup Date</th>
							 
								<th>Destination</th>
								<th>Remark</th>
							</tr>
						
							<tr>
								  <tr class="active">
						 
				<td class="track_dot">
			      Parcel Delivery
                </td> 
                <td><?php echo $rows['location']; ?></td>  
                 
                <td> <?php echo $row['pickupdate'] ?></td> 
               <td><?php echo $row['destination'] ?></td>
                <td><?php echo $rows['remark'] ?> </td>
                
               
                
                </tr></table>							</tr>
 					</table>
				</div>

	<div id='vert_scroll_wrap'><p>Thanks for patronising us. Feel free to track your package anytime.</p></div>

	<hr ><hr >
							<br>
<div class="clear"></div>

<div id = "sample" style = "width:100%; height:580px;"></div>
<script type="text/javascript" src="js/jquery-2.1.3.min.js"></script>
 <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
     integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
     crossorigin=""></script>
      <script type="text/javascript">
let lon = 0;
let lat= 0;
let town = ""
      $.ajax({
   method: 'GET',
    url: 'https://api.api-ninjas.com/v1/geocoding?city=' + town,
    headers: { 'X-Api-Key': 'uCNghTJlrQAQQR31WWPJFg==HmdTQo43nZC1Y2nK'},
    contentType: 'application/json',
    success: function(out) {
        console.log(out);
        lat = out[0].latitude;
        lon = out[0].longitude;

var mapOptions = {
   center: [lat, lon],
   zoom: 10
}
         
       let map = L.map('sample').setView([lat, lon], 13);
       
       let mark = L.marker([lat, lon]);
       mark.addTo(map);
       
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
    maxZoom: 19,
    attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map); 
},

 error: function ajaxError(jqXHR) {
        console.error('Error: ', jqXHR.responseText);
    }
});
      </script>
      
      	</div>

	
	
</div>

<div class="clear"></div>


<script type="text/javascript" src="js/cycle2.js"></script>
<script type="text/javascript" src="js/cycle2.tile.min.js"></script>
<script type="text/javascript" src="js/cycle2.shuffle.min.js"></script>
<script type="text/javascript" src="js/cycle2.scrollVert.min.js"></script>


<script type="text/javascript" src="js/cycle2.caption2.min.js"></script>
<script type="text/javascript" src="js/cycle2.carousel.min.js"></script>
<script type="text/javascript" src="js/cycle2.center.min.js"></script>
<script type="text/javascript" src="js/cycle2.flip.min.js"></script>

<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/jquery.bgswitcher.js"></script>
<script type="text/javascript" src="js/caller.js"></script>




	<div id="footer">
		<div class="liner"></div>

		<div class="page_width">

		
		
			</div>
			
			<div class="footer_sections left_float col-s-12 col-m-12 col-2">
				<ul>
					<h2>Contact Us</h2> 
					<li>Lumacks Courier Service </li>
				
					<br>
				
					
					<li>Email: <a href="mailto:info@lumackscourierservice.com">info@lumackscourierservice.com</a></li>
				</ul>
			</div>

			

			<div class="footer_sections left_float col-s-12 col-m-12 col-2">

				<ul>
					<li class="left_float"><img src="../images/card-sec1.png" alt=""></li>
					<li class="left_float"><img src="../images/card-sec2.png" alt=""></li>
					<li class="left_float"><img src="../images/card-amexp.png" alt=""></li>
					<li class="left_float"><img src="../images/card-avangate.png" alt=""></li>
					<li class="left_float"><img src="../images/rha-iso-9002-logo.png" alt=""></li>
					<div class="clear"></div>
				</ul>
			</div>

			<div class="footer_sections left_float col-s-12 col-m-12 col-2">
				
			</div>

			<div class="clear"></div>

			<p id="copyright">&copy;Lumacks Courier Service 2025. All rights reserved</p>

		</div>
			
	</div>
<!-- Smartsupp Live Chat script -->
<script type="text/javascript">
var _smartsupp = _smartsupp || {};
_smartsupp.key = '820ac04a6587ea2084ae9b021251b10deb083c86';
window.smartsupp||(function(d) {
  var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];
  s=d.getElementsByTagName('script')[0];c=d.createElement('script');
  c.type='text/javascript';c.charset='utf-8';c.async=true;
  c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s);
})(document);
</script>
<noscript>Powered by <a href="https://www.smartsupp.com" target="_blank">Smartsupp</a></noscript>


<script src="currentstatusjsfile.js" charset="utf-8"></script>
	
</body>


<script type="text/javascript">

    $(document).ready(function() {

    	function indicator(){

    		$("#pointer_img").css({'left' : ''});
    		$("#pointer_img").css({'right' : ''});
    		$("#movingline").css({'width': '0%'});
    		
    		
    		
	    	var moving_guage =  <?php echo $row['percentage']; ?> ;
			var moving_guage2 = <?php echo $row['percentage']; ?> ;


	    	// var moving_guage = 45;
	    	

			
			

			if(moving_guage > 100){
				moving_guage = 100;
			}

			if(moving_guage < 0){
				moving_guage = 0;
			}

			if(moving_guage2 > 98){
				moving_guage2 = 98;
			}

			if(moving_guage2 < 0){
				moving_guage2 = 0;
			}

			if(moving_guage2 > 50){
				moving_guage2 = 100 - moving_guage2 - 5;
				$("#pointer_img").css({'left' : ''});
				$("#pointer_img").animate({'right' : moving_guage2+'%'}, 5000);
			}else{
				$("#pointer_img").css({'right' : ''});
				$("#pointer_img").animate({'left' : moving_guage2+'%'},5000);
			}

			$("#movingline").animate({'width': moving_guage+'%'}, 5000);






			var perc_num = 0;
			var interval = 5000/moving_guage;

			var counterLoop = window.setInterval(function(){
				perc_num += 1;

				if(perc_num >= moving_guage){
					perc_num = 0;
					// $("#perc_count").text(perc_num + "%");
					clearInterval(counterLoop);
					window.setTimeout(function(){
			    		// countPerc();
					}, 2000)
				}else if(perc_num < 10){
					$("#perc_count").text("0" + perc_num + "%");
				}else{
					$("#perc_count").text(perc_num + 1 + "%");
				}

			}, interval)
    	}

    	indicator();

    	window.setInterval(function(){
    		indicator();
		}, 7000)



	});

</script>


<script type="text/javascript" src="../whatsapp.js"></script>
<!-- Smartsupp Live Chat script -->
<script type="text/javascript">
var _smartsupp = _smartsupp || {};
_smartsupp.key = 'e4e9cad9daaf329bbb67fe2fbd0038ed57a98771';
window.smartsupp||(function(d) {
  var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];
  s=d.getElementsByTagName('script')[0];c=d.createElement('script');
  c.type='text/javascript';c.charset='utf-8';c.async=true;
  c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s);
})(document);
</script>
<noscript> Powered by <a href=“https://www.smartsupp.com” target=“_blank”>Smartsupp</a></noscript>
</html>

