<?php
 session_start();
// if(!$_SESSION['username']){  
  
//     header("Location: ../index.php");
// } 

require_once '../db.php';
//$cno = $_SESSION['cno'];

$last_id = $_SESSION['id'];
$sql = "SELECT * FROM parcel WHERE id = $last_id";
$result = mysqli_query($db, $sql);
$row = mysqli_fetch_assoc($result);


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	
	
	<title></title>
	
	<link rel='stylesheet' type='text/css' href='css/style.css' />
	<link rel='stylesheet' type='text/css' href='css/print.css' media="print" />
	<script type='text/javascript' src='js/jquery-1.3.2.min.js'></script>
	<script type='text/javascript' src='js/example.js'></script>
</head>

<body>

	<div id="page-wrap">

		<textarea id="header">Receipt</textarea>
		
		<div id="identity">
		
		<div id="logo">

              <div id="logoctr">
                <a href="javascript:;" id="change-logo" title="Change logo">Change Logo</a>
                <a href="javascript:;" id="save-logo" title="Save changes">Save</a>
                |
                <a href="javascript:;" id="delete-logo" title="Delete logo">Delete Logo</a>
                <a href="javascript:;" id="cancel-logo" title="Cancel changes">Cancel</a>
              </div>

              <div id="logohelp">
                <input id="imageloc" type="text" size="50" value="" /><br />
                (max width: 540px, max height: 100px)
              </div>
              <img id="image" src="logo.png" alt="logo" />
            </div>

            <textarea id="address">Prime Cargo Express
123 Appleseed Street
Appleville, WI 53719

Phone: +1 (213) 314-4910</textarea>

            
		
		</div>
		
		<div style="clear:both"></div>
		
		<p id="tc">TRACKING NUMBER: <?php echo $row['cno']; ?>
		<h4>FROM(SENDER)</h4>
		<div class="row">

<table>
<tr>
		<th>Sender's Name: <?php echo $row['sname']; ?></th>
		<th>ORIGIN</th>
		<th>DESTINATION</th>
	</tr>
	<tr>
<td>Address: <?php echo $row['saddress']; ?></td>
<td><?php echo $row['origin']; ?></td>
<td><?php echo $row['destination']; ?></td>
	</tr>
	<tr>
<td>Postcode: 10011</td>
<td>Phone No: 239 038 5654</td>
<td></td>
	</tr>
	
</table>
		</div>

		<h4>TO(RECEIVER)</h4>
		<div class="row">

<table>
<tr>
		<th>Receiver's Name: <?php echo $row['rname']; ?></th>
		<th>ORIGIN</th>
		<th>DESTINATION</th>
	</tr>
	<tr>
<td>Address: <?php echo $row['raddress']; ?></td>
<td>USA</td>
<td>Romania</td>
	</tr>
	<tr>
<td>Email: <?php echo $row['remail']; ?></td>

	</tr>
	
</table>
		</div>
<h4>ITEM DESCRIPTION</h4>
		<div class="row">

<table>
<tr>
		<th>Product Name</th>
		<th>Size and Weight</th>
		<th>Shipment</th>
	</tr>
	<tr>
<td><?php echo $row['product']; ?></td>
<td><?php echo $row['weight']; ?></td>
<td>$5,500</td>
	</tr>
	
	<tr>
<td>Delivery Destination: <?php echo $row['destination']; ?></td>
<td>Cosignment No: <?php echo $row['cno']; ?></td>
	</tr>
</table>
		</div>
		<table id="items">
		
		  <tr>
		      <th>Sender's Authorization & Signature</th>
		      <th>Total Charges:<span><?php echo $row['charge']; ?></span></th>
		      
		  </tr>
		  
		  <tr class="item-row">
		      <td>I/We agree that Prime Cargo Express standard terms apply to this shipment and limit Prime Cargo Express liabilty. The warsaw convention may also apply (see reverse). I/We understand that Prime Cargo Express transport diplomatic goods</td>
		      <td>Currency Code: USD</td>
		  </tr>
		  <tr>
		  	<td></td>
		  	<td class="colored">Packaged by Prime Cargo Express</td>
		  </tr>
		
		</table>
		<img src="download.png" id="dispatched">
		<img src="signature.png" id="signature">

		<p>Sign:.............................................................</p>
		
		<div id="terms">
		  <h5>Terms</h5>
		  <textarea>NET 30 Days. Finance Charge of 1.5% will be made on unpaid balances after 30 days.</textarea>
		</div>
	
	</div>
</body>

</html>