<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../../ind.php'; </script>";
 return;
}
include("../../opendb.php");
include("../../test.php");
$sql="select b.cust,a.cname, b.chasis,b.engno,b.expdate,b.invno from insurco a,insurdet b where a.code=b.ins and b.brcode='$brcode'  order by b.expdate";
 $res=mysqli_query($db,$sql) or die(mysqli_error());
?>
<style>
body,td{font-family:'arial narrow';letter-spacing:1;font-size:13}
tr{background-color:e3ecd2}
th{background-color:c1d799}
.mnu{margin-left:5}
body{BACKGROUND-COLOR:fcfff1}
</style>
<font size=3><B>INSURANCE REPORT</B></FONT></legend>
<table cellspacing=2 cellpadding=4>
<th>No. <th>Inv No.<th>Name <th>Insur Co. <th>Chasis<th>Engine <th>Exp Date
<?
 $i=1;
while($row=mysqli_fetch_array($res))
{
 print "<tr><td>".$i++."</td><td align=center>$row[invno]</td><td>$row[0]</td><td>$row[1]</td>";
 print "<td><a href='editinsure.php'>$row[2]</a></td><td>$row[3]</td>".
       "<td>".datetohtml($row[4])."</td>";
}
?>
</table>
