<?php
include"initialize_page.php";
include"systemfunctions.php";

 $redirect_url=$website_url."user/welcome.php";
	     $test_q=mysqli_query($con,"SELECT * FROM x_fundtransfer WHERE x_userid='$user_id' and x_trtype='international' and x_step='step2' ORDER by x_id DESC");
	  $test_row=mysqli_num_rows($test_q);
	       if($test_row==0)
		     {
				 
			//header("location:$redirect_url");	 
		       echo "<script>window.location ='" . $redirect_url . "';</script>";
			
				exit();
			 }
			 else
			 {
				 $test_array=mysqli_fetch_array($test_q);
				 
				 
				 //test for time
				 $test_id=$test_array['x_id'];
?>
<?php include('resources/header.php') ?>
	<title>Cost of Transfer (COT) Code</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
<?php include('resources/css-file.php') ?>
<?php include('resources/navigation.php') ?> 
<!-- Dashboard wrapper starts -->
<div class="dashboard-wrapper">
	<div class="main-container">				
		<div class="row">
			<div class="col-sm-12 ac-summ">
				<h2>Cost of Transfer (COT) Code</h2>
			</div>
		</div>
		<div class="row gutter">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<ul class="boxli">
				<li>
					<h4>Cost of Transfer (COT) Code</h4>
					  <p>Funds transfer is a process of transfering funds from your account to other account in same Bank.
Please make sure that you have enough funds available in your account to transfer. Also don't forgot to validate receiver's account number.</p>

<p>The C.O.T. code you desire is a Cost of Transfer. You should contact your bank to get this code. A Cost of Transfer is allegedly needed to complete international wire transfers. COT (Cost of Transfer) codes are frequently mentione when carrying out international fund transfer</p>

<p>Generally you need to have the routing number or code of the bank to receive funds plus the name or account number of the recipient account at that bank in order to complete an interbank wire transfer of funds.</p>
					<div class="panel">
						<div class="panel-heading">
							<h4>Transfer Funds</h4>
						</div>
						<div class="panel-body">
							<label>Cost of Transfer (COT) Code</label>
							<form method="post" action="" id="local2bform">             
								<div class="form-group">
									<input type="hidden" name="q" class="form-control" value="validate_step_local2">
									<input type="hidden" name="id" class="form-control" value="<?php  echo $test_id;  ?>">
									<input type="text" name="pinopin" class="form-control" placeholder="" required>
								</div>
								<div class="form-group">	
									<input type="submit" class="btn btn-info" value="Validate COT Code" class="buttonacvali">
								</div>
							</form>
						</div>
					</div>
				</li>
				</ul>	
			</div>
		</div>	
		</br>
	</div>
	<!-- Main container ends -->
</div>
<!-- Dashboard wrapper ends -->
<?php include('resources/footer.php') ?>
<?php include('resources/js-file.php') ?>
<script src="js/jQuery.style.switcher.js"></script>

<script type="text/javascript">
	 $(document).ready(function() {
    $("#local2bform").on('submit',(function(e) {
e.preventDefault();

$.ajax({
url: "controller.php", // Url to which the request is send
type: "POST",             // Type of request to be send, called as method
data: new FormData(this), // Data sent to server, a set of key/value pairs (i.e. form fields and values)
contentType: false,       // The content type used when sending data to the server.
cache: false,             // To unable request pages to be cached
processData:false,        // To send DOMDocument or non processed data file it is set to false
success: function(data)   // A function to be called if request succeeds
{
	//alert(data);
	if(data==0)
	{
		alert("Please fill all fields...");
	}
	if(data==1)
	{
		//alert("Validated Successfully..");
		<?php if(website_settingdata("noofstepinfundtransfer")==3){?>
                                window.location.href = '<?php echo website_settingdata('x_weburl'); ?>user/process.php?url=local5b.php';
                            <?php }
                            else{ ?>
                                 window.location.href = '<?php echo website_settingdata('x_weburl'); ?>user/process.php?url=local3b.php';
                            <?php } ?>
	}
	if(data==2)
	{
	alert("Invalid Code..");	
	}
	
}
});
}));
});
	
	</script>
<?php
			 }
			 ?>