<?php
session_start();
include_once ('../include/session.php');
require_once '../include/class.user.php';
if(!isset($_SESSION['acc_no'])){
    
header("Location: login");
exit(); 
}

$reg_user = new USER();

$stmt = $reg_user->runQuery("SELECT * FROM account WHERE acc_no=:acc_no");
$stmt->execute(array(":acc_no"=>$_SESSION['acc_no']));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stat = $row['status'];
if($stat == 'DORMANT/INACTIVE'){
    header('Location: summary?dormant');
    exit();
}

$stat = $row['status'];
if($stat == 'ON HOLD'){
    header('Location: summary?hold');
    exit();
}

if(isset($_POST['transfer'])){
    $email = $row['email'];
    
    $amount = trim($_POST['amount']);
    $amount = strip_tags($amount);
    $amount = htmlspecialchars($amount);
    
    $acc_no = trim($_POST['acc_no']);
    $acc_no = strip_tags($acc_no);
    $acc_no = htmlspecialchars($acc_no);
    
    $acc_name = trim($_POST['acc_name']);
    $acc_name = strip_tags($acc_name);
    $acc_name = htmlspecialchars($acc_name);
    
    $bank_name = trim($_POST['bank_name']);
    $bank_name = strip_tags($bank_name);
    $bank_name = htmlspecialchars($bank_name);
    
    $swift = trim($_POST['swift']);
    $swift = strip_tags($swift);
    $swift = htmlspecialchars($swift);
    
    $routing = trim($_POST['routing']);
    $routing = strip_tags($routing);
    $routing = htmlspecialchars($routing);
        
    $type = trim($_POST['type']);
    $type = strip_tags($type);
    $type = htmlspecialchars($type);
    
    $remarks = trim($_POST['remarks']);
    $remarks = strip_tags($remarks);
    $remarks = htmlspecialchars($remarks);
    
        $cout = trim($_POST['cout']);
    $cout = strip_tags($cout);
    $cout = htmlspecialchars($cout);
    
        $transtype = trim($_POST['transtype']);
    $transtype = strip_tags($transtype);
    $transtype = htmlspecialchars($transtype);
    
    
    
    if($reg_user->temp($email,$amount,$acc_no,$acc_name,$bank_name,$swift,$routing,$type,$remarks,$cout,$transtype)){
if (isset($_SESSION['acc_no']))
         $codeq = substr(number_format(time() * rand(), 0, '', ''), 0, 6);
 $sql = "UPDATE account SET tmp_otp = '$codeq' WHERE acc_no ='$acc_no'";
 if(mysqli_query($link, $sql))
 $stmt = $reg_user->runQuery("SELECT * FROM account WHERE acc_no = '$acc_no'");
    $stmt->execute();
    $row = $stmt->fetch(PDO::FETCH_ASSOC);

  $sender = "Barclays"; /* sender id */


    $message = " <div class=''>
  <div class='aHl'></div>
  <div id=':190' tabindex='-1'></div>
  <div id=':18p' class='ii gt' jslog='20277; u014N:xr6bB; 4:W251bGwsbnVsbCxbXV0.'>
    <div id=':18o' class='a3s aiL msg3853875273355017072'>
      <u></u>
      <div style='width: 100% !important; margin: 0; padding: 0; background-color: #e8f8ff;'>
        <span style='color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; width: 0;'> </span>
        <table border='0' cellpadding='0' cellspacing='0' role='presentation' style='table-layout: fixed;' width='100%'>
          <tbody>
            <tr>
              <td align='center' valign='top'>
                <table align='center' border='0' cellpadding='0' cellspacing='0' class='m_3853875273355017072pc-email-container' role='presentation' style='margin: 0 auto; max-width: 620px;' width='100%'>
                  <tbody>
                    <tr>
                      <td align='left' style='padding: 0 10px;' valign='top'>
                        <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                          <tbody>
                            <tr>
                              <td height='20' style='font-size: 1px; line-height: 1px;'>&nbsp;</td>
                            </tr>
                          </tbody>
                        </table>
                        <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                          <tbody>
                            <tr>
                              <td valign='top'>
                                <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                                  <tbody>
                                    <tr>
                                      <td bgcolor='#E8F8FF' class='m_3853875273355017072pc-sm-p-30 m_3853875273355017072pc-xs-p-20' style='padding: 29px 35px; background-color: #ffffff; text-align: right; font-size: 0;' valign='top'>
                                        <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                                          <tbody>
                                            <tr>
                                              <td align='center' valign='top'>
                                                  <img alt='' height='32' src='https://skyutahcapitals.com/sitelogo.png' style='max-width: 100%; height: auto; border: 0; line-height: 100%; outline: 0; font-size: 14px; color: #1b1b1b;' width='130' class='CToWUd' data-bit='iit'>
                                              </td>
                                            </tr>
                                          </tbody>
                                        </table>
                                      </td>
                                    </tr>
                                  </tbody>
                                </table>
                                <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                                  <tbody>
                                    <tr>
                                      <td bgcolor='#E8F8FF' class='m_3853875273355017072pc-xs-p-15-10-20 m_3853875273355017072pc-sm-p-20-20-25' style='padding: 20px 30px 35px; background-color: #ffffff;' valign='top'>
                                        <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                                          <tbody>
                                            <tr>
                                              <td height='0' style='font-size: 1px; line-height: 1px;'>&nbsp;</td>
                                            </tr>
                                          </tbody>
                                          <tbody>
                                            <tr>
                                              <td style='padding: 0 10px;' valign='top'>
                                                  <img alt='' height='' src='https://ba.rclays.co/dam/images/index/Index_Hero-Banner.png' style='border: 0; line-height: 100%; outline: 0; border-radius: 6px; max-width: 100%; color: #1b1b1b; display: block; height: auto;' width='520' class='CToWUd' data-bit='iit'>
                                              </td>
                                            </tr>
                                            <tr>
                                              <td height='30' style='line-height: 1px; font-size: 1px;'>&nbsp;</td>
                                            </tr>
                                          </tbody>
                                          <tbody>
                                            <tr>
                                              <td height='12' style='line-height: 1px; font-size: 1px;'>&nbsp;</td>
                                            </tr>
                                          </tbody>
                                          <tbody>
                                            <tr>
                                              
                                            </tr>
                                            <tr>
                                              <td height='25' style='line-height: 1px; font-size: 1px;'>&nbsp;</td>
                                            </tr>
                                          </tbody>
                                          <tbody>
                                            <tr>
                                              <td style='padding: 0 10px; font-family: 'Averta', 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 28px; letter-spacing: -0.2px; color: #00425f;' valign='top'>
                                                <p>Hello $fname,</p>
                                                <p>Please enter OTP to complete your Transfer Process</p>

                                                <br> 

                                                <p><h4>$codeq</h4></p>
                                                
                                                
                                                
                                              </td>
                                            </tr>
                                            <tr>
                                              <td height='15' style='line-height: 1px; font-size: 1px;'>&nbsp;</td>
                                            </tr>
                                          </tbody>
                                          <tbody>
                                            <tr>
                                              <td height='20' style='line-height: 1px; font-size: 1px;'>&nbsp;</td>
                                            </tr>
                                          </tbody>
                                        </table>
                                        
                                        
                                      </td>
                                    </tr>
                                  </tbody>
                                </table>
                                <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                                  <tbody>
                                    <tr>
                                      <td bgcolor='#00425F' style='background-color: #00425f;' valign='top'>
                                        <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                                          <tbody>
                                            <tr>
                                              
                                            </tr>
                                          </tbody>
                                        </table>
                                      </td>
                                    </tr>
                                  </tbody>
                                </table>
                                <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                                  <tbody>
                                    <tr>
                                      <td bgcolor='#FFFFFF' class='m_3853875273355017072pc-sm-p-38-30-40 m_3853875273355017072pc-xs-p-25-20' style='padding: 38px 40px 40px 40px; background-color: #ffffff;' valign='top'>
                                        <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                                          <tbody>
                                            <tr>
                                              <td class='m_3853875273355017072pc-xs-fs-14' style='text-align: center; font-family: Arial, sans-serif; font-size: 24px;' valign='top'>
                                                  <img alt='' height='21' src='http://img.nc.quickteller.com/images/quicktellersmart/quicktellersmart_568/5_53b0d85e-c406-4bcd-92cf-046e6ae77be7.png' style='border: 0; line-height: 100%; outline: 0; font-size: 14px; color: #151515;' width='21' class='CToWUd' data-bit='iit'>
                                                <span>&nbsp;&nbsp;&nbsp;</span>
                                                  <img alt='' height='21' src='http://img.nc.quickteller.com/images/quicktellersmart/quicktellersmart_568/6_1c4aee3c-ad24-4a2e-b4f2-b5aad2b734e6.png' style='border: 0; line-height: 100%; outline: 0; font-size: 14px; color: #151515;' width='21' class='CToWUd' data-bit='iit'>
                                                <span>&nbsp;&nbsp;&nbsp;</span>
                                                  <img alt='' height='21' src='http://img.nc.quickteller.com/images/quicktellersmart/quicktellersmart_568/7_5463fd6e-a546-4c41-8f1f-5110c75f53db.png' style='border: 0; line-height: 100%; outline: 0; font-size: 14px; color: #151515;' width='21' class='CToWUd' data-bit='iit'>
                                              </td>
                                            </tr>
                                            <tr>
                                              <td height='15' style='font-size: 1px; line-height: 1px;' valign='top'>&nbsp;</td>
                                            </tr>
                                          </tbody>
                                          <tbody>
                                            <tr>
                                              <td style='text-align: center; line-height: 20px; letter-spacing: -0.2px; font-family: 'Averta', 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 14px; color: #9b9b9b;' valign='top'>
                                                Philadelphia, PA 19176
                                                <p style='#F00; font-size:13px;line-height: 15px;'>This message is sent to this email to $fname <br> <br> </p><center><b>How do I know this is not a fake email?</b></center> <br>

An email really coming from us will address you by your registered first and last name or your business name. It will not ask you for sensitive information like your password, bank account or credit card details.<br><br>
                                      <p></p>
                                      <p style='#F00; font-size:13px;line-height: 15px;'>Remember not to click any links in suspicious looking emails. </p>
                                              </td>
                                            </tr>
                                            <tr>
                                              <td height='13' style='font-size: 1px; line-height: 1px;'>&nbsp;</td>
                                            </tr>
                                          </tbody>
                                          
                                        </table>
                                      </td>
                                    </tr>
                                  </tbody>
                                </table>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                        <table border='0' cellpadding='0' cellspacing='0' role='presentation' width='100%'>
                          <tbody>
                            <tr>
                              <td height='20' style='font-size: 1px; line-height: 1px;'>&nbsp;</td>
                            </tr>
                          </tbody>
                        </table>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
          </tbody>
        </table>
        <br>
        <div></div>
      </div>
    </div>
  </div>
</div> ";

  
    $acc_no = $_SESSION['acc_no'];

    $queri = " UPDATE account SET tmp_otp = '$codeq' WHERE acc_no ='$acc_no'";
    $resulti = mysqli_query($connection, $queri) or die(mysqli_error($connection));


$subject = "Confirm Transfer OTP";
  $reg_user->send_mail($row['email'], $message, $subject);
      $acc_no = $_SESSION['acc_no'];
$stmt = $reg_user->runQuery("SELECT * FROM account WHERE acc_no = '$acc_no'");
    $stmt->execute();
    $row = $stmt->fetch(PDO::FETCH_ASSOC);

         $reg_user->send_mail($row['email'], $message, $subject);
        $phone = preg_replace('/[^0-9]/', '', $row['phone']);
        $mobile_msg = "Dear " . $row['fname'] . ", Please use the One Time Passcode (OTP): " . $codeq . " to complete your Transfer process";
        $reg_user->otp($phone,$mobile_msg);
       
    header("Location: inter_otp");
    }
    
}
    

