<?
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");
//$sql="select empcode from empmaster where doj<='2010-07-31'  and doret <'2010-08-01' 
//and doret>'0000-00-00' and brcode='aut141' and br!='AMPL ERNAKULAM' order by doj,empname";


//$sql=" select empcode from empmaster where doj<='2010-07-31'  and doret not in 
//(select doret from empmaster where  doret<'2010-08-01' and doret>'0000-00-00' and brcode='aut141' 
//and br!='AMPL ERNAKULAM') and brcode='aut141' and br!='AMPL ERNAKULAM' order by doj,empname";

$sql="select empcode,empname,doj,doret from empmaster where doj>'2010-07-31'  and brcode='aut141' 
and br!='AMPL ERNAKULAM' order by doj,empname";
$re=mysqli_query($db,$sql)or die(mysqli_error());

$i=287;
print "<table border=1>";
while($row=mysqli_fetch_array($re))
 {
  $sql="update empmaster set empid='$i' where empcode='$row[0]' and brcode='$brcode'";
print "<tr><td>".$sql."</td></tr> ";
  mysqli_query($db,$sql)or die(mysqli_error());
 $i++;

}



?>
<style>

	td,th,body{font-size:14;font-family:'arial narrow';letter-spacing:1}
</style>
