<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Xpress</title>
    <script src=" rightclick_deactive.js"></script> 
    <script type="text/javascript" src="scripts/jquery-latest.js"></script>
	<link type="text/css" href="includes/style1.css" rel="stylesheet" />
      <link type="text/css" href="css/form.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>

    <script type="text/javascript">
        $(function() {
          if ($.browser.msie && $.browser.version.substr(0,1)<7)
          {
			$('li').has('ul').mouseover(function(){
				$(this).children('ul').show();
				}).mouseout(function(){
				$(this).children('ul').hide();
				})
          }
        });        
    </script>
	<script type="text/javascript">
    $(document).ready(function() {
        var cont_left = $("#container").position().left;
        $("a img").hover(function() {
            // hover in
            //$(this).parent().parent().css("z-index", 1);
            $(this).animate({
               height: "110",
               width: "110",
              
            }, "fast");
        }, function() {
            // hover out
         //   $(this).parent().parent().css("z-index", 0);
            $(this).animate({
                height: "80",
                width: "80",
                
            }, "fast");
        });
        
        $(".img").each(function(index) {
            var left = (index * 160) + cont_left;
            $(this).css("left", left + "px");
        });
    });




    </script>

<!-- js code below for active enter with textfield-->


<script type="text/javascript">

/***********************************************
* Disable "Enter" key in Form script
* This notice must stay intact for use
***********************************************/
                
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      

</script>


<style>
.cont
	{


       background-color:#3b5998;

	//background:url(images/bg-inner.jpg) #e9e0c3 repeat-x;
  	width: 100%;position: absolute ;
	height:99%;
    	/* Optional - just for DIV)*/
    	//border: solid 1px #000000;
	-moz-box-shadow: 0px 5px 5px #888;
	-webkit-box-shadow: 0px 5px 5px #888;
	box-shadow: 0px 5px 10px #888;
    
	}
</style>


<link href="css/form.css" type="text/css" rel="stylesheet" media="screen"  />
<body bgcolor="#0033FF">
<div class='cont'>

<?
session_start();
include("opendb.php");
include("test.php");
include('includes/top.php');



print "<center>";
?>

<script>
function valid()
{
 if(document.f1.labname.value.length<=0)
 { alert ('Invalid Labour.'); return false;}
 if(confirm('Do you want to save?'))
  return true;
 else
  return false;
}
function popwar()
{
 if(document.f1.war.selectedIndex==2)
   window.open('popwar.php',menubar=false,resizable=false);
}
cellspacing=1 cellpadding=5
</script>

<script type="text/javascript">

/***********************************************
* Disable "Enter" key in Form script- By Nurul Fadilah(nurul@REMOVETHISvolmedia.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
                
function handleEnter (field, event) {
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 
		else
		return true;
	}      

</script>


<center>
<?
$sql=mysqli_query($db,"select * from labourmaster where labcode='$code' and brcode='$brcode'");
$row=mysqli_fetch_array($sql);
$lab=$row[3];
$tot=$row[8];

?>
<form name='f1' action='<?print $PHP_SELF?>' onSubmit="return valid()"> 
<input type=hidden name='mtype' value='WH'>
<table cellspacing=1 cellpadding=5 border=2 class="form">
<th colspan=6 ><font color='black'><h3>LABOUR DETAILS</h3>
Master Entry</font></th>
<tr>
  <td >LabourName</td><td><input type=text name='labname' value='<? print $lab;?>' onKeyPress="return handleEnter(this, event)"></td>
 <td>Amount </td><td><input type=text name='amt' onKeyPress="return handleEnter(this, event)" value='<? print $tot;?>'>
<input type='hidden' name='lbcode' value='<? print $code;?>'></td></tr>

</tr>

</table>

</tr>


<br>

<tr><td colspan=8 align=center bgcolor='steelblue'><input type=submit name='save' value='Save'></td></tr>
</table></form>
<?
if($save)
{
 
//$code=substr($labname,0,3).date(ymds);
//$code=str_replace(' ','-',$code);

$sql1="update labourmaster set labname='$labname',totallcv='$amt' where labcode='$lbcode'";

mysqli_query($db,$sql1)or die('sq1 err'.mysqli_error($db));


//******************************888888888888*******************88888888





echo "<meta http-equiv='refresh' content='.1;url=labourmast.php'>";
}

?>

