<?php 	
            include_once('../../config.php');    
			 
			
			if(isset($_POST['submit']))
			{      	  
			    mysql_query("update     calcDigits set zero = $_POST[zero] , one = $_POST[one] ,  two = $_POST[two] ,  three = $_POST[three] ,  four = $_POST[four] ,  five = $_POST[five] ,  six = $_POST[six] ,  seven = $_POST[seven] ,  eight = $_POST[eight] ,  nine = $_POST[nine]  where id=$_REQUEST[id]");  
			    header("Location:  record.php "); 
                die;
			}        
			
			
			$rst = mysql_query("select * from calcDigits where id=$_REQUEST[id]");
			$value  = mysql_fetch_object($rst);
?>  
<?php  include ABS_PATH.'/admin/header.php';	?>  


 <script>
	$(function() {
		$( "#datepicker" ).datepicker(); 
	}); 
  
	$(document).ready(function()
	{   

	
	$("#product_frm").validate({
		
		errorElement:'div',
		rules:{ 
			city:{
				required:true				 
			} 
			
			
			
		},
		messages:{				
			 
			 city:{
				required:"Enter city name"				 
			} 
		}
	});


	});
 


</script>
		 
		 <div class="col-md-10">

	  			<div class="row">
	  				<div class="col-md-12">
	  					<div class="content-box-large">
							<div class="panel-heading">
								<div class="panel-title"> <h3> <?php //echo $val;?> </h3></div>    
								
								<div class="panel-options"> 

								   <input type="button"  class="btn btn-warning" name="btnback" id="btnback" value=" Back " onClick="javascript:location.href='record.php';" />
								  
								</div>
							</div>
							
			  				<div class="panel-body">
								
								 
			  					<form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" id="product_frm" autocomplete="off">
								
							  

								<div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">0</label>
								    <div class="col-sm-3">
								      <input name="zero" class="form-control"   placeholder="Value" value="<?php echo $value->zero;?>"  >
									   
								    </div>
								 </div>
								 <hr>  		
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">1</label>
								    <div class="col-sm-3">
								      <input name="one" class="form-control"   placeholder="Value" value="<?php echo $value->one;?>" >
									   
								    </div>
								 </div>
								 <hr>  
							 
								   
								  
								   
								<div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">2</label>
								    <div class="col-sm-3">
								      <input name="two" class="form-control"   placeholder="Value" value="<?php echo $value->two;?>"  >
									  
								    </div>
								 </div>
								 <hr>   
								 
								    
								<div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">3</label>
								    <div class="col-sm-3">
								      <input name="three" class="form-control"   placeholder="Value" value="<?php echo $value->three;?>"  >
									   
								    </div>
								 </div>
								 <hr>   
								   
								   
								      
								<div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">4</label>
								    <div class="col-sm-3">
								      <input name="four" class="form-control"   placeholder="Value" value="<?php echo $value->four;?>"  >
									   
								    </div>
								 </div>
								 <hr>   
								   
								   
								      
								<div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">5</label>
								    <div class="col-sm-3">
								      <input name="five" class="form-control"   placeholder="Value" value="<?php echo $value->five;?>" >
									   
								    </div>
								 </div>
								 <hr>   
								   
								   
								      
								<div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">6</label>
								    <div class="col-sm-3">
								      <input name="six" class="form-control"   placeholder="Value" value="<?php echo $value->six;?>"  >
									   
								    </div>
								 </div>
								 <hr>   
								   
								   
								      
								<div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">7</label>
								    <div class="col-sm-3">
								      <input name="seven" class="form-control"   placeholder="Value" value="<?php echo $value->seven;?>"  >
									   
								    </div>
								 </div>
								 <hr>   
								   
								   
								      
								<div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">8</label>
								    <div class="col-sm-3">
								      <input name="eight" class="form-control"   placeholder="Value" value="<?php echo $value->eight;?>"  >
									   
								    </div>
								 </div>
								 <hr>    
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">9</label>
								    <div class="col-sm-3">
								      <input name="nine" class="form-control"   placeholder="Value"  value="<?php echo $value->nine;?>"  >
									   
								    </div>
								 </div>
								 <hr>        
								 
								  <div class="form-group">
										<label for="inputEmail3" class="col-sm-2 control-label">Add</label>
										<div class="col-sm-10">
										  <input type="submit"    class="btn btn-primary"  name="submit" value="Add">  
										   
										</div>
								  </div>   
								  
								   
								  
								  
								</form>
								
								
							
			  				</div>
			  			</div>
	  				</div>
	  				 
	  			</div>

	  			 


	  		<!--  Page content -->
		  </div>
		</div>
    </div>

<?php  include ABS_PATH.'/admin/footer.php';	

 
                    
?>    