<?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="#" method="post">

                    <h2 class="">  <img src="<?php echo WEB_ROOT; ?>assets/pay-bills.png" width="70" >Bills Pay</h2>
                    <div class="form-desc" style="color:#05194B;">
                        
                        Take Control of your bills. Renew your Pay TV, Internet, Electricity and so much more with <?php echo $site_initial; ?>’s smooth bill
                        payment service. ... We 
                        are building an ecosystem to enable people to digitally send and receive money, and creating simple financial access for everyone.
                        
                    </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 Receiving Institution</label><div class="input-group">
        <div class="input-group-prepend"><div class="input-group-text">Merchant</div></div>
         <select name ="rbname" class="form-control" >            
                                                        <option value="">Select Receiving Institution</option>
                                                        <option value="DSTV">TV Subscription</option>
                                                        <option value="Electricity Bills">Electricity Bills</option>
                                                        <option value="House Rent">Hosue Rent Renewal</option>
                                                        <option value="Tax Payment and Revenue">Tax Payment and Revenue</option>
                                                        <option value="Tuition Fee">Tuition Fee</option>
                                                        <option value="Flight Booking Charges">Flight Booking Charges</option>
                                                        <option value="Loan Repayment">Loan Repayment</option>
                                                        
 
                    				</select> 
        </div></div>
        </div>
        
        
        
        <div class="row"> 
                <div class="col-sm-6"><div class="form-group"><label for="">This Services is only Avaliable in United States</label>
                
            
                </div>
                </div>
    
        <div class="col-sm-6"><div class="form-group"><label for="">Amount to Pay (USD) (<?php echo $_SESSION['hlBank_user']['currency'] ?>):</label><div class="input-group">
        <div class="input-group-prepend"><div class="input-group-text">USD Value only</div></div>
         <span id="sprytf_amt">
        <input  name="amt" class="form-control"  id="amt" Placeholder="Amount to Pay">
       
							<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>
        </div>
        
        
            
            
     
        
       
            
    </fieldset>


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

<button class="btn btn-primary" name="submitButton" id="submitButton" type="submit">Pay Now ></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>

