<?php
	include("../session.php");
	include("../connect.php");

	$user=$_SESSION['admin'];
	//$id=$_GET["id"];
	$id=$_GET["number"];
	$agent=$_GET["agent"];
?>

<?php

$query=mysql_query("select * from licensereport where id='$id'");
$display=mysql_fetch_array($query);
$cid = $display['companyID'];
$date = $display['updateDate'];
$time = $display['updateTime'];
$oldExpire = $display['oldExpire'];
$newExpire = $display['newExpire'];
$updateYear = $display['updateYear'];
$payment = $display['payment'];
$type = $display['paymentType'];

$query2=mysql_query("select * from company where id='$cid'");
$display2=mysql_fetch_array($query2);
$name = $display2['cName'];
$address = $display2['address'];
$code = $display2['postcode'];
$country = $display2['country'];
$cPerson = $display2['cPerson'];
?>
<html>
<head>
<style>
body{
	font-family:calibri;
}
</style>
</head>
<body>
	<table align=center width=650 border=0 style="background-color:#E8E8E8;">
	<tr>
		<td align=center>
		<!----------------------Header-------------------->
		<table width=100% border=0 cellspacing=0 >
		<tr>
			<td align=center>Company Header<br/>shakeitmama.com<hr><br/>
		<table width=100%>
		<tr height=30>
			<td>Transaction ID :</td>
			<td><?php echo $id;?></td>
			<td align=right>Time :<?php echo $date." ".$time; ?></td>
			</tr>
		<tr>
			<td valign=top>To :</td><td><?php echo $name;?><br>
			<?php echo $address;?><br/>
			<?php echo $code;?><br/>
			<?php echo $country;?><br/>
			</td>
			</tr>
		<tr>
			<td>Person In Charge :</td><td><?php echo $cPerson;?></td>
			</tr>
		<tr>
			<td>Receipt from :</td><td><?php echo $user;?></td>
			</tr>
		</table>
			</td>
		</tr>
		</table>
		<!---------------------end header-------------------------->
		</td>
		</tr>
	<tr>
		<td>
		<table width=100% border=1 cellspacing=0>
		<tr>
			<td width=50>No.</td>
			<td width=450>Description</td>
			<td>Price</td>
			</tr>
		<tr height=100>
			<td valign=top>1.</td>
			<td valign=top>New register license valid from <b><?php echo $oldExpire;?></b> to 
							<b><?php echo $newExpire; ?></b>
							<br/>@Update Year: <?php echo $updateYear;?></td>
			<td valign=top>RM <?php echo $payment;?></td>
			</tr>
		<tr height=50>
			<td colspan=2 align=right>Total: &nbsp;&nbsp;</td>
			<td>RM <?php echo $payment;?></td>
			</tr>
		</table>
		<i>*This is computer receipt, no require of signature.</i><br/><br/>
		<center><a href="javascript:window.print()">Print</a>&nbsp;&nbsp;&nbsp;
		<a href="<?php echo "viewCompany.php";?>">Back</a></center>
		</td>
		</tr>
	</table>


</body>
</html>