<?php 
 session_start();

 
$errorMessage = (isset($_GET['msg']) && $_GET['msg'] != '') ? $_GET['msg'] : '&nbsp;';
$msgMessage = (isset($_GET['success']) && $_GET['success'] != '') ? $_GET['success'] : '&nbsp;';
?>


                           
                        
<link href="<?php echo WEB_ROOT; ?>library/spry/textfieldvalidation/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<script src="<?php echo WEB_ROOT; ?>library/spry/textfieldvalidation/SpryValidationTextField.js" type="text/javascript"></script>

<script src="<?php echo WEB_ROOT; ?>admin/library/jquery.min.js" type="text/javascript"></script>

<link href="<?php echo WEB_ROOT; ?>library/spry/textareavalidation/SpryValidationTextarea.css" rel="stylesheet" type="text/css" />
<script src="<?php echo WEB_ROOT; ?>library/spry/textareavalidation/SpryValidationTextarea.js" type="text/javascript"></script>

<link href="<?php echo WEB_ROOT; ?>library/spry/selectvalidation/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<script src="<?php echo WEB_ROOT; ?>library/spry/selectvalidation/SpryValidationSelect.js" type="text/javascript"></script>

<div id="errorCls" style="color:#FF0000 !important;font-size:14px;font-weight:bold;"><?php echo $errorMessage; ?></div>
<div style="color:#99FF00 !important;font-size:14px;font-weight:bold;"><?php echo $msgMessage; ?></div>
 
						
						
					 
								
						 
                  
                  
                  
                  
                  <div class="col-sm-12">
<div class="element-wrapper">
<div class="element-box">

                    <form id="formValidate" action="<?php echo WEB_ROOT; ?>view/process2.php?action=transfer" method="post">

                    <h2 class="">  <img src="<?php echo WEB_ROOT; ?>assets/local.png" width="70" > USA => USA Transfer</h2>
                    <div class="form-desc" style="color:#05194B;">
                        Local Bank transfer is a cross-border payment method where a deposit is made into a foreign bank account. Local bank transfers involve 
                        an intermediary organization or financial institution which operates between the payer (or the originator) of the transfer and the
                        payee (or the receiver) of the payment. 
                        
                    </div>





       <fieldset class="form-group"><legend><span>Local Transfer Details</span></legend> 
            
             <div class="row"> 
                <div class="col-sm-6"><div class="form-group"><label for="">Choose your State in United States</label>
                      <select name ="rstate" class="form-control" >            
                          <option value="">Choose your State in United States</option>
