<?
ob_start();
session_start();
if(isset($_SESSION['ses_name']))
{
$user=$_SESSION['ses_name'];
}else{
header("location:index.php");
}
$tyrenum_veh='';

include("include/config.php");
require_once "include/Database_functions.php";
$sqlObj=new sqlclass();

//$tablename='cf_client';

		if(isset($_POST['cilentsubmit'])){
		
			if(isset($_POST['fromdate'])){
			$from_date=addslashes($_POST['fromdate']);
			$from_date = date('Y-m-d', strtotime($from_date));
			}
			
			if(isset($_POST['pack_code'])){
			$packcode=addslashes($_POST['pack_code']);
			}
			
			if(isset($_POST['qty_total'])){
			$packageqty=addslashes($_POST['qty_total']);
			}
			
			$sqlagmark = mysql_query("select * from cf_agmark");
			$rwagmark = mysql_fetch_array($sqlagmark);
			$agmarkno = $rwagmark['agmark_no'];
			$balagmark = $agmarkno - $packageqty;
			$sqlagmark = mysql_query("update cf_agmark set agmark_no = $balagmark");
			
			$addate = date('Y-m-d');
			//$packageqty = '2000';
			$sql2 = mysql_query("insert into cf_package (package_code,package_qty,package_date,add_date) values ('$packcode','$packageqty','$from_date','$addate')");			
			$lastid = mysql_insert_id();
			
			
			//$sqlcilent = mysql_query("select * from cf_oilpurchase where pur_com_kg = '$clientids' order by client_sub_id desc limit 0,1");
			//$rw1 = mysql_fetch_array($sqlcilent);
			
			
			$cnt = $_POST['totcnt'];
			$tot_qty=0;
			for($i=1;$i<=$cnt;$i++)
			{
				
				if(isset($_POST['branch'.$i])){
				$branchid=addslashes($_POST['branch'.$i]);
				}
				
				if(isset($_POST['literqty'.$i])){
				$literid=addslashes($_POST['literqty'.$i]);
				}
				
				if(isset($_POST['packqty'.$i])){
				$packqty=addslashes($_POST['packqty'.$i]);
				}
				
				if(isset($_POST['boxqty'.$i])){
				$boxqty=addslashes($_POST['boxqty'.$i]);
				}
				
				if(isset($_POST['kg_liter'.$i])){
				$kgliter=addslashes($_POST['kg_liter'.$i]);
				}
				
				//$qtytotal = $packqty*$kgliter;
				$tot_qty += $packqty*$kgliter;
				
				$sqlsku = mysql_query("select * from cf_sku_stock where brnd_id = '$branchid' and ltre_id = '$literid'");
				$rwsku = mysql_fetch_array($sqlsku);
				if(mysql_num_rows($sqlsku) == 0)
				{
					mysql_query("insert into cf_sku_stock (brnd_id,ltre_id,packqty,packbox,sku_adddate) values ('$branchid','$literid','$packqty','$boxqty','$addate')");
				}
				else
				{
					$skupackqty = $rwsku['packqty'];
					$skupackbox = $rwsku['packbox'];
					$updtpackqty = $skupackqty + $packqty;
					$updtpackbox = $skupackbox + $boxqty;
					//echo "update cf_sku_stock set packqty = '$updtpackqty',packbox='$updtpackbox' where brnd_id = '$branchid' and ltre_id = '$literid'";
					mysql_query("update cf_sku_stock set packqty = '$updtpackqty',packbox='$updtpackbox',sku_adddate='$addate' where brnd_id = '$branchid' and ltre_id = '$literid'");
				}
				
								
				$sql2 = mysql_query("insert into cf_package_sub (pack_id,brnch_id,litre_id,pack_qty,pack_box,package_date) values ('$lastid','$branchid','$literid','$packqty','$boxqty','$addate')");
				
				$sqlpack = mysql_query("select * from cf_packet_qty");
				$rwpack = mysql_fetch_array($sqlpack);
				$balpackqty = $rwpack['packqty'];
				
							
				$sqlpk = mysql_query("select * from cf_packet where packet_lt = $literid");
				$rwpk = mysql_fetch_array($sqlpk);
				$qtypack = $rwpk['packet_qty'];
				
				$getpack = round($packqty/$qtypack,2);				
				
				$remainpacket = $balpackqty-$getpack;
				mysql_query("update cf_packet_qty set packqty = '$remainpacket'");
					
				}
			mysql_query("update cf_stock set `stock_oil`=`stock_oil`-$tot_qty");
			
			header("location:package-list.php");
}
			
			
			
			
			
