<?php

session_start();

if (isset($_GET['cid'])) {
  $id = $_GET['cid'];
}

require_once 'admin/db.php';
$cno = $_SESSION['cno'];
$query = "SELECT * FROM parcel WHERE id = $id";
$queryy = "SELECT * FROM track WHERE cno = '$cno' ORDER BY id DESC";
$result = mysqli_query($db, $query);
$resultt = mysqli_query($db, $queryy);
$row = mysqli_fetch_assoc($result);
$rows = mysqli_fetch_assoc($resultt);
?>
  <!DOCTYPE html>
<html>
  
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>

    <title>Print Invoice</title>
	
	<!-- Define Charset -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	
	<!-- Page Description and Author -->
	<meta name="description" content="Swift Hawk Logistics"/>
	<meta name="keywords" content="Courier Delivery & Logistic Company" />
	<meta name="author" content="Viz">	
	
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.4 -->
    <link href="css/bootstrap2.min.css" rel="stylesheet" type="text/css" />
    <!-- Font Awesome Icons -->
    <link href="maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Ionicons -->
    <link href="code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="./css/print-invoice.min.css" rel="stylesheet" type="text/css" />

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<script src="barcode.html"></script>
	
	
<style>
	    
	    #background{
    position:absolute;
    z-index:0; 
    display:block;
    min-height:70%; Z
    min-width:70%; 
}

#content{X
    position:absolute;
    z-index:1;
}

#bg-text
{
    color:grey;
    font-size:36px;
    transform:rotate(300deg);
    -webkit-transform:rotate(300deg);
}
	    
	</style>
	
	
 


  </head>
  <body  style="background-color:teal;"  onload="window.print();">
      
      
	
	
    <div class="wrapper" id="background"> <p id="bg-text">Certified True Copy</p>

      <!-- Main content -->
      <section class="invoice" >
        <!-- title row -->
        <div class="row"  >
          <div class="col-xs-12">
            <h2 class="page-header">
			  <span><img src="images/logo.png"
                                alt="Air shipment tracking system, Sea shipment tracking system, Cargo tracking system"
                                title="Worldwide ExpressForce & shpiment tracking system" width="190" height="85" border="0"> 
			  
			  
		
			  <img class="pull-right"  src="images/banner.png" alt=""  height="185"/> 
			  
			  <h3 style="color:red;"><strong> Tracking Number:  <?php echo $row['cno']; ?></strong>
			  </h3></span>
			  
            </h2>
          </div><!-- /.col -->
        </div>
        
					

         
        <div class="row">
          <div class="col-xs-12">
            <h2 class="page-header">
			   <center> 
			       <strong style="color:green;">Swift Hawk Logistics<br>
Address: USA, UK, Canada, China, Asia and Europe<br>
Email: support@swifthawklogistics.com<br>
Company Website: https://swifthawklogistics.com</strong></center>
            </h2>
          </div><!-- /.col -->
        </div>
        
        
         <!-- info row -->
        <div class="row invoice-info">
          <div class="col-sm-4 invoice-col">
            <strong style="color:blue;">FROM (SENDER)</strong>
            <address>
              <h3><strong style="color:green;"><?php echo $row['sname']; ?></strong></h3><br>

              <b>Address:</b><?php echo $row['saddress']; ?> <br/>
			  <b>Phone No:</b><?php echo $row['sphone']; ?><br/>
			  <b>Origin Office:</b> <?php echo $row['origin']; ?>     </address>
          </div><!-- /.col -->
          <div class="col-sm-4 invoice-col">
            <strong style="color:blue;">TO (RECEIVER)</strong>
            <address>
              <h3><strong style="color:green;"><?php echo $row['rname']; ?> </strong></h3><br>
               
			  <b>Address:</b><?php echo $row['raddress']; ?><br/>
              <b>Phone:</b> <?php echo $row['rphone']; ?><br/>
			 
              <b>Destination Office:</b>&nbsp;&nbsp;United States        </address>
          </div><!-- /.col -->
          <div class="col-sm-4 invoice-col">
		  <table>
                                        	<tr>
                                                <td>
                                                    <center>
                                                        <img src="images/barcode810e.png?text=testing" alt="testing" /><br>
                                                        <strong><?php echo $row['cno']; ?></strong><br>
                                                    </center>
                                                </td>
                                                
                                            </tr>
                                        </table>
			<br/>
            <b>Order ID:</b><?php echo $row['id']; ?><br/>
            <b>Est. Delivery Date:</b><?php echo $row['expdelivdate']; ?><br/>
			<b>Payment Mode:</b> <small class="label label-danger"><i class="fa fa-money"></i><?php echo $row['payment']; ?></small><br/> 
			<b>Mode of Transport:</b><?php echo $row['mode']; ?><br/>
			
          </div><!-- /.col -->		 
        </div><!-- /.row -->

        <!-- Table row -->
        <div class="row">
          <div class="col-xs-12 table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>Qty</th>
                  <th>Type of Shipment</th>
                  <th>Product</th>
                  <th>Description</th>
                  <th>Total Cost</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td><?php echo $row['quantity']; ?></td>
                  <td><?php echo $row['shipment_type']; ?></td>
                  <td><?php echo $row['product']; ?></td>
                  <td></td>
				  <td><?php echo $row['total']; ?></td>
                </tr>               
              </tbody>
            </table>
          </div><!-- /.col -->
        </div><!-- /.row -->
		
		      
		
		<br>
		<br>
        <div class="row">
          <!-- accepted payments column -->
          <div class="col-xs-6">
            <p class="lead"><strong>Payment Methods:</strong></p>
            <img src="images/securepayment.png" alt="Methods payments" /> 
           
         
          </div>
          
          <div class="col-xs-6">
            <p class="lead"><strong>Official Stamp</strong></p>
            <img src="images/stamp1.png" alt="" height="100" />           
             
          </div>
          
          
          
          
        </div><!-- /.row -->
      </section><!-- /.content -->
    </div><!-- ./wrapper -->

    <!-- AdminLTE App -->
    <script src="js/app.min.js" type="text/javascript"></script>
  </body>

</html>
