
<?
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");
?>
<style>
 td{color:#455342;font-family:helvetica;font-size:12}
 th{color:white;font-family:helvetica;font-size:12}
</style>
<form action='<?print $PHP_SELF?>'>
<td>Pswd <input type=password name='pswd'></td>
</tr>
<tr><td colspan=2 align=center><input type=submit name='show' value='Show'>
</td></tr>
</table>
</form>



<table border=0  bgcolor='455342' cellspacing=1 cellpadding=3>





<?
if($show)
  {

$dt=$y.'-'.$m.'-'.$d;
$sql="select * from empmaster where brcode='$brcode' and doret='0000-00-00' order by doj";

$res=mysqli_query($db,$sql) or die('Err:'.mysqli_error());
print "<tr bgcolor='#6B852C'><th>Name<th>Date of Join<th>Date of Birth<th>Date of Conf.<th>Basic<th>DA<th>Total<th>Branch<th>Design.<br><th> </tr>";
 print "<td></td>";
while($row=mysqli_fetch_array($res))

{

$sqle="select basic,da from emp_pay where empcode='$row[empcode]' order by ondate desc limit 1";
$rese=mysqli_query($db,$sqle) or die('Err:'.mysqli_error());
$wee=mysqli_fetch_array($rese);
$tp=$wee[basic]+$wee[da];
$dy=$dt-$row[doj];
//print $dt;
//print $row[doj];
//print $dy;

if($pswd=='a')
{
 print "<tr bgcolor=white><td>$row[empname]</td><td>".datetohtml($row[doj])."</td><td>".datetohtml($row[dob])."</td><td>".datetohtml($row[doconf])."</td></td>";
 print "<td>$wee[basic]</td><td>$wee[da]</td><td>$tp</td><td>$row[br]</td><td>$row[design]</td</tr>";
}
//print "<td align=center>$row[empname]</td><td  align=center>$row[doj]</td><td align=right>$row[doconf]</td><td align=right>$row[doret]</td><td align=right>$wee[basic]</td><td align=right>$wee[ta]</td>";


}

}


?>

