<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Invalid Login'); parent.document.location='ind.php' </script>";
 return;
}
include("../opendb.php");
include("../test.php");
if($edit)
{
?>
<script>
 window.open('edittrc.php?tcrno=<?print $tcrno?>')
</script>
<?
 print $tcrno;
}
?>
<title>TCR Report</title>
<!--
<link rel="stylesheet" href="../style.css" type="text/css" />
-->
<style>
body,td{font-family:arial narrow;font-size:14}
th{background-color:lightsteelblue}
</style>
<CENTER>
<h2>TCR MASTER - REPORT</H2>
<table cellspacing=1 cellpadding=2 bgcolor='steelblue'>
<th>No<th>tcrno  <th> tcrdesc  <th> vehclass <th> rendate    <th> location   <th> insuco    <th> policyno <th> insudt  <th>Edit
<?
$i=1;
$res=mysqli_query($db,"select * from tcrmast  where brcode='$brcode' order by rendate");
while($row=mysqli_fetch_array($res))
{
 print "<tr bgColor='white' onMouseOver=bgColor='cccc99' onMouseOut=bgColor='white'>\n <form action='$PHP_SELF'><input type=hidden name='tcrno' value='$row[0]'>\n<td>".$i++."</td><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>".datetohtml($row[3])."</td>";
print "<td>$row[4]</td><td>$row[5]</td><td>$row[6]</td><td>".datetohtml($row[7])."</td>";
print "<td align=center>\n<input type=submit value='Edit' name='edit'></td></form></tr>";

}
?>