?>

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>Inter-Bank Transfer - Skyutah Capitals</title>
            
            <?php include 'header.php';?>

            <main>
                
                    <div class="zz tef">
                        <!-- Content -->
                        <div class="vd jd tto vv tex tta tnk 2xl:mlcvalstart80cvalend">
                            <div class="tey tes">
                                <!-- Cart items -->
                                <div class="rb teu">
                                    <div class="it">
                                        <div class="flex text-sm gk yu lt">
                                            <span class="text-slate-500">Transfer to Same Bank</span>
                                            <span>-&gt;</span>
                                        </div>
                                    </div>
                                    <header class="rb">
                                        <!-- Title -->
                                        <h1 class="gg zj text-slate-800 font-bold in">Inter-Bank Transfer</h1>
                                        <!-- Start -->
                                    <div x-show="open" x-data="{ open: true }">
                                        <div class="vd vg rounded-sm text-sm pe border hn yh">
                                            <div class="flex oq fg fd">
                                                <div class="flex">
                                                    <svg class="ue on ap db bp if rk" viewBox="0 0 16 16">
                                                        <path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 12c-.6 0-1-.4-1-1s.4-1 1-1 1 .4 1 1-.4 1-1 1zm1-3H7V4h2v5z"></path>
                                                    </svg>
                                                    <div><marquee>Your IP:<b> <?php echo $_SERVER['REMOTE_ADDR']; ?> </b>has been logged on our server at <?php echo date("h:i A d M Y"); ?> to monitor and Secure your Transaction.</marquee></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                        <p>Ensure you fill the forms Carefully and correctly</p>
                                    </header>
                                    <?php 
                            if(isset($_GET['error']))
                                {
                                    ?>
                                    <!-- Start -->
                                        <div x-show='open' x-data='{ open: true }'>
                                            <div class='vd vg rounded-sm text-sm pt border hi yp'>
                                                <div class='flex oq fg fd'>
                                                    <div class='flex'>
                                                        <svg class='ue on ap db bp if rk' viewBox='0 0 16 16'>
                                                            <path d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm3.5 10.1l-1.4 1.4L8 9.4l-2.1 2.1-1.4-1.4L6.6 8 4.5 5.9l1.4-1.4L8 6.6l2.1-2.1 1.4 1.4L9.4 8l2.1 2.1z'></path>
                                                        </svg>
                                                        <div>Unable to Authenticate. Transfer Failed.</div>
                                                    </div>
                                                    <button class='bd ke ml-3 if' @click='open = false'>
                                                        <div class='tc'>Close</div>
                                                        <svg class='ue on db'>
                                                            <path
                                                                d='M7.95 6.536l4.242-4.243a1 1 0 111.415 1.414L9.364 7.95l4.243 4.242a1 1 0 11-1.415 1.415L7.95 9.364l-4.243 4.243a1 1 0 01-1.414-1.415L6.536 7.95 2.293 3.707a1 1 0 011.414-1.414L7.95 6.536z'
                                                            ></path>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End -->
                                    <?php
                                }
                        ?>
                        <?php 
                            if(isset($_GET['errorcot']))
                                {
                                    ?><!-- Start -->
                                        <div x-show='open' x-data='{ open: true }'>
                                            <div class='vd vg rounded-sm text-sm pt border hi yp'>
                                                <div class='flex oq fg fd'>
                                                    <div class='flex'>
                                                        <svg class='ue on ap db bp if rk' viewBox='0 0 16 16'>
                                                            <path d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm3.5 10.1l-1.4 1.4L8 9.4l-2.1 2.1-1.4-1.4L6.6 8 4.5 5.9l1.4-1.4L8 6.6l2.1-2.1 1.4 1.4L9.4 8l2.1 2.1z'></path>
                                                        </svg>
                                                        <div>Invalid COT Code! Transfer Failed.</div>
                                                    </div>
                                                    <button class='bd ke ml-3 if' @click='open = false'>
                                                        <div class='tc'>Close</div>
                                                        <svg class='ue on db'>
                                                            <path
                                                                d='M7.95 6.536l4.242-4.243a1 1 0 111.415 1.414L9.364 7.95l4.243 4.242a1 1 0 11-1.415 1.415L7.95 9.364l-4.243 4.243a1 1 0 01-1.414-1.415L6.536 7.95 2.293 3.707a1 1 0 011.414-1.414L7.95 6.536z'
                                                            ></path>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End -->
                                    <?php
                                }
                        ?>
                        <?php 
                            if(isset($_GET['errortax']))
                                {
                                    ?><!-- Start -->
                                        <div x-show='open' x-data='{ open: true }'>
                                            <div class='vd vg rounded-sm text-sm pt border hi yp'>
                                                <div class='flex oq fg fd'>
                                                    <div class='flex'>
                                                        <svg class='ue on ap db bp if rk' viewBox='0 0 16 16'>
                                                            <path d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm3.5 10.1l-1.4 1.4L8 9.4l-2.1 2.1-1.4-1.4L6.6 8 4.5 5.9l1.4-1.4L8 6.6l2.1-2.1 1.4 1.4L9.4 8l2.1 2.1z'></path>
                                                        </svg>
                                                        <div>Invalid Tax Code! Transfer Failed.</div>
                                                    </div>
                                                    <button class='bd ke ml-3 if' @click='open = false'>
                                                        <div class='tc'>Close</div>
                                                        <svg class='ue on db'>
                                                            <path
                                                                d='M7.95 6.536l4.242-4.243a1 1 0 111.415 1.414L9.364 7.95l4.243 4.242a1 1 0 11-1.415 1.415L7.95 9.364l-4.243 4.243a1 1 0 01-1.414-1.415L6.536 7.95 2.293 3.707a1 1 0 011.414-1.414L7.95 6.536z'
                                                            ></path>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End -->
                                    <?php
                                }
                        ?>
                        <?php 
                            if(isset($_GET['errorotp']))
                                {
                                    ?><!-- Start -->
                                        <div x-show='open' x-data='{ open: true }'>
                                            <div class='vd vg rounded-sm text-sm pt border hi yp'>
                                                <div class='flex oq fg fd'>
                                                    <div class='flex'>
                                                        <svg class='ue on ap db bp if rk' viewBox='0 0 16 16'>
                                                            <path d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm3.5 10.1l-1.4 1.4L8 9.4l-2.1 2.1-1.4-1.4L6.6 8 4.5 5.9l1.4-1.4L8 6.6l2.1-2.1 1.4 1.4L9.4 8l2.1 2.1z'></path>
                                                        </svg>
                                                        <div>Invalid TRANSFER OTP Code! Transfer Failed.</div>
                                                    </div>
                                                    <button class='bd ke ml-3 if' @click='open = false'>
                                                        <div class='tc'>Close</div>
                                                        <svg class='ue on db'>
                                                            <path
                                                                d='M7.95 6.536l4.242-4.243a1 1 0 111.415 1.414L9.364 7.95l4.243 4.242a1 1 0 11-1.415 1.415L7.95 9.364l-4.243 4.243a1 1 0 01-1.414-1.415L6.536 7.95 2.293 3.707a1 1 0 011.414-1.414L7.95 6.536z'
                                                            ></path>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End -->

                                    <?php
                                }
                        ?>
                        <?php 
                            if(isset($_GET['insufficient']))
                                {
                                    ?><!-- Start -->
                                        <div x-show='open' x-data='{ open: true }'>
                                            <div class='vd vg rounded-sm text-sm pt border hi yp'>
                                                <div class='flex oq fg fd'>
                                                    <div class='flex'>
                                                        <svg class='ue on ap db bp if rk' viewBox='0 0 16 16'>
                                                            <path d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm3.5 10.1l-1.4 1.4L8 9.4l-2.1 2.1-1.4-1.4L6.6 8 4.5 5.9l1.4-1.4L8 6.6l2.1-2.1 1.4 1.4L9.4 8l2.1 2.1z'></path>
                                                        </svg>
                                                        <div>Sorry, your balance is insufficient to make the transfer, please transfer a lower amount..</div>
                                                    </div>
                                                    <button class='bd ke ml-3 if' @click='open = false'>
                                                        <div class='tc'>Close</div>
                                                        <svg class='ue on db'>
                                                            <path
                                                                d='M7.95 6.536l4.242-4.243a1 1 0 111.415 1.414L9.364 7.95l4.243 4.242a1 1 0 11-1.415 1.415L7.95 9.364l-4.243 4.243a1 1 0 01-1.414-1.415L6.536 7.95 2.293 3.707a1 1 0 011.414-1.414L7.95 6.536z'
                                                            ></path>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End -->
                                    <?php
                                }
                        ?>
                        <?php 
                            if(isset($_GET['amounterror']))
                                {
                                    ?>
                                    <!-- Start -->
                                        <div x-show='open' x-data='{ open: true }'>
                                            <div class='vd vg rounded-sm text-sm pt border hi yp'>
                                                <div class='flex oq fg fd'>
                                                    <div class='flex'>
                                                        <svg class='ue on ap db bp if rk' viewBox='0 0 16 16'>
                                                            <path d='M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm3.5 10.1l-1.4 1.4L8 9.4l-2.1 2.1-1.4-1.4L6.6 8 4.5 5.9l1.4-1.4L8 6.6l2.1-2.1 1.4 1.4L9.4 8l2.1 2.1z'></path>
                                                        </svg>
                                                        <div>Sorry, the amount is too little, please transfer a higher amount.</div>
                                                    </div>
                                                    <button class='bd ke ml-3 if' @click='open = false'>
                                                        <div class='tc'>Close</div>
                                                        <svg class='ue on db'>
                                                            <path
                                                                d='M7.95 6.536l4.242-4.243a1 1 0 111.415 1.414L9.364 7.95l4.243 4.242a1 1 0 11-1.415 1.415L7.95 9.364l-4.243 4.243a1 1 0 01-1.414-1.415L6.536 7.95 2.293 3.707a1 1 0 011.414-1.414L7.95 6.536z'
                                                            ></path>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- End -->
                                    <?php
                                }
                        ?>
                                    <!-- Billing Information -->
                                    <div>
                                        <div class="text-slate-800 g_ rw">Transfer Details</div>
                                        <form autocomplete="off" method="post" >
                                            <?php if(isset($error)){ echo $error;}?>
                                            <?php if(isset($errorcot)){ echo $errorcot;}?>
                                            <?php if(isset($errortax)){ echo $errortax;}?>
                                            <?php if(isset($errorpin)){ echo $errorpin;}?>
                                            <?php if(isset($insufficient)){ echo $insufficient;}?>
                                            <?php if(isset($amounterror)){ echo $amounterror;}?>
                                                <?php if(isset($errorotp)){ echo $errorotp;}?>
                                            <div class="ln">
                                                <!-- 1st row -->
                                                <div class="qd ln zu za">
                                                    <div class="ac">
                                                        <label class="block text-sm gk rx" for="card-name">Beneficiary Account Name <span class="yl">*</span></label>
                                                        <input class="tn oq" type="text" name="acc_name" />
                                                    </div>
                                                    <div class="ac">
                                                        <label class="block text-sm gk rx" for="card-surname">Beneficiary Account Number <span class="yl">*</span></label>
                                                        <input class="tn oq" type="number" name="acc_no" />
                                                    </div>
                                                </div>
                                                <!-- 2nd row -->
                                                <div class="qd ln zu za">
                                                    <div class="ac">
                                                    <label class="block text-sm gk rx" for="prefix">Amount <span class="yl">*</span></label>
                                                    <div class="td">
                                                    <input id="prefix" class="tn oq my" type="number" name="amount"/>
                                                    <div class="tp tm tg flex items-center pointer-events-none">
                                                    <span class="text-sm yu gk me"><?php echo $row['currency']; ?></span>
                                                    </div>
                                                    </div>
                                                    </div>

                                                </div>
                                                <!-- 3rd row -->
                                                <div>
                                                    <div class="ac">
                                                        <label class="block text-sm gk rx" for="card-country">Account Type <span class="yl">*</span></label>
                                                        <select class="ts oq" name="type">
                                                            <option value="Savings">Savings</option>
                                                            <option value="Current">Current</option>
                                                            <option value="Checking">Checking</option>
                                                            <option value="Fix Deposit">Fixed Deposit</option>
                                                            <option value="NON RESIDENT">Non-Resident</option>
                                                            <option value="ONLINE BANKING">Online Banking</option>
                                                            <option value="DOMICILIARY ACCOUNT">Domiciliary Account</option>
                                                            <option value="JOINT ACCOUNT">Joint Account</option>
                                                        </select>
                                                    </div>
                                                    <div class="ac">
                                                        <label class="block text-sm gk rx" for="card-state">Description <span class="yl">*</span></label>
                                                        <textarea class="tr oq kn" rows="4" placeholder="Transfer Description" name="remarks"></textarea>
                                                        <input placeholder="Bank Name" name="bank_name" value="Inter-Bank" type="text" hidden>
                                                        <input type="hidden" class="form-control" name="uname" value="<?php echo $row['email']; ?> "/>
                                                        <input placeholder="Bank Address" name="swift" type="hidden" value="DOMESTIC" required>
                                                        <input class="form-control" placeholder="Swiftcode" name="routing" type="hidden" value="DOMESTIC" required>
                                                        <input class="form-control" placeholder="Swiftcode" name="cout" type="hidden" value="Domestic-Transfer" required>
                                                        <input class="form-control" placeholder="Swiftcode" name="transtype" type="hidden" value="InterBank" required>
                                                    </div>
                                                </div>
                                                <div class="gd">
                                                    <button type="submit" class="btn bg-white border-slate-200 hover--border-slate-300 text-indigo-500" name="transfer">Transfer</button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                    <!-- Divider -->
                                    <hr class="ru ck border-slate-200" />
                                </div>
                            </div>
                        </div>
                    </div>
                </main>

            <?php include 'footer.php';?>