$literqty='';

?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>OIL FILL</title>
<link href="css/styles.css" rel="stylesheet"  />

<!--<script src="js/driverdrop.js"></script>-->
<script src="js/addmorepackage.js"></script>
<link type="text/css" href="css_date/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script type='text/javascript' src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<script type='text/javascript' src="js/jquery.autocomplete.js"></script>
<link rel="stylesheet" type="text/css" href="js/jquery.autocomplete.css" />

<script type="text/javascript" src="scripts_date/jquery-calendar-1.7.2.js"></script>

<script>
$(document).ready(function(){
$('#fromdate').datepicker({
showOn: 'both',
buttonImage: 'icons_date/calendar.gif',
buttonImageOnly: true,
changeMonth: true,
changeYear: true,
dateFormat: 'dd-mm-yy'
});
});

/*function drivername()
{
	alert(document.frmname.clientid.value);
}*/



</script>

<script type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
function validation(){

if(document.getElementById('fromdate').value==''){
alert("Enter the Date");
document.getElementById('fromdate').focus();
return false;
}


var cnt = document.getElementById('totcntw').value;

for(i=1;i<=cnt;i++){

	if(document.getElementById('branch'+i).value==''){
			alert("Select the Brand");
			document.getElementById('branch'+i).focus();
			return false;
	}
			
	if(document.getElementById('literqty'+i).value==''){
		alert("Enter the liter");
		document.getElementById('literqty'+i).focus();
		return false;
	}
			
	if(document.getElementById('packqty'+i).value==''){
		alert("Enter the Quantity");
		document.getElementById('packqty'+i).focus();
		return false;
	}
	
	if(document.getElementById('boxqty'+i).value==''){
		alert("Enter the Box Quantity");
		document.getElementById('boxqty'+i).focus();
		return false;
	}
	
		
}

}
</script>

