<?php
error_reporting(0);
include("database_connection.php");
$idi=$_GET['id'];
$idd=explode('//',$idi);
$id=$idd[0];
$zone=$idd[1];
	
	 $sql="SELECT * from allocation_tbl WHERE  user_code='$id' and status='4' and zone = '$zone' order by id ASC ";
	$result=mysqli_query($conn,$sql);
	
?>
<html>
<body style='bgcolor="#E6E6FA" border="10px;solid black;" width=100%; height=100%'>
<head>

<style type="text/css">
 
table,td,tr
{
/*border:1px solid black;*/
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
}
table
{
width:80%;
}
tr	
{
/*height:50px;*/
}
div.background
 {
	 
background:#E6E6FA;
  border:5px solid black;}
   #photographs{
  	visibility:hidden;
  }
  #googlemap{
  	visibility:hidden;
  }
</style>

  </head>
<body>

<div class="background">
<br/>
<form method ="post" action=""/>
	
	<table border="1" bgcolor="white" width="1000" >
	<tr>
	<td  align="center"><font size="3"><b>CLIENT NAME</b> </font></td>		
	<td  align="center"><font size="3"><b>DATE</b> </font></td>
	<td  align="center"><font size="3"><b>TYPE</b></font> </td>
	<td  align="center"><font size="3"><b>APPLICATION NO</b></font> </td>	
	<td  align="center"><font size="3"><b>CUSTOMER NAME</b> </font></td>
	<td  align="center"><font size="3"><b>ADRRESS</b></font> </td>
	<td  align="center"><font size="3"><b>ZONE</b> </font></td>
	<td  align="center"><font size="3"><b>FE NAME</b> </font></td>
	<td  align="center"><font size="3"><b>ALLOCATED BY</b> </font></td>
		
	</tr>
	<?php
	while($data=mysqli_fetch_array($result))
	{
	$user_code=$data['user_code'];
	$sqlfe="select first_name,last_name,mobile,zone,location from user_tbl where user_code='$user_code' ";
	$resultuser=mysqli_query($conn,$sqlfe);
	$datauser=mysqli_fetch_array($resultuser);
	$fename=strtoupper($datauser['first_name'].' '.$datauser['last_name']);
	?>
	<tr>	
	<td  align="center"><font size="3"><b><?php echo $data['bank_name'] ; ?></b></font> </td>
	<td  align="center"><font size="3"><b><?php echo $data['dump_date'] ; ?></b> </font></td>
	<td  align="center"><font size="3"><b><?php echo $data['type'] ; ?></b></font> </td>
	<td  align="center"><font size="3"><b><?php echo $data['app_no'] ; ?></b></font> </td>
	<td  align="center"><font size="3"><b><?php echo $data['name'] ; ?></b></font> </td>
	<td  align="center"><font size="3"><b><?php echo $data['address1'] ; ?></b> </font></td>
	<td  align="center"><font size="3"><b><?php echo $data['zone'] ; ?></b> </font></td>
	<td  align="center"><font size="3"><b><?php echo $fename ; ?></b> </font></td>			
	<td  align="center"><font size="3"><b><?php echo $data['initiated_by'] ; ?></b></font> </td>
	
	</tr>
	<?php } ?>
	</table>
	</form>

</body>


