<? 

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");

function line()
{
 print "<tr><td colspan=12>";
 for($k=0;$k<=200;$k++)
 print "<b>-</b>";
}

$result=mysqli_query($db,"select * from scert where invno='$invno' and brcode='$brcode'");
$row=mysqli_fetch_array($result);

$f=mysqli_query($db,"select * from veh_master where mcode='$row[model_code]' and brcode='$brcode'")or die(mysqli_error());
 $row1=mysqli_fetch_array($f);


$re=mysqli_query($db,"select * from branch where brcode='$brcode'");
$brow=mysqli_fetch_array($re);

?>

<style>
td,body{font-family:arial;background-color:white;font-size:12}
</style>
<table width=70% BORDER=0>
<tr>
<?
$brname=explode(',',$branch);
?>

</td>
<tr><td align=center COLSPAN=2><img src='../img/psn-logo.jpg'><span style={letter-spacing:8}><font size=4><b><?print STRTOUPPER($brname[0])?></font></b> </span><img src='../img/pic-004.jpg'> <br>AUTHORISED DEALER FOR EICHER VEHICLES<BR>
Regd.Off. 35/189, NH 47, PALARIVATTOM, KOCHIN, PIN.682 025<BR>
<?Print $brow[braddr].'<br>'.$brow[brcity].',Phone:'.$brow[brphone]?>
</td></tr>

<?
line();
print "<br>";
?>

</span></TD></TR>
<tr><td align=center COLSPAN=2><span style={letter-spacing:5}> <font size=4>
<?
print "SALE CERTIFICATE ";
?>
</TABLE>

<?

$r=mysqli_query($db,"select * from cust_master where code='$row[cust]' and branch='$brcode'");
$cus_row=mysqli_fetch_array($r);
?>
<table width=100%>

<tr><td><font size=3 ALIGN=Left><B>FORM-21</B></td><td></td><td><font size=3><B> No. <?print $row[invno]?></B></font></td></tr>
<tr><td colspan=3 <font size=3 ALIGN=Left><B>(see Rule 47(a) & (d)</B></font></td></tr>

</TABLE>

<?

line();
print "<br>";


print "Certified that <b><font size=3> $row1[sconfig]</font></b> has been delivered by us to <br>";
print "Address (Permanent) : <br>";
?>
<blockquote>
<? print $cus_row[1].'<br>'.str_replace(',','<br>',$cus_row[2]).'<br>'.$cus_row[3].''.$cus_row[4].' Pin:'.$cus_row[pin].'<br>'?>

</blockquote>

<?
print "Address (Temporary) : <br>";

if($cus_row[addrtmp]=='')
{

 print "--------do--------";

}
else

{
?>
<blockquote>
<? print $cus_row[19]?>
</blockquote>
<?
}

?>
</table>
<br><br>
The Vehicle is held under agreement of hire purchase/lease/hypothecation:
<blockquote><b>
<?
 $fff=mysqli_query($db,"select city from fin_master where finname='$row[fin]' and branch='$brcode'")or die(mysqli_error());
 $fi_row=mysqli_fetch_row($fff);

 

print $row[fin].','.$fi_row[0]?>
</b></blockquote>
<?
line();
print "<br>";
?>

The details of the Vehicle are given

<table border=0 width=70%>
<tr><td>1.  Class of Vehicle</TD><TD>: <font size=2><?print $row1[clas]?></td></tr>
<tr><td>2.  Makers name</TD><TD>:<font size=2> <?print $row1[mnam]?></td></tr>
<tr><td>3.  Chassis number</TD><TD>:<font size=2> <?print $row[chasis]?></td></tr>
<tr><td>4.  Engine number</TD><TD>:<font size=2> <?print $row[engno]?></td></tr>
<tr><td>5.  Horse power/cubic capacity</TD><TD>:<font size=2> <?print $row1[hpower]?></td></tr>
<tr><td>6.  Fuel used</TD><TD>:<font size=2> <?print $row1[fuel]?></td></tr>
<tr><td>7.  Number of cylinders</TD><TD>:<font size=2> <?print $row1[cyl]?></td></tr>
<tr><td>8.  Month and Year of manufacture</TD><TD>:<font size=2> <?print $row[mfyear]?></td></tr>
<tr><td>9.  Seating capacity (including driver)</TD><TD>:<font size=2> <?print $row1[capa]?></td></tr>
<tr><td>10. Unladen weight</TD><TD>:<font size=2> <?print $row1[uweight]?></td></tr>
<tr><td>11. Maximum axle weight and - Fro</TD><TD>:<font size=2> <?print $row1[tyrefr]?></td></tr>
<tr><td><blockquote>Number and description of tyres</blockquote></TD><TD>:<font size=2> <?print $row1[tyrerr]?></td></tr>
<tr><td><blockquote>(In case of transport Vehicle)</blockquote></TD><TD>:<font size=2> </td></tr>
<tr><td><blockquote>(a)Front axle</blockquote></TD><TD>:<font size=2> <?print $row1[axlefr]?></td></tr>
<tr><td><blockquote>(b)Rear axle</blockquote></TD><TD>:<font size=2> <?print $row1[axlerr]?></td></tr>
<tr><td><blockquote>(c)Any other axle</blockquote></TD><TD>:<font size=2> <?print $row1[axleoth]?></td></tr>
<tr><td><blockquote>(d)Tandem axle</blockquote></TD><TD>:<font size=2> <?print $row1[axletan]?></td></tr>

<tr><td>12. Colour/colours of body</TD><TD>:<font size=2> <?print $row1[cbody]?></td></tr>
<tr><td>13. Gross vehicle weight</TD><TD>:<font size=2> <?print $row1[gvw]?></td></tr>
<tr><td>14. Type of Body</TD><TD>:<font size=2> <?print $row1[tbody]?></td></tr>
<tr><td>15. WheelBase</TD><TD>:<font size=2> <?print $row1[wbase]?></td></tr>
</TABLE>
<?
line();
print "<br>";
?>
<table width=80%>
<tr><td> <font size=3><B>Date: <?print datetohtml($row[invdate])?></B></font></td><td align=right> For <?print $brname[0]?></td></tr>
<tr><td colspan=3 ALIGN=right><BR><BR><BR>Authorised Signatory</td></tr>
<tr><td colspan=3 align=center><b>PSN - 88 YEARS OF REPUTATION & TRUST</TD></TR>
</TABLE>
<BR>&nbsp;