<script>
function showLiter(str,i)
{

var xmlhttp;    
if (str=="")
  {
  document.getElementById("txtLiter"+i).innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
	   document.getElementById("txtLiter"+i).innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","package_ajax.php?str="+str+"&cnt="+i,true);
xmlhttp.send();
}





function sel(val,value)
{
var strURL="ajax/getVal.php?name="+value;
	var req = getXMLHTTP();
   if (req)
   {
     req.onreadystatechange = function()
     {
		 
			if ((req.readyState == 0)||(req.readyState == 1)||(req.readyState == 2)||(req.readyState == 3))
      		{
			//document.getElementById('order').innerHTML='<div align="center"><img src="'+path+'images/ajax_loader.gif"/></div>';
			//document.getElementById('Cakeorder').innerHTML='<div align="center"><img src="'+path+'images/ajax_loader.gif"/></div>';
			}
		 
		 
      if (req.readyState == 4)
      {
	 // only if "OK"
	 	if (req.status == 200)
	 	{ 
		//alert(req.responseText);
		var x=req.responseText;
		x=x.split('@@');
		//alert(x);
		
		if(x[1] == '')
		{
		x[1] = 0;
		}
	    document.getElementById('i'+val).value=x[0];
	    document.getElementById('d'+val).value=x[1];
		
		
	   //document.getElementById('i'+val).value=req.responseText;
	//	document.getElementById('Cakeorder').innerHTML=req.responseText;
	 	}
	  else 
	 	{
   	   alert("There was a problem while using XMLHTTP:\n" + req.statusText);

	 }
     }
     }
   req.open("GET", strURL, true);
   req.send(null);
   }

//document.getElementById('i'+val).value=value;

}
function change_service(value,cnt){
var strURL="php/addmore.php?value="+value+"&cnt="+cnt;
	var req = getXMLHTTP();
   if (req)
   {
     req.onreadystatechange = function()
     {
		 
			if ((req.readyState == 0)||(req.readyState == 1)||(req.readyState == 2)||(req.readyState == 3))
      		{
			//document.getElementById('order').innerHTML='<div align="center"><img src="'+path+'images/ajax_loader.gif"/></div>';
			//document.getElementById('Cakeorder').innerHTML='<div align="center"><img src="'+path+'images/ajax_loader.gif"/></div>';
			}
		 
		 
      if (req.readyState == 4)
      {
	 // only if "OK"
	 	if (req.status == 200)
	 	{ 

	    var txtData="div"+cnt;
		document.getElementById(txtData).innerHTML=req.responseText;
	//	document.getElementById('Cakeorder').innerHTML=req.responseText;
	 	}
	  else 
	 	{
   	   alert("There was a problem while using XMLHTTP:\n" + req.statusText);

	 }
     }
     }
   req.open("GET", strURL, true);
   req.send(null);
   }

}



function selchnge(val,value)
{
var strURL="ajax/getVal.php?name="+value;
//alert(strURL);
	var req = getXMLHTTP();
   if (req)
   {
     req.onreadystatechange = function()
     {
		 
			if ((req.readyState == 0)||(req.readyState == 1)||(req.readyState == 2)||(req.readyState == 3))
      		{
			//document.getElementById('order').innerHTML='<div align="center"><img src="'+path+'images/ajax_loader.gif"/></div>';
			//document.getElementById('Cakeorder').innerHTML='<div align="center"><img src="'+path+'images/ajax_loader.gif"/></div>';
			}
		 
		 
      if (req.readyState == 4)
      {
	 // only if "OK"
	 	if (req.status == 200)
	 	{
		
		
	   document.getElementById('i'+val).value=req.responseText;
	//	document.getElementById('Cakeorder').innerHTML=req.responseText;
	 	}
	  else 
	 	{
   	   alert("There was a problem while using XMLHTTP:\n" + req.statusText);

	 }
     }
     }
   req.open("GET", strURL, true);
   req.send(null);
   }

//document.getElementById('i'+val).value=value;

}
function minmore(cnt){
	var k = parseInt(cnt)-parseInt(1);
	if(document.getElementById('hidediv'+k)){
	document.getElementById('hidediv'+k).innerHTML='';
	}if(document.getElementById('min'+k)){
	document.getElementById('min'+k).style.display='block';
	}if(document.getElementById('max'+k)){
	document.getElementById('max'+k).style.display='none';
	}	
	grandT()
}

function test1()
{


var xmlhttp;    
if (str=="")
  {
  document.getElementById("txtHint").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
	   document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","testajax.php?str="+str,true);
xmlhttp.send();
}



function test()
{

	var str = document.getElementById('clientname').value;
	if (str.length>2)
	{
		var lower = str.substring(0,4);
		var upper = lower.toUpperCase();
		
 		document.getElementById('clientcode').value = upper;
	}
}	

function qtytotal(val){
	//alert('aaa');
	var str = 0;
	var strbox = 0;
	
	var cnt = document.getElementById('totcntw').value;
	/*if(document.getElementById('qty_total').value == '')
		{
			var grdtot =  0;	
		}
	var grdtot = document.getElementById('qty_total').value;*/
	
		if(document.getElementById('packqty'+val).value == '')
		{
			document.getElementById('packqty'+val).value = 0;	
		}
		//grdtot = parseInt(document.getElementById('packqty'+val).value) + parseInt(grdtot);
		
		if(document.getElementById('boxqty'+val).value == '')
		{
			document.getElementById('boxqty'+val).value = 0;	
		}
		//strbox = parseInt(document.getElementById('boxqty'+j).value) + parseInt(strbox);
		
		for(j=1;j<=cnt;j++){
		
			if(document.getElementById('packqty'+j).value == '')
			{
				document.getElementById('packqty'+j).value = 0;	
			}
			str = parseInt(document.getElementById('packqty'+j).value) + parseInt(str);
	    }
	document.getElementById('qty_total').value= str;
	//document.getElementById('box_qty_total').value= strbox;

//boxqty(val);	
}

/*for (i=1;i<=cnt;i++)
{
if(document.getElementById('t'+i).value != ''){
 nval=document.getElementById('t'+i).value;
 //alert(nval);
 
 answer=parseFloat(answer)+parseFloat(nval);
 }
}*/

function boxqty(vals)
{

var literid = '';
var cnt = document.getElementById('totcntw').value;
literid = document.getElementById('literqty'+vals).value;
var boxqty = document.getElementById('boxqty'+vals).value
var packqty = document.getElementById('packqty'+vals).value

var xmlhttp;    

if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
	//alert(xmlhttp.responseText);
	   document.getElementById("boxqty"+vals).value=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","php/boxajax.php?ltrid="+literid+"&cnt="+cnt+"&packqt="+packqty,true);
xmlhttp.send();
}

function showKg(val,i){

var brand = document.getElementById('branch'+i).value;

var xmlhttp;    
if (val=="")
  {
  document.getElementById('txtKglitre'+i).innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
	//alert(responseText);
	   document.getElementById('txtKglitre'+i).innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","get_kgajax.php?brand_id="+brand+"&ltr="+val+"&cnt="+i,true);
xmlhttp.send();
}

</script>

<style>
.lableentrytext{
font-size: 12px;
color: #505050;
clear: both;
margin-bottom: 5px;
text-transform: capitalize;
}

body {
	padding:0px;
	margin:0px;
	font-family:Arial, Helvetica, sans-serif;
	color:#000000;
}
.div01 {
	width:80%;
		margin:0 70px;
	padding-bottom:15px;
}
.ptForm {
	/*border:1px solid #000000;*/
	width:100%;
	margin:0 auto;
	padding:4px;
}
.ptText01 {
	font-size:20px;
	font-weight:bold;
}
.ptText02 {
	font-size:12px;
}
.ptText03 {
	font-size:16px;
	font-weight:bold;
}
.ptText04 {
	font-size:16px;
	font-weight:bold;
	border-left:solid 1px #000000;
	border-right:solid 1px #000000;
	border-top:solid 1px #000000;
}
.ptText05 {
	font-size:14px;
	font-weight:bold;
}
.field01 {
	border-bottom:#333333 dotted 1px;
	border-left:none;
	border-top:none;
	border-right:none;
	color:#000000;
	font-size:12px;
	font-weight:bold;
	background-color:#f1f1f1;
}
.field02 {
	border:none;
	color:#000000;
	font-size:12px;
	font-weight:bold;
	background-color:#f1f1f1;
}
.ptText06 {
	font-size:12px;
	font-weight:bold;
}
.rightTd {
	border-bottom:solid 1px #000000;
}
.leftTd {
	border-bottom:solid 1px #000000;
	border-right:solid 1px #000000;
	padding:4px;
}
.tdItem {
	border-bottom:solid 1px #000000;
	border-right:solid 1px #000000;
	padding:4px;
}
.rightTd {
	border-bottom:solid 1px #000000;
	padding:4px;
}
/*.rightTdBtm {
	border:none;
	padding:4px;
}
.leftTdBtm {
	border-right:solid 1px #000000;
	padding:4px;
}*/
.tdItemBtm {
	
	padding:4px;
}

.inputfix {
	width:150px!important;
	max-width:150px!important;
	min-width:150px!important;
}

#adv{

	display:none;
	
}

</style>



</head>

<body onLoad="">
<div class="wrapper">
  <div>
<?php 
	include("header.php");
?>
 
</div>
 
 
<div class="tabbedArea">
<?php
/*if(!empty($_REQUEST['tripid']))
{ 
	$tripid1 = $_REQUEST['tripid'];
	$arrtrip1=mysql_query("select * from cf_tripsheetsub where trip_id = '$tripid1'");
	$cnttrip1=mysql_num_rows($arrtrip1);
	if($cnttrip1>0){
		$div = $cnttrip1;
	}else{
		$div=1;
	}
}else{
		$div=1;
}*/
	$div=1;	
	?>
    <input type="hidden" id="divcnt" name="divcnt" value="<?=$div?>"/>
  <div class="tabBody">
  <?php 
		if(empty($_REQUEST['clientsubid']))
		{ ?>
		  <h1>Add Package</h1>
		<?php } else { ?>
		  <h1>Edit Package</h1>
		<?php }
  ?>
   
   <div class="div01">
  <div class="ptForm">
  <form name="clientform" id="clientform" method="post" >
    <table width="100%" border="0" cellspacing="5" cellpadding="2"  style="border:1px solid #000000; padding:4px;">
           
      <input type="hidden" name="totcnt" id="totcntw" value="<?=$div?>">
   
          <tr>
        <td  colspan="4"  class="ptText02" style="">         </td>
        </tr>
          <tr>
                <td  colspan="4"  class="ptText02" style="">
                <table style="width:100%;">
                  <tr>
                    <td width="4%">No:</td>
                    <?php 
	                //$clientaut = $rws['client_newcode'];
					$arr_code=mysql_query("select * from cf_package order by package_id  desc limit 1");
					$rw=mysql_fetch_array($arr_code);
					$packcode = $rw['package_code'] + 1;
				    ?>
					<input type="hidden" name="pack_code" id="pack_code" class="input1 input6"  value="<?=$packcode?>"  >
                    <td width="10%">PK-<?=$packcode?></td>
                    <td width="5%" align="right">Date:</td>
                    <td width="67%">
                      <input type="text" name="fromdate" id="fromdate" class="input1 input6"  value="" style="float:left;" >
                    </span></td>
                    <td width="14%">&nbsp;</td>
                  </tr>
                  </table>              </td>
          </tr>                  
      <tr>
        <td  colspan="5"  class="ptText02" style="width:70%;">
        <div id="list">
        <table width="100%"  cellspacing="0" cellpadding="0"   class="List" align="center" style="border-top:solid 1px #000000; border-bottom:none; border-left:solid 1px #000000; border-right:solid 1px #000000;" >
            
            <tr>
              <td class="tdItem" style="font-weight:bold;">Brand</td>
              <td class="tdItem" style="font-weight:bold;">Liters</td>
			  <td class="tdItem" style="font-weight:bold;">Kg</td>
              <td class="tdItem" style="font-weight:bold;">Quantity</td>
              <td class="tdItem" style="font-weight:bold;">Box</td>
              <?php 
				if(empty($_REQUEST['clientsubid']))
			    { ?>
              <td class="tdItem" style="font-weight:bold;"></td>
              <?php } ?>
            </tr>
            <?php 
            if(empty($_REQUEST['clientsubid']))
				{ ?>
             <tr>
              <td class="tdItem">
              <select class="input1 inputfix" name="branch1" id="branch1" onChange="showLiter(this.value,'<?=$div?>')">
     			<option value="">-Select Brand-</option>
                <?php 
					$sq_brand="select * from cf_brand";
					$array1=mysql_query($sq_brand);
					while($res=mysql_fetch_array($array1))
					{
					?>     	
        				<option value="<?=$res['brand_id']?>"><?=$res['brand_name']?></option>
               		<?php
					}
	 				?>
     		</select>    	
			 </td>
              
               <td class="tdItem"><div id="txtLiter<?=$div?>">
               <select class="input1 inputfix" name="literqty1" id="literqty1" onChange="boxqty(<?=$div?>)">
     			<option value="">-Select Liter-</option>
     			 <?php 
                            $sq_liter1="select * from cf_liter";
                            $arr1=mysql_query($sq_liter1);
                            while($resliter1=mysql_fetch_array($arr1))
                            {
                        ?>
                            <option value="<?=$resliter1['liter_id']?>" <? if($resliter1['liter_id']==$literqty) {?>selected<? }?> ><?=$resliter1['liter_qty']?></option>
                        <?php
                            }
                     ?>
     		</select>
            
            
            </div> </td>
			
			<td class="tdItem"><div id="txtKglitre<?=$div?>" style="float:left;"><input type="text" name="kg_liter1" id="kg_liter1" class="input1 input3 inputfix" value=""></div></td>  
			
              <td class="tdItem"><input type="text" name="packqty1" id="packqty1" class="input1 input3 inputfix" value="" onKeyUp="boxqty(<?=$div?>);qtytotal(<?=$div?>);" ></td>             
              <td class="tdItem"><input type="text" name="boxqty1" id="boxqty1" class="input1 input3 inputfix" value="" readonly="readonly" ></td>   
              <td align="center" class="tr_td rightTd" style="border-right:#6b6b6b solid 1px;">
	  			<a style="cursor:pointer;" onClick="addmorepackage('2')"><span id="min1"><img src="images/addmore.jpg" /></span></a>	  
	   <span id="max1" style="display:none;" onClick="minmore('2');"><img src="images/minus.jpg" /></span>	  </td>
            </tr>
            <?php } ?>
            
          </table> 
          </div>
        
        <div id="div2"></div>
         <div id="div3"></div>         </td>
      </tr>
      
      <tr>
              <td colspan="5" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td colspan="2" align="right">Total</td>
              <td width="21%" >
                <input type="text" name="qty_total" id="qty_total" class="input9"  value="" >             </td>
             
						<input type="hidden" name="box_qty_total" id="box_qty_total" class="input9"  value="" >      
              </tr>

              </table></td>
              </tr>
        
            
            <tr>
            	<td width="19%">
                <?php 
                 	if(empty($_REQUEST['clientsubid']))
					{ ?>
					  <input type="submit" name="cilentsubmit" value="submit" class="submit-btn" onClick="return validation()"  >
                <?php } else { ?>
                	  <input type="submit" name="clientedit" value="edit" class="submit-btn" onClick="return validation()"  >
                <?php } ?>                </td>
            </tr>    
    </table>
    
    </form>
    
  </div>
  <div style="text-align:center;">
    
  </div>
</div>
   </div>
 </div>
 <div class="footer"><p>Powered by <a href="http://www.aadhocc.co.uk/" target="_blank">Aadhocc</a></p></div>
 
</div>
<div class="quicLInksCover">
  <?php 
	include("leftlink.php");
?>

</div>
</body>
</html>


		