<option value="Alabama">Alabama</option><option value="Alaska">Alaska</option><option value="Arizona">Arizona</option><option value="Arkansas">Arkansas</option>
<option value="California">California</option><option value="Colorado">Colorado</option><option value="Connecticut">Connecticut</option><option value="Delaware">Delaware</option>
<option value="Florida">Florida</option><option value="Georgia">Georgia</option><option value="Hawaii">Hawaii</option><option value="Idaho">Idaho</option><option value="Illinois">Illinois</option><option value="Indiana">Indiana</option>
<option value="Iowa">Iowa</option><option value="Kansas">Kansas</option><option value="Kentucky">Kentucky</option><option value="Louisiana">Louisiana</option><option value="Maine">Maine</option>
<option value="Maryland">Maryland</option><option value="Massachusetts">Massachusetts</option><option value="Michigan">Michigan</option><option value="Minnesota">Minnesota</option>
<option value="Mississippi">Mississippi</option><option value="Missouri">Missouri</option><option value="Montana">Montana</option><option value="Nebraska">Nebraska</option>
<option value="Nevada">Nevada</option><option value="New Hampshire">New Hampshire</option><option value="New Jersey">New Jersey</option><option value="New Mexico">New Mexico</option><option value="New York">New York</option><option value="North Carolina">North Carolina</option><option value="North Dakota">North Dakota</option>
<option value="Ohio">Ohio</option><option value="Oklahoma">Oklahoma</option><option value="Oregon">Oregon</option><option value="Pennsylvania">Pennsylvania</option><option value="Rhode Island">Rhode Island</option><option value="South Carolina">South Carolina</option><option value="South Dakota">South Dakota</option>
<option value="Tennessee">Tennessee</option><option value="Texas">Texas</option><option value="Utah">Utah</option><option value="Vermont">Vermont</option><option value="Virginia">Virginia</option><option value="Washington">Washington</option><option value="West Virginia">West Virginia</option><option value="Wisconsin">Wisconsin</option><option value="Wyoming">Wyoming</option>
                          </select>
                
                </div>
                </div>
    
        <div class="col-sm-6"><div class="form-group"><label for="">Select Beneficiary Bank</label><div class="input-group">
        <div class="input-group-prepend"><div class="input-group-text">Bank</div></div>
         <select name ="rbname" class="form-control" >            
                                                        <option value="">Select Beneficiary Bank</option>
    <option value="Chase Bank">Chase Bank</option><option value="Bank of America">Bank of America</option><option value="Wells Fargo">Wells Fargo</option>
    <option value="U.S. Bank">U.S. Bank</option><option value="BBVA Compass">BBVA Compass </option><option value="Bank of the west">Bank of the west</option>
    <option value="Santander Consumer Bank">Santander Consumer Bank</option><option value="Citi Bank">Citi Bank</option><option value="Huntington Bank">Huntington Bank</option>
    <option value="M&T Bank">M&T Bank</option><option value="Woodforest National Bank">Woodforest National Bank</option><option value="Citizens Bank">Citizens Bank</option><option value="Fifth Third Bank">Fifth Third Bank</option>
    <option value="Key Bank">Key Bank</option><option value="TD Bank">TD Bank</option><option value="Sun Trust Bank">Sun Trust Bank</option>
    <option value="Regions Bank">Regions Bank</option><option value="PNC Bank">PNC Bank</option><option value="BB&T Bank">BB&T Bank</option>
    <option value="First National Bank">First National Bank</option><option value="BMO Harris Bank">BMO Harris Bank</option><option value="First Citizens Bank">First Citizens Bank</option><option value="Comerica Bank">Comerica Bank</option><option value="People's United Bank">People's United Bank</option>
    <option value="Umpqua Bank">Umpqua Bank</option><option value="Bank of the Ozarks">Bank of the Ozarks</option><option value="HSBC">HSBC</option><option value="MUFG Union Bank">MUFG Union Bank</option><option value="Arvest Bank">Arvest Bank</option>
    <option value="Chemical Bank">Chemical Bank</option><option value="TCF Bank">TCF Bank</option><option value="Synovus Bank">Synovus Bank</option><option value="Bancorp South Bank">Bancorp South Bank</option>
    <option value="Washington Federal">Washington Federal</option><option value="Assiciated Bank">Assiciated Bank</option>
    <option value="IberiaBank">IberiaBank</option><option value="Valley National Bank">Valley National Bank</option><option value="Whitney Bank">Whitney Bank</option><option value="Trust Mark National Bank">Trust Mark National Bank</option><option value="Great Western Bank">Great Western Bank</option><option value="Columbia State Bank">Columbia State Bank</option>
    <option value="Centennial Bank">Centennial Bank</option><option value="Old National Bank">Old National Bank</option>
    <option value="South State Bank">South State Bank</option><option value="First Tennessee Bank">First Tennessee Bank</option>
    <option value="NBT Bank">NBT Bank</option><option value="Renasant Bank">Renasant Bank</option><option value="Banner Bank">Banner Bank</option>
    <option value="Webster Bank">Webster Bank</option><option value="Simmons Bank">Simmons Bank</option><option value="United Bank">United Bank</option>
    <option value="Frost Bank">Frost Bank</option><option value="WesBanco Bank">WesBanco Bank</option><option value="Commerce Bank">Commerce Bank</option>
    <option value="Investors Bank">Investors Bank</option><option value="TrustCo Bank">TrustCo Bank</option><option value="First Commonwealth Bank">First Commonwealth Bank</option><option value="Sterling National Bank">Sterling National Bank</option>
    <option value="Carter Bank And Trust">Carter Bank And Trust</option>
    <option value="First Midwest Bank">First Midwest Bank</option>
    <option value="First Bank">First Bank</option>
    <option value="Park National Bank">Park National Bank</option> <option value="Pinnacle Bank">Pinnacle Bank</option>
    <option value="Glacier Bank">Glacier Bank</option> <option value="Fulton Bank">Fulton Bank</option>
    <option value="RaboBank">RaboBank</option><option value="Zions Bank">Zions Bank</option><option value="First Merchants Bank">First Merchants Bank</option>
    <option value="East West Bank">East West Bank</option><option value="First Interstate Bank">First Interstate Bank</option><option value="Union Bank and Trust">Union Bank and Trust</option><option value="Great Southern Bank">Great Southern Bank</option>
    <option value="Flagster Bank">Flagster Bank</option>
                    				</select> 
        </div></div>
        </div>
        
        
            
            
            
            
   

<div class="col-sm-6"><div class="form-group">
    <label for="">Reciever's Account Number</label>
