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

<head>
<style>
body,td{font-family:'arial narrow';letter-spacing:1;font-size:13}
th{background-color:c1d799}
.mnu{margin-left:5}
body{BACKGROUND-COLOR:fcfff1}
</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>
<?
if($show)
  {
$sql="select * from empmaster where brcode='$brcode'  and doret!='0000-00-00' order by doret desc";
$retre=mysqli_query($db,$sql);
print "<hr><table style={font-size:.91em} width=100%>";
print "<tr><td colspan=12 align=center><b>RESIGNED/RETIRED STAFF</TD></TR>";
print"<th>No <th>Name <th>ID <th>Branch <th>Division <th>Designation<th>Mobile <th>Resi<th>DOJ ";
print "<th>DoR <th colspan=2 width=50>Action";
$i=1;
if($pswd=='a')
{
while($retrow=mysqli_fetch_array($retre))
{
$spdate=explode('-',$row[doconf]);
$chdt=$spdate[1]+$spdate[2]+$spdate[0];

 print "<form action='editemp.php'><input type=hidden name=code value='$retrow[empcode]'>";
 print "<tr bgColor='e3ecd2' onMouseOver=bgColor='gold' onMouseOut=bgColor='e3ecd2'><td>".$i++."</td><td>";
 if($chdt>0)
  print "<font color=red><b>*</b> </font>";
print strtoupper($retrow[empname])."</td><td><center>$retrow[empid]</td>".
  "<td align=center>$retrow[br]</td><td>$retrow[divi]</td><td>$retrow[design]</td>";
 print "<td>$retrow[mob]</td><td>$retrow[resph]</td><td>".datetohtml($retrow[doj])."</td><td>".datetohtml($retrow[doret])."</td>";
 print "<td align=center><input type=submit value='Edit'> </td></tr></form>";
}
}
print "</table>";
}
?>
<!--
<td><input type=button value='Del' onClick=javascript:del('$retrow[empcode]')> </td>
-->
