<?php 	include_once('../../config.php');   	
		include_once(ABS_PATH.'/admin/login_check.php');    
		
		 
		    if(isset($_POST['update']))
            {    
                      
                    $stmt=$conn->prepare("insert into  UI__QrUtrPool  (utr,amt,Tdate) values(:utr,:amt,:Tdate)");  
                    $stmt->bindValue(':utr', $_POST['utr'] , PDO::PARAM_STR);
                    $stmt->bindValue(':amt', $_POST['amt'] , PDO::PARAM_STR);    
                    $stmt->bindValue(':Tdate', date("d-M-Y H:i"), PDO::PARAM_STR);      
                    $stmt->execute();  
                    $_SESSION['ReqestUp']= "UTR  Added Successfully"; 
                    header("Location: addUtr.php");
                    die;
            }     
                        
            $stmt=$conn->prepare("select  * from   UI__Qrpayment where id=:id ");  
            $stmt->bindValue(':id', $_REQUEST['id'] , PDO::PARAM_STR);
            $stmt->execute(); 
            $AllUsers = $stmt->fetch(PDO::FETCH_OBJ); 
?>  
<?php  include ABS_PATH.'/admin/header.php';	?>  

<script>
function del_record(val)
{

	var r = confirm("Do you really want to delete record !");
	if (r == true) {    
	$.ajax({
	type: 'POST',
	url: "../ajax/default.php",
	//async: false,			 
	data: {del_city_names:1,val:val},	  
	success: function(ajaxresult){	     
		location.reload();	 	
	},
	error: function(XMLHttpRequest, textStatus, errorThrown) { 
	alert('Error');
	}
	});
	
	}	
	
}

</script>
		 
		<div class="col-md-10">  
  			<div class="content-box-large">
  				<div class="panel-heading">
					<div class="panel-title"><h3>Add New UTR </h3>
					
					        <?php echo $_SESSION['ReqestUp'];?>
					        
					</div>
					
					<div align="right">  <input type="button"    class="btn btn-warning" name="btnback" id="btnback" value=" Back " onClick="javascript:location.href='qrrequest.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">UTR</label>
								    <div class="col-sm-3">
								      <input type="text" name="utr"  class="form-control" required/>
								    </div>
								 </div>
								 <hr>
								 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Amount</label>
								    <div class="col-sm-3">
								      <input type="number" name="amt"  class="form-control"  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="update" value="Add UTR">
										</div>
								  </div>   
								</form>
				 
								
  				</div>
  			</div>



		  </div>
		</div>
    </div>

<?php  include ABS_PATH.'/admin/footer.php';	
    unset($_SESSION['ReqestUp']);
?>    