<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../index.html'; </script>";
 return;
}

include("../opendb.php");
include("../test.php");
$tbl="spareinvwar".$brcode;
?>
<link rel="stylesheet" href="../style.css" type="text/css" />
<style>
th{background-color:lightsteelblue;color:black}
//tr{background-color:white}
</style>
<center>
<?
$re=mysqli_query($db,"select * from $tbl where trans='n'");
if(mysqli_num_rows($re)<=0)
{
 print "Record does not exist";
 return ;
}

if(mysqli_num_rows($re)>0)
{
print "<font size=3>WARRANTY PENDING REPORT <br>As on ".date("d-m-Y")."</FONT>";
print "<table cellspacing=1 cellpadding=2 bgcolor='steelblue'>";
print "<th>No <th>Warno <th>Part Name <th>PSN Qty <th>Telc Qty <th>Price <th>Date";
 $i=1;
 while($row=mysqli_fetch_array($re))
 {
   print "<tr bgcolor=white><td>".$i++."</td><td>$row[warno]</td><td>$row[partname]</td>";
   print "<td align=right>$row[psnqty]</td><td align=right>$row[telcqty]</td>";
   print "<td align=right>$row[price]</td><td align=right>$row[date]</td>";
 }
}
?>
</table>
