<?
session_start();
include("opendb.php");
$result1=mysqli_query($db,"select loc from depots");
?>
<table border=0>
<tr><td align=center>
<font face=verdana size=3>
THE KOZHIKODE DIST.RUBBER MARKETING SOCIETY LTD.<BR>
Stock report as on <?print date("d-M-Y",time());?>
</tr></td>
<tr><td>
<?
while($row2=mysqli_fetch_row($result1))
{
$result=mysqli_query($db,"select * from stock where depot='$row2[0]' order by item");
?>
<font face=verdana size=3>Current Stock at <b><?print $row2[0]?> </b></font>
<table border=0 cellspacing=1 cellpadding=1 bgcolor=black width=>
<tr bgcolor='white'><td width=5><center><b>No.</td><td width=300><center><b>Item Name </td><td><center><b>Quantity(Kg.)</td></tr>
<?
 $i=1;
 while($row=mysqli_fetch_row($result))
 {
   print "<tr bgcolor='white'<td>".$i++."</td><td>$row[0]</td><td align=right>$row[2]</td></tr>";
 }
print "</tr></td> </table> <br>";
}
?>

</tr></td></table>
