<?
session_start();
include("opendb.php");
include("test.php");

$re=mysqli_query($db,"select * from workstat_master where id='$code'");
$rerow=mysqli_fetch_array($re);

if($save)
{

$sql="update workstat_master set work_status='$stat' where id='$code'";
mysqli_query($db,$sql) or die('Insert Err:'.mysqli_error($db));

print "<script> opener.document.location='work_status.php'; window.close()</script>";
return;
}
//$re=mysqli_query($db,"select * from configmaster");
//$row=mysqli_fetch_array($re);
?>
<link rel="stylesheet" href="../style.css" type="text/css" />
<style>
th{background-color:steelblue;color:white}
</style>
<script>
this.resizeTo(750,170);
function valid()
{
 
 /*if(document.f1.tax.value.length<=0)
 {
   alert("Invalid Tax.");
   document.f1.tax.focus();
   return false;
 }*/

}
</script>

<center>
<table cellspacing=1 cellpadding=1 bgcolor=black>
<tr><td align=center bgcolor='white'>
<form name='f1' action='<?print $PHP_SELF?>' method='post' onSubmit="return valid()">
<input type=hidden name=code value='<?print $code?>'>
<table cellspacing=1 cellpadding=3 width='350'>
<th colspan=2><font size=3>EDIT WORKING STATUS MASTER</th>
<tr><td>Working status</td><td><input type=text name='stat'  size=20 value='<?print $rerow[work_status]?>'  ></td>
    </tr>


<th colspan=2><input type=submit value='Save' name='save'> <input type=button value='Cancel' onClick=window.close()></td></tr>
</table>
</form>
</td></tr>
</table>
