<?php
	include "db_connection/db_connection.php";
	include "config/config.php";
	
	if($_SESSION['admin_login_id'] == '')
	{
		echo "<script>window.location='index.php';</script>";
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Courier Address</title>
<style>
    body {
        height: 842px;
        width: 960px;
        top: 400px;
        /* to centre page on screen*/
        margin-left: auto;
        margin-right: auto;
    }
    </style>
</head>

<body>
<?php
	$bill_id	=	base64_decode(base64_decode(base64_decode($_GET['bill_id']))); 

	$SLCT_b = "SELECT * FROM billing_det WHERE billing_det_id = '$bill_id'";
	$QURY_b = mysqli_query($connect,$SLCT_b);
	$FTCH_b = mysqli_fetch_object($QURY_b);	
	
	$cur_amt = 	$FTCH_b->courier_amt;
	$tot_amt_lst =  $FTCH_b->total_bill_amt;
	if($FTCH_b->round_off<0)
	{
		$round_off	 =  str_replace("-","(-)",$FTCH_b->round_off);
	}
	else
	{
		$round_off	 =  $FTCH_b->round_off;
	}
	

	$SLCT_p = "SELECT * FROM party_det WHERE party_det_id = '$FTCH_b->party_det_id'";
	$QURY_p = mysqli_query($connect,$SLCT_p);
	$FTCH_p = mysqli_fetch_object($QURY_p);

?>
<table width="700" cellpadding="0" cellspacing="0" border="1" style="margin-top:0px; border-collapse: collapse;border: 0.1px thin black;vertical-align: middle" width="100%" align="center">
	<tr>
      
      <td width="50%" valign="top" style="padding-left:10px; padding-top:10px;">From:
      	<div align="center">
        	<h2><font style="font-family: PaqueteSSK; font-size:26px;">Thahaayaa</font>
        	<font style="font-size:13px; font-family: Logan;">Crea-Dons. . .  </font></h2> 
      	</div>                
      	<div align="center" style="margin-top:-15px;">
      		<p><!--(Cad\Cam solutions & master models)<br/>-->243A, Subramaniapuram,<br>Thirumoothi Layout, <br/>R.S.Puram Coimbatore-641002.<br> Ph No's : 9843214151, 0422-4351080</p>
      	</div>
      </td>
      <td width="50%" valign="top" style="padding-left:10px; padding-top:10px;">To:
      	<div align="center">      	
      	<h2><font style="font-size:26px;"><?php echo $FTCH_p->cmp_name; ?></p></font></h2>
        </div>                
      	<div align="center" style="margin-top:-15px;"><p><?php echo nl2br($FTCH_p->cour_addr); ?><br>Mobile : <?php echo $FTCH_p->con_no_1; if($FTCH_p->con_ln_no_1!='') { ?><br />Ph No : <?php echo $FTCH_p->con_ln_no_1; } ?></p></div>
      </td>
   </tr>
</table> 
</body>
</html>
