<?php 	include_once('../../config.php'); 
		 

			if(isset($_POST['submit']))
			{
			    
			    
			    
			    
				 
                        $stmt=$conn->prepare("update    UI__USDTINR set inrVal=:inrVal,Tdate=:Tdate ");   
                        $stmt->bindValue(':inrVal', $_POST['Ctname'], PDO::PARAM_STR); 
                        $stmt->bindValue(':Tdate', date("d-M-Y H:i"), PDO::PARAM_STR); 
                        $stmt->execute();   
				        header("Location: InrUp.php");  
				        die;
			}   
			
			
			
			
			
                        $stmt=$conn->prepare("select *     from    UI__USDTINR    ");   
                        //$stmt->bindValue(':randNo', $_REQUEST['randNo'] , PDO::PARAM_STR); 
                        $stmt->execute(); 
                        $dateOfra = $stmt->fetch(PDO::FETCH_OBJ); 
			
			           
		 
?>  
<?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> USDT to INR Value </h3></div>    
								
								<div class="panel-options"> 

								   <input type="button"  class="btn btn-warning" name="btnback" id="btnback" value=" Back " onClick="javascript:location.href='UsdtwalletRst.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">INR</label>
								    <div class="col-sm-3">
								      <input name="Ctname" class="form-control"   placeholder="INR VAL" type="number"  value="<?php echo $dateOfra->inrVal;?>" required>
								    </div>
								 </div>
								 <hr>
							 
								   
								  
								  <div class="form-group">
										<label for="inputEmail3" class="col-sm-2 control-label">Update</label>
										<div class="col-sm-10">
										  <input type="submit"    class="btn btn-primary"  name="submit" value="Update">
										</div>
								  </div>   
								</form>
								
								
							
			  				</div>
			  			</div>
	  				</div>
	  				 
	  			</div>

	  			 


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

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