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

?>

<?php $select_query = "select x_status from x_anotheracc where x_userid = '$user_id' limit 0,1";
									$select_result = mysqli_query($con,$select_query);
									$num = mysqli_num_rows($select_result);
									
$website_url=website_settingdata('x_weburl');
									
									if($num > 0)
									{
										while($row = mysqli_fetch_array($select_result))
										{
											if($row['x_status']=='Dormant')
											{ ?>
											<script type="text/javascript">
												alert("This account is Dormant and can\'t perform this operation");
												location.href='<?php echo $website_url;?>user/start.php';
											</script>	
												   
	
										<?php	} 
										if($row['x_status']=='Restricted')
											{ ?>
											<script type="text/javascript">
												alert("This account is Restricted and can\'t perform this operation");
												location.href='<?php echo $website_url;?>user/start.php';
											</script>	
												   
	
										<?php	} 
										 }
							
									}

		?>

<?php include('resources/header.php') ?>
	<title></title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
<?php include('resources/css-file.php') ?>
<link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css"
         rel = "stylesheet">
<?php include('resources/navigation.php') ?> 
<!-- Dashboard wrapper starts -->
<div class="dashboard-wrapper">
	<div class="main-container">				
		<div class="row">
			<div class="col-sm-6 ac-summ">
				<!--<h2>Account Summary</h2>-->
				<h3>
					Welcome, <?php echo user_details($user_id,'x_fname');  ?> <?php echo user_details($user_id,'x_lname');  ?>( <?php echo user_details($account_id,'x_actype');  ?> ) 
				</h3>
                
			</div>
			<div class="col-sm-6 do-name">
				<div class="table-responsive">
									<table class="table table-bordered no-margin">
										<thead>
											<tr>
												<th colspan="4"><a href="#"> Login History</a></th>
											</tr>	
										</thead>
										<thead>
											<tr>
												<th>You have logged in from IP:</th>
												<td><?php  echo visitor_ip();  ?></td>
											</tr>
											<tr>	
												<th>You log in at:</th>
												<td><?php  echo user_lastloggedin($user_id); ?></td>
											</tr>
										</thead>
									</table>
								</div>
			</div>
		</div>
		</br>
		<div class="row gutter">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<h2>Wire Transfer</h2>
				<div class="panel">
					
					<div class="panel-body">
						
						<div>

							<style>
								.boxli  h4{text-transform:uppercase;}
								.boxli li img{width:100%;}
								.boxli li {padding: 30px;
											box-shadow: 0 0 16px -10px #000;
											margin: 30px 0;
											}
								.boxli .col-sm-7{
									line-height:25px;
								}
								.boxli .col-sm-7 p{margin:10px 0;}
							</style>
							<div>
								<h3>Please Select Transfer Option</h3>
                                <p><strong>Welcome to <?php   echo website_settingdata("x_bankname");  ?>.</strong></p>
								<p>Wire transfer, bank transfer or credit transfer is a method of electronic funds transfer from one person or entity to another. A wire transfer can be made from one bank account to another bank account or through a transfer of cash at a cash office.</p>
								<?php
							 
							   // $under_testq=mysqli_query($con,"SELECT * FROM x_fundtransfer WHERE (x_step='step1' OR x_step='step2' OR x_step='step3' OR x_step='step4' OR x_step='step5')and (x_userid='$user_id') ORDER by x_id DESC limit 0,1");
								 $under_testq=mysqli_query($con,"SELECT * FROM x_fundtransfer WHERE (x_userid='$user_id') ORDER by x_id DESC limit 0,1");
								$under_testrow=mysqli_num_rows($under_testq);
								 ?>
								<ul class="boxli">
								<?php	 if($under_testrow!=0 && website_settingdata('allowresumetransfer')=='Yes')
								  {
									  $under_testarray=mysqli_fetch_array($under_testq);
									  if($under_testarray['x_step']=='step2' || $under_testarray['x_step']=='step3' || $under_testarray['x_step']=='step4' || $under_testarray['x_step']=='step5')
									  {
									  $under_stpe=$under_testarray['x_step'];
									  $under_type=$under_testarray['x_trtype'];
									 	$url="local2";
									 if($under_stpe=='step2')
									 	$url="local2";
									 if($under_stpe=='step3')
									 	$url="local3";
									 if($under_stpe=='step4')
									 	$url="local4";
									 if($under_stpe=='step5')
									 	$url="local5";
									 $t="";
									 if($under_type=='local')
									 	$t="";
									 else
									 	$t="b";
									 $url=$url.$t;
							 ?>    
							 <li><h4>Resume Previous Transfer</h4>
										<div class="row">
											
											<div class="col-sm-5">
												
												<img src="images/Local.png" alt="">
											
												
											</div>
											<div class="col-sm-7">
												<p>You can Resume previous Transfer.</p>
												<a class="btn btn-info" href="<?php  echo website_settingdata('x_weburl'); ?>user/<?php echo $url;?>.php">Resume Transfer</a>
											</div>
										</div>
									</li>

                                  <?php }
                              } ?>
									
									<li><h4>Domestic Funds Transfer</h4>
										<div class="row">
											
											<div class="col-sm-5">
												
												<img src="images/Local.png" alt="">
											
												
											</div>
											<div class="col-sm-7">
												<p>FAST (Fast and Secure Transfer) is an electronic funds transfer service that lets you transfer euro funds almost instantly from one bank to another within same country. local bank transfers can be completed within a short period after initiating a transfer at a relatively low cost.</p>
												<a class="btn btn-info" href="<?php  echo website_settingdata('x_weburl'); ?>user/startlocal.php">Start Domestic Transfer</a>
											</div>
										</div>
									</li>
									<li><h4>International Funds Transfer</h4>
										<div class="row">
											<div class="col-sm-5">
												
												<img src="images/International.jpg" alt="">
											</div>
											<div class="col-sm-7">
												<p>International Money Transfer is a secure, quick and convenient way to transfer money to an overseas account held with our bank or another bank.</p>
												<p>Transferring money across international lines takes a different set of protocols. Quantum Varlik Wealth Management wire transfers are available to trade money across borders and are used to transfer funds quickly without check fees between banks in larger nations. International transfers usually take three or four days to clear, and might also depend on the receiving bank.</p>
												<a class="btn btn-info" href="<?php  echo website_settingdata('x_weburl'); ?>user/startinterna.php">Start International Transfer</a> 
											</div>
										</div>
									</li>									
								</ul>
                                </div>
							</div>
						</div>
					</div>
				</div>	
			</div>
		</div>		
		</br>
	</div>
	<!-- Main container ends -->
</div>
<!-- Dashboard wrapper ends -->
<?php include('resources/footer.php') ?>
<?php include('resources/js-file.php') ?>

 <script type="text/javascript">
        
      $(document).ready(function() 
      {
         
         $("#datetransferfetchid").click(
             
             function()
             {
                 
                 var from=$("#datepicker-13").val();
                 var to=$("#datepicker-14").val();
                 if((from=="")||(to==""))
                   {
                   alert("please pick date range..");
                   return false;
                   
                   }
                   else
                   {
                       $("#xoxoloaderidxoi").show();
                $.post("controller.php", { q:"show_all_transfers", to:to, from:from  }, function(data)
                {
                     $("#xoxoloaderidxoi").hide(); 
                     $("#mafiaexpendithisdow").html(data);   
                }
                ); 
				
                 
             }}
             );
          
      });
        
    </script>
      <script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
      
      <!-- Javascript -->
      <script>
         $(function() {
            $( "#datepicker-13" ).datepicker({
                dateFormat:"yy-mm-dd"
                
            });
           
         });
      </script>
     <script>
         $(function() {
            $( "#datepicker-14" ).datepicker({
                dateFormat:"yy-mm-dd"
                
            });
           
         });
      </script>