<input class="form-control" data-error="Please input Reciever's Account Number" name="accno" placeholder="Reciever's Account Number" required="required">
<div class="help-block form-text with-errors form-control-feedback"></div></div>
</div>


<div class="col-sm-6"><div class="form-group">
                <label for="">Reciever's  Name</label>
<input class="form-control" data-error="Please input Reciever's Name" name="rbname" placeholder="Reciever's Name" required="required">

<div class="help-block form-text with-errors form-control-feedback"></div></div>
</div>

 

</div>
 



        <div class="row"> 
                <div class="col-sm-6"><div class="form-group"><label for="">Transaction Date</label>
                <input class="single-daterange form-control"  value="<?php echo date("h:i A d M Y"); ?>" name="dot" readonly="true"></div>
                </div>
    
        <div class="col-sm-6"><div class="form-group"><label for="">Routing Number Only</label><div class="input-group">
        <div class="input-group-prepend"><div class="input-group-text">Routing only</div></div>
        <input class="form-control" data-error="Please input Beneficiary Routing Number" name="swift" placeholder="Routing Number only">
        </div></div>
        </div>
        
        </div>
        
        
        
        
        
        <div class="form-group"><label for="">Amount to Transfer (<?php echo $_SESSION['hlBank_user']['currency'] ?>):</label>
        <span id="sprytf_amt">
        <input  name="amt" class="form-control"  id="amt" Placeholder="Amount to Transfer">
       
							<span class="textfieldRequiredMsg">Amount is required.</span>
						</span>
         <?php 
	  $user_id = $_SESSION['hlBank_user']['user_id'];
	  $acc_no = $_SESSION['hlBank_user']['acc_no'];
	  
	  $balance_sql = "SELECT balance FROM tbl_accounts WHERE user_id = $user_id AND acc_no = $acc_no";
	  $result = dbQuery($balance_sql);
	  $row = dbFetchAssoc($result);
	  ?>
	  
	  <br><strong style="color: green;">BALANCE: <?php echo $_SESSION['hlBank_user']['currency'] ?><?php echo number_format($row['balance'] , 2); ?></strong>
	  
        </div>
        
        
        <div class="form-group"><label>Transaction Naration</label>
        <textarea class="form-control" data-error="Please input Transfer Naration" name="desc" id="desc" rows="3"></textarea> 
        </div>
    
    
						<input name="toption" type="hidden" readonly="true" value="IT"  class="form-control"  />
						<input name="saccno" type="hidden" readonly="true" value="<?php echo $_SESSION['hlBank_user']['acc_no'] ?>"  id="saccno" class="form-control"  />
                      
                        
    </fieldset>


 <div class="form-buttons-w">

<button class="btn btn-primary" name="submitButton" id="submitButton" type="submit">Proceed Local Transfer ></button></div></form></div></div>

</div>
                  
                  
        
 

<script type="text/javascript">
<!--
var sprytf_rbname = new Spry.Widget.ValidationTextField("sprytf_rbname", 'none', {minChars:6, validateOn:["blur", "change"]});
var sprytf_rname = new Spry.Widget.ValidationTextField("sprytf_rname", 'none', {minChars:6, validateOn:["blur", "change"]});
var sprytf_accno = new Spry.Widget.ValidationTextField("sprytf_accno", 'integer', {minChars:10, maxChars: 15, validateOn:["blur", "change"]});
var sprytf_remail = new Spry.Widget.ValidationTextField("sprytf_remail", 'none', {minChars:6, validateOn:["blur", "change"]});
var sprytf_rcountry = new Spry.Widget.ValidationTextField("sprytf_rcountry", 'none', {minChars:6, validateOn:["blur", "change"]});
var sprytf_rstate = new Spry.Widget.ValidationTextField("sprytf_rstate", 'none', {minChars:6, validateOn:["blur", "change"]});
var sprytf_swift = new Spry.Widget.ValidationTextField("sprytf_swift", 'none', {minChars:10, maxChars: 20, validateOn:["blur", "change"]});
var sprytf_amt = new Spry.Widget.ValidationTextField("sprytf_amt", "none", {validateOn:["blur", "change"]});

var sprytf_opt = new Spry.Widget.ValidationSelect("spryselect_opt");

var sprytf_dot = new Spry.Widget.ValidationTextField("sprytf_dot", "date", {format:"", useCharacterMasking: true, validateOn:["blur", "change"]});
var sprytf_desc = new Spry.Widget.ValidationTextarea("sprytf_desc", {isRequired:true, validateOn:["blur", "change"]});
//-->
</script>

