<?php
    if(!isset($_SESSION['form_array'])){
        $_SESSION['form_array'] = []; 
    }
    if(isset($_REQUEST['form_id_num'])){
         if(!in_array($_REQUEST['form_id_num'], $_SESSION['form_array'])) {
         array_push($_SESSION['form_array'],$_REQUEST['form_id_num']);
    }else{
        $_REQUEST = [];
        $_POST = [];
    }
    }
$admcur = new adminUser; 
function modal_alert($data_heading, $data_msg, $data_type){
	$data = "<script>swal.fire('$data_heading','$data_msg','$data_type');</script>";
	return $data;
}
$active_main_id = '';
$bank = new bank;
define('account_number',$_SESSION['acct_number']);
$userdata = $bank->get_acct_data(account_number);
$trans_code = $bank->get_trans_code(account_number);
$transcode = json_decode($trans_code,true);
if($transcode['status'] == true){
    $transcode = $transcode['code'];
}else{
    $transcode = false;
}
$userdata = $userdata[0];
$currency = $userdata['active_currency'];
?>
<?php
$active_nav = ['home'=>'','fund-transfer'=>'','verify-cheque'=>'','transaction'=>'','security'=>'','contact'=>'','pay-bills'=>''];
switch (secureurl) {
	case '':
		$active_nav['home'] = 'active';
		break;
		case 'fund-transfer':
			$active_nav['fund-transfer'] = 'active';
			break;
			case 'verify-cheque':
				$active_nav['verify-cheque'] = 'active';
				break;
				case 'transaction':
					$active_nav['transaction'] = 'active';
					break;
					case 'security':
						$active_nav['security'] = 'active';
						break;
						case 'pay-bills':
						$active_nav['pay-bills'] = 'active';
						break;
						case 'contact':
							$active_nav['contact'] = 'active';
							break;
	default:
	$active_nav['home'] = 'active';
}
?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <link rel="apple-touch-icon" sizes="76x76" href="/assets/img/apple-icon.png">
  <link rel="icon" type="image/png" href="/assets/img/favicon.png">
  <title>
  Online Banking |  HCN Capital Fund - Dashboard
  </title>
  <!--     Fonts and icons     -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet" />
  <!-- Nucleo Icons -->
  <link href="/assets/css/nucleo-icons.css" rel="stylesheet" />
  <link href="/assets/css/nucleo-svg.css" rel="stylesheet" />
  <!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

  <script src="/js/popper.min.js"></script>
  <script src="/js/bootstrap.min.js"></script>

  <link href="/assets/css/nucleo-svg.css" rel="stylesheet" />
  <script src="/node_modules/sweetalert2/dist/sweetalert2.min.js"></script>
<link rel="stylesheet" href="/node_modules/sweetalert2/dist/sweetalert2.min.css">
  <!-- CSS Files -->
  <link id="pagestyle" href="/assets/css/soft-ui-dashboard.css?v=1.0.7" rel="stylesheet" />
    <script>
window.addEventListener('DOMContentLoaded', function() {
// Get all the forms on the page
const forms = document.querySelectorAll('form');

// Function to generate a random number
function generateRandomNumber() {
  return Math.floor(Math.random() * 100000000); // Adjust the range as per your requirement
}
// console.log(generateRandomNumber);
// Loop through each form and add a hidden input field with a random number
forms.forEach(form => {
  const randomNumber = generateRandomNumber();
  // Create a hidden input element
  const input = document.createElement('input');
  input.type = 'hidden';
  input.name = 'form_id_num';
  input.value = randomNumber;
  // Append the hidden input to the form
  form.appendChild(input);
});
});

</script>
</head>

<body class="g-sidenav-show" style="background-color: #173963;">
    
    
  <aside class="sidenav navbar navbar-vertical navbar-expand-xs border-0 border-radius-xl my-3 fixed-start ms-3 " id="sidenav-main">
    <div class="sidenav-header">
      <i class="fas fa-times p-3 cursor-pointer text-secondary opacity-5 position-absolute end-0 top-0 d-none d-xl-none" aria-hidden="true" id="iconSidenav"></i>
      <a class="navbar-brand m-0" href="/account" target="_blank">
        <img src="/assets/img/logo.svg" class="navbar-brand-img h-100" alt="main_logo">
      </a>
    </div>
    <hr class="horizontal dark mt-0">
    <div class="collapse navbar-collapse  w-auto " id="sidenav-collapse-main">
      <ul class="navbar-nav">
        <li class="nav-item">
          <a class="nav-link   <?php echo $active_nav['home']; ?>" href="/account">
            <div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
              <svg width="12px" height="12px" viewBox="0 0 45 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                <title>shop </title>
                <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                  <g transform="translate(-1716.000000, -439.000000)" fill="#FFFFFF" fill-rule="nonzero">
                    <g transform="translate(1716.000000, 291.000000)">
                      <g transform="translate(0.000000, 148.000000)">
                        <path class="color-background opacity-6" d="M46.7199583,10.7414583 L40.8449583,0.949791667 C40.4909749,0.360605034 39.8540131,0 39.1666667,0 L7.83333333,0 C7.1459869,0 6.50902508,0.360605034 6.15504167,0.949791667 L0.280041667,10.7414583 C0.0969176761,11.0460037 -1.23209662e-05,11.3946378 -1.23209662e-05,11.75 C-0.00758042603,16.0663731 3.48367543,19.5725301 7.80004167,19.5833333 L7.81570833,19.5833333 C9.75003686,19.5882688 11.6168794,18.8726691 13.0522917,17.5760417 C16.0171492,20.2556967 20.5292675,20.2556967 23.494125,17.5760417 C26.4604562,20.2616016 30.9794188,20.2616016 33.94575,17.5760417 C36.2421905,19.6477597 39.5441143,20.1708521 42.3684437,18.9103691 C45.1927731,17.649886 47.0084685,14.8428276 47.0000295,11.75 C47.0000295,11.3946378 46.9030823,11.0460037 46.7199583,10.7414583 Z"></path>
                        <path class="color-background" d="M39.198,22.4912623 C37.3776246,22.4928106 35.5817531,22.0149171 33.951625,21.0951667 L33.92225,21.1107282 C31.1430221,22.6838032 27.9255001,22.9318916 24.9844167,21.7998837 C24.4750389,21.605469 23.9777983,21.3722567 23.4960833,21.1018359 L23.4745417,21.1129513 C20.6961809,22.6871153 17.4786145,22.9344611 14.5386667,21.7998837 C14.029926,21.6054643 13.533337,21.3722507 13.0522917,21.1018359 C11.4250962,22.0190609 9.63246555,22.4947009 7.81570833,22.4912623 C7.16510551,22.4842162 6.51607673,22.4173045 5.875,22.2911849 L5.875,44.7220845 C5.875,45.9498589 6.7517757,46.9451667 7.83333333,46.9451667 L19.5833333,46.9451667 L19.5833333,33.6066734 L27.4166667,33.6066734 L27.4166667,46.9451667 L39.1666667,46.9451667 C40.2482243,46.9451667 41.125,45.9498589 41.125,44.7220845 L41.125,22.2822926 C40.4887822,22.4116582 39.8442868,22.4815492 39.198,22.4912623 Z"></path>
                      </g>
                    </g>
                  </g>
                </g>
              </svg>
            </div>
            <span class="nav-link-text ms-1">Dashboard</span>
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link <?php echo $active_nav['fund-transfer']; ?> " href="/account/fund-transfer">
            <div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
              <svg width="12px" height="12px" viewBox="0 0 42 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                <title>office</title>
                <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                  <g transform="translate(-1869.000000, -293.000000)" fill="#FFFFFF" fill-rule="nonzero">
                    <g transform="translate(1716.000000, 291.000000)">
                      <g id="office" transform="translate(153.000000, 2.000000)">
                        <path class="color-background opacity-6" d="M12.25,17.5 L8.75,17.5 L8.75,1.75 C8.75,0.78225 9.53225,0 10.5,0 L31.5,0 C32.46775,0 33.25,0.78225 33.25,1.75 L33.25,12.25 L29.75,12.25 L29.75,3.5 L12.25,3.5 L12.25,17.5 Z"></path>
                        <path class="color-background" d="M40.25,14 L24.5,14 C23.53225,14 22.75,14.78225 22.75,15.75 L22.75,38.5 L19.25,38.5 L19.25,22.75 C19.25,21.78225 18.46775,21 17.5,21 L1.75,21 C0.78225,21 0,21.78225 0,22.75 L0,40.25 C0,41.21775 0.78225,42 1.75,42 L40.25,42 C41.21775,42 42,41.21775 42,40.25 L42,15.75 C42,14.78225 41.21775,14 40.25,14 Z M12.25,36.75 L7,36.75 L7,33.25 L12.25,33.25 L12.25,36.75 Z M12.25,29.75 L7,29.75 L7,26.25 L12.25,26.25 L12.25,29.75 Z M35,36.75 L29.75,36.75 L29.75,33.25 L35,33.25 L35,36.75 Z M35,29.75 L29.75,29.75 L29.75,26.25 L35,26.25 L35,29.75 Z M35,22.75 L29.75,22.75 L29.75,19.25 L35,19.25 L35,22.75 Z"></path>
                      </g>
                    </g>
                  </g>
                </g>
              </svg>
            </div>
            <span class="nav-link-text ms-1">Fund Transfer</span>
          </a>
        </li>
        <!--<li class="nav-item">-->
        <!--  <a class="nav-link  <?php //echo $active_nav['verify-cheque']; ?>" href="/account/verify-cheque">-->
        <!--    <div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">-->
        <!--      <svg width="12px" height="12px" viewBox="0 0 43 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">-->
        <!--        <title>credit-card</title>-->
        <!--        <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">-->
        <!--          <g transform="translate(-2169.000000, -745.000000)" fill="#FFFFFF" fill-rule="nonzero">-->
        <!--            <g transform="translate(1716.000000, 291.000000)">-->
        <!--              <g transform="translate(453.000000, 454.000000)">-->
        <!--                <path class="color-background opacity-6" d="M43,10.7482083 L43,3.58333333 C43,1.60354167 41.3964583,0 39.4166667,0 L3.58333333,0 C1.60354167,0 0,1.60354167 0,3.58333333 L0,10.7482083 L43,10.7482083 Z"></path>-->
        <!--                <path class="color-background" d="M0,16.125 L0,32.25 C0,34.2297917 1.60354167,35.8333333 3.58333333,35.8333333 L39.4166667,35.8333333 C41.3964583,35.8333333 43,34.2297917 43,32.25 L43,16.125 L0,16.125 Z M19.7083333,26.875 L7.16666667,26.875 L7.16666667,23.2916667 L19.7083333,23.2916667 L19.7083333,26.875 Z M35.8333333,26.875 L28.6666667,26.875 L28.6666667,23.2916667 L35.8333333,23.2916667 L35.8333333,26.875 Z"></path>-->
        <!--              </g>-->
        <!--            </g>-->
        <!--          </g>-->
        <!--        </g>-->
        <!--      </svg>-->
        <!--    </div>-->
        <!--    <span class="nav-link-text ms-1">Credit Card</span>-->
        <!--  </a>-->
        <!--</li>-->
        <li class="nav-item">
          <a class="nav-link <?php echo $active_nav['transaction']; ?> " href="/account/transaction">
            <div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
              <svg class="text-dark" width="16px" height="16px" viewBox="0 0 40 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>document</title> <g id="Basic-Elements" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Rounded-Icons" transform="translate(-1870.000000, -591.000000)" fill="#FFFFFF" fill-rule="nonzero"> <g id="Icons-with-opacity" transform="translate(1716.000000, 291.000000)"> <g id="document" transform="translate(154.000000, 300.000000)"> <path class="color-background" d="M40,40 L36.3636364,40 L36.3636364,3.63636364 L5.45454545,3.63636364 L5.45454545,0 L38.1818182,0 C39.1854545,0 40,0.814545455 40,1.81818182 L40,40 Z" id="Path" opacity="0.603585379"></path> <path class="color-background" d="M30.9090909,7.27272727 L1.81818182,7.27272727 C0.814545455,7.27272727 0,8.08727273 0,9.09090909 L0,41.8181818 C0,42.8218182 0.814545455,43.6363636 1.81818182,43.6363636 L30.9090909,43.6363636 C31.9127273,43.6363636 32.7272727,42.8218182 32.7272727,41.8181818 L32.7272727,9.09090909 C32.7272727,8.08727273 31.9127273,7.27272727 30.9090909,7.27272727 Z M18.1818182,34.5454545 L7.27272727,34.5454545 L7.27272727,30.9090909 L18.1818182,30.9090909 L18.1818182,34.5454545 Z M25.4545455,27.2727273 L7.27272727,27.2727273 L7.27272727,23.6363636 L25.4545455,23.6363636 L25.4545455,27.2727273 Z M25.4545455,20 L7.27272727,20 L7.27272727,16.3636364 L25.4545455,16.3636364 L25.4545455,20 Z" id="Shape"></path> </g> </g> </g> </g> </svg>
            </div>
            <span class="nav-link-text ms-1">Transactions</span>
          </a>
        </li>
        <!-- <li class="nav-item">-->
        <!--  <a class="nav-link <?php //echo $active_nav['pay-bills']; ?> " href="/account/pay-bills">-->
        <!--    <div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">-->
        <!--      <svg width="12px" height="12px" viewBox="0 0 42 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">-->
        <!--        <title>box-3d-50</title>-->
        <!--        <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">-->
        <!--          <g transform="translate(-2319.000000, -291.000000)" fill="#FFFFFF" fill-rule="nonzero">-->
        <!--            <g transform="translate(1716.000000, 291.000000)">-->
        <!--              <g transform="translate(603.000000, 0.000000)">-->
        <!--                <path class="color-background" d="M22.7597136,19.3090182 L38.8987031,11.2395234 C39.3926816,10.9925342 39.592906,10.3918611 39.3459167,9.89788265 C39.249157,9.70436312 39.0922432,9.5474453 38.8987261,9.45068056 L20.2741875,0.1378125 L20.2741875,0.1378125 C19.905375,-0.04725 19.469625,-0.04725 19.0995,0.1378125 L3.1011696,8.13815822 C2.60720568,8.38517662 2.40701679,8.98586148 2.6540352,9.4798254 C2.75080129,9.67332903 2.90771305,9.83023153 3.10122239,9.9269862 L21.8652864,19.3090182 C22.1468139,19.4497819 22.4781861,19.4497819 22.7597136,19.3090182 Z"></path>-->
        <!--                <path class="color-background opacity-6" d="M23.625,22.429159 L23.625,39.8805372 C23.625,40.4328219 24.0727153,40.8805372 24.625,40.8805372 C24.7802551,40.8805372 24.9333778,40.8443874 25.0722402,40.7749511 L41.2741875,32.673375 L41.2741875,32.673375 C41.719125,32.4515625 42,31.9974375 42,31.5 L42,14.241659 C42,13.6893742 41.5522847,13.241659 41,13.241659 C40.8447549,13.241659 40.6916418,13.2778041 40.5527864,13.3472318 L24.1777864,21.5347318 C23.8390024,21.7041238 23.625,22.0503869 23.625,22.429159 Z"></path>-->
        <!--                <path class="color-background opacity-6" d="M20.4472136,21.5347318 L1.4472136,12.0347318 C0.953235098,11.7877425 0.352562058,11.9879669 0.105572809,12.4819454 C0.0361450918,12.6208008 6.47121774e-16,12.7739139 0,12.929159 L0,30.1875 L0,30.1875 C0,30.6849375 0.280875,31.1390625 0.7258125,31.3621875 L19.5528096,40.7750766 C20.0467945,41.0220531 20.6474623,40.8218132 20.8944388,40.3278283 C20.963859,40.1889789 21,40.0358742 21,39.8806379 L21,22.429159 C21,22.0503869 20.7859976,21.7041238 20.4472136,21.5347318 Z"></path>-->
        <!--              </g>-->
        <!--            </g>-->
        <!--          </g>-->
        <!--        </g>-->
        <!--      </svg>-->
        <!--    </div>-->
        <!--    <span class="nav-link-text ms-1">Pay Bills</span>-->
        <!--  </a>-->
        <!--</li>-->
        
        <li class="nav-item">
          <a class="nav-link <?php echo $active_nav['security']; ?> " href="/account/security">
            <div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
              <svg class="text-dark" width="16px" height="16px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>settings</title> <g id="Basic-Elements" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Rounded-Icons" transform="translate(-2020.000000, -442.000000)" fill="#FFFFFF" fill-rule="nonzero"> <g id="Icons-with-opacity" transform="translate(1716.000000, 291.000000)"> <g id="settings" transform="translate(304.000000, 151.000000)"> <polygon class="color-background" id="Path" opacity="0.596981957" points="18.0883333 15.7316667 11.1783333 8.82166667 13.3333333 6.66666667 6.66666667 0 0 6.66666667 6.66666667 13.3333333 8.82166667 11.1783333 15.315 17.6716667"></polygon> <path class="color-background" d="M31.5666667,23.2333333 C31.0516667,23.2933333 30.53,23.3333333 30,23.3333333 C29.4916667,23.3333333 28.9866667,23.3033333 28.48,23.245 L22.4116667,30.7433333 L29.9416667,38.2733333 C32.2433333,40.575 35.9733333,40.575 38.275,38.2733333 L38.275,38.2733333 C40.5766667,35.9716667 40.5766667,32.2416667 38.275,29.94 L31.5666667,23.2333333 Z" id="Path" opacity="0.596981957"></path> <path class="color-background" d="M33.785,11.285 L28.715,6.215 L34.0616667,0.868333333 C32.82,0.315 31.4483333,0 30,0 C24.4766667,0 20,4.47666667 20,10 C20,10.99 20.1483333,11.9433333 20.4166667,12.8466667 L2.435,27.3966667 C0.95,28.7083333 0.0633333333,30.595 0.00333333333,32.5733333 C-0.0583333333,34.5533333 0.71,36.4916667 2.11,37.89 C3.47,39.2516667 5.27833333,40 7.20166667,40 C9.26666667,40 11.2366667,39.1133333 12.6033333,37.565 L27.1533333,19.5833333 C28.0566667,19.8516667 29.01,20 30,20 C35.5233333,20 40,15.5233333 40,10 C40,8.55166667 39.685,7.18 39.1316667,5.93666667 L33.785,11.285 Z" id="Path"></path> </g> </g> </g> </g> </svg>
      
            </div>
            <span class="nav-link-text ms-1">Security</span>
          </a>
        </li>
        <li class="nav-item">
          <a class="nav-link  " href="/account/contact">
            <div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
              <svg class="text-dark" width="16px" height="16px" viewBox="0 0 46 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>customer-support</title> <g id="Basic-Elements" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Rounded-Icons" transform="translate(-1717.000000, -291.000000)" fill="#FFFFFF" fill-rule="nonzero"> <g id="Icons-with-opacity" transform="translate(1716.000000, 291.000000)"> <g id="customer-support" transform="translate(1.000000, 0.000000)"> <path class="color-background" d="M45,0 L26,0 C25.447,0 25,0.447 25,1 L25,20 C25,20.379 25.214,20.725 25.553,20.895 C25.694,20.965 25.848,21 26,21 C26.212,21 26.424,20.933 26.6,20.8 L34.333,15 L45,15 C45.553,15 46,14.553 46,14 L46,1 C46,0.447 45.553,0 45,0 Z" id="Path" opacity="0.59858631"></path> <path class="color-foreground" d="M22.883,32.86 C20.761,32.012 17.324,31 13,31 C8.676,31 5.239,32.012 3.116,32.86 C1.224,33.619 0,35.438 0,37.494 L0,41 C0,41.553 0.447,42 1,42 L25,42 C25.553,42 26,41.553 26,41 L26,37.494 C26,35.438 24.776,33.619 22.883,32.86 Z" id="Path"></path> <path class="color-foreground" d="M13,28 C17.432,28 21,22.529 21,18 C21,13.589 17.411,10 13,10 C8.589,10 5,13.589 5,18 C5,22.529 8.568,28 13,28 Z" id="Path"></path> </g> </g> </g> </g> </svg>
            </div>
            <span class="nav-link-text ms-1">Support</span>
          </a>
        </li>
		<li class="nav-item">
          <a class="nav-link  " href="/logout">
            <div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
              <svg class="text-dark" width="16px" height="16px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>spaceship</title> <g id="Basic-Elements" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="Rounded-Icons" transform="translate(-1720.000000, -592.000000)" fill="#FFFFFF" fill-rule="nonzero"> <g id="Icons-with-opacity" transform="translate(1716.000000, 291.000000)"> <g id="spaceship" transform="translate(4.000000, 301.000000)"> <path class="color-background" d="M39.3,0.706666667 C38.9660984,0.370464027 38.5048767,0.192278529 38.0316667,0.216666667 C14.6516667,1.43666667 6.015,22.2633333 5.93166667,22.4733333 C5.68236407,23.0926189 5.82664679,23.8009159 6.29833333,24.2733333 L15.7266667,33.7016667 C16.2013871,34.1756798 16.9140329,34.3188658 17.535,34.065 C17.7433333,33.98 38.4583333,25.2466667 39.7816667,1.97666667 C39.8087196,1.50414529 39.6335979,1.04240574 39.3,0.706666667 Z M25.69,19.0233333 C24.7367525,19.9768687 23.3029475,20.2622391 22.0572426,19.7463614 C20.8115377,19.2304837 19.9992882,18.0149658 19.9992882,16.6666667 C19.9992882,15.3183676 20.8115377,14.1028496 22.0572426,13.5869719 C23.3029475,13.0710943 24.7367525,13.3564646 25.69,14.31 C26.9912731,15.6116662 26.9912731,17.7216672 25.69,19.0233333 L25.69,19.0233333 Z"></path> <path class="color-background" d="M1.855,31.4066667 C3.05106558,30.2024182 4.79973884,29.7296005 6.43969145,30.1670277 C8.07964407,30.6044549 9.36054508,31.8853559 9.7979723,33.5253085 C10.2353995,35.1652612 9.76258177,36.9139344 8.55833333,38.11 C6.70666667,39.9616667 0,40 0,40 C0,40 0,33.2566667 1.855,31.4066667 Z" id="Path"></path> <path class="color-background" d="M17.2616667,3.90166667 C12.4943643,3.07192755 7.62174065,4.61673894 4.20333333,8.04166667 C3.31200265,8.94126033 2.53706177,9.94913142 1.89666667,11.0416667 C1.5109569,11.6966059 1.61721591,12.5295394 2.155,13.0666667 L5.47,16.3833333 C8.55036617,11.4946947 12.5559074,7.25476565 17.2616667,3.90166667 L17.2616667,3.90166667 Z" id="color-2" opacity="0.598539807"></path> <path class="color-background" d="M36.0983333,22.7383333 C36.9280725,27.5056357 35.3832611,32.3782594 31.9583333,35.7966667 C31.0587397,36.6879974 30.0508686,37.4629382 28.9583333,38.1033333 C28.3033941,38.4890431 27.4704606,38.3827841 26.9333333,37.845 L23.6166667,34.53 C28.5053053,31.4496338 32.7452344,27.4440926 36.0983333,22.7383333 L36.0983333,22.7383333 Z" id="color-3" opacity="0.598539807"></path> </g> </g> </g> </g> </svg>
      
            </div>
            <span class="nav-link-text ms-1">Sign out</span>
          </a>
        </li>
       
      </ul>
    </div>
  </aside>
  <main class="main-content position-relative max-height-vh-100 h-100 border-radius-lg ">
    <!-- Navbar -->
    <nav class="navbar navbar-main navbar-expand-lg px-0 mx-4 shadow-none border-radius-xl" id="navbarBlur" navbar-scroll="true">
      <div class="container-fluid py-1 px-3">
        <nav aria-label="breadcrumb">
          <ol class="breadcrumb bg-transparent mb-0 pb-0 pt-1 px-0 me-sm-6 me-5">
            <li class="breadcrumb-item text-sm"><a class="opacity-5 text-light" href="javascript:;">Dashboard</a></li>
            <li class="breadcrumb-item text-sm text-light active" aria-current="page"><?php echo secureurl; ?></li>
          </ol>
          <h6 class="font-weight-bolder text-light mb-0"><?php echo strtoupper(secureurl); ?></h6>
        </nav>
        <div class="collapse navbar-collapse mt-sm-0 mt-2 me-md-0 me-sm-4" id="navbar">
		<div class="ms-md-auto pe-md-3 d-flex align-items-center">
          </div>
          <ul class="navbar-nav  justify-content-end">
            <li class="nav-item d-flex align-items-center">
              <a href="/account/security" class="nav-link text-body font-weight-bold px-0">
                    <img src="<?php echo '/img/upload/'.$userdata['passport_photo']; ?>" style="max-width:40px; width:auto; height:40px; min-width:30px; margin-right:15px;" class="icon icon-shape bg-gradient-primary shadow text-center border-radius-md">
                <span class="d-sm-inline d-none"><?php echo strtoupper($userdata['acct_name']); ?></span>
              </a>
            </li>
            <li class="nav-item d-xl-none ps-3 d-flex align-items-center">
              <a href="javascript:;" class="nav-link text-body p-0" id="iconNavbarSidenav">
                <div class="sidenav-toggler-inner">
                  <i class="sidenav-toggler-line"></i>
                  <i class="sidenav-toggler-line"></i>
                  <i class="sidenav-toggler-line"></i>
                </div>
              </a>
            </li>
            <li class="nav-item px-3 d-flex align-items-center">
              <a href="/account/security" class="nav-link text-body p-0">
                <i class="fa fa-cog fixed-plugin-button-nav cursor-pointer"></i>
              </a>
            </li>
            <li class="nav-item dropdown pe-2 d-flex align-items-center">
              <a href="/account/transaction" class="nav-link text-body p-0" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
                <i class="fa fa-bell cursor-pointer"></i>
              </a>
              <ul class="dropdown-menu  dropdown-menu-end  px-2 py-3 me-sm-n4" aria-labelledby="dropdownMenuButton">
                
                
                <li>
                  <a class="dropdown-item border-radius-md" href="javascript:;">
                    <div class="d-flex py-1">
                      <div class="avatar avatar-sm bg-gradient-secondary  me-3  my-auto">
                        <svg width="12px" height="12px" viewBox="0 0 43 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                          <title>credit-card</title>
                          <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                            <g transform="translate(-2169.000000, -745.000000)" fill="#FFFFFF" fill-rule="nonzero">
                              <g transform="translate(1716.000000, 291.000000)">
                                <g transform="translate(453.000000, 454.000000)">
                                  <path class="color-background" d="M43,10.7482083 L43,3.58333333 C43,1.60354167 41.3964583,0 39.4166667,0 L3.58333333,0 C1.60354167,0 0,1.60354167 0,3.58333333 L0,10.7482083 L43,10.7482083 Z" opacity="0.593633743"></path>
                                  <path class="color-background" d="M0,16.125 L0,32.25 C0,34.2297917 1.60354167,35.8333333 3.58333333,35.8333333 L39.4166667,35.8333333 C41.3964583,35.8333333 43,34.2297917 43,32.25 L43,16.125 L0,16.125 Z M19.7083333,26.875 L7.16666667,26.875 L7.16666667,23.2916667 L19.7083333,23.2916667 L19.7083333,26.875 Z M35.8333333,26.875 L28.6666667,26.875 L28.6666667,23.2916667 L35.8333333,23.2916667 L35.8333333,26.875 Z"></path>
                                </g>
                              </g>
                            </g>
                          </g>
                        </svg>
                      </div>
                      <div class="d-flex flex-column justify-content-center">
                        <!--<h6 class="text-sm font-weight-normal mb-1">-->
                        <!--  Payment successfully completed-->
                        <!--</h6>-->
                        <!--<p class="text-xs text-secondary mb-0 ">-->
                        <!--  <i class="fa fa-clock me-1"></i>-->
                        <!--  2 days-->
                        <!--</p>-->
                      </div>
                    </div>
                  </a>
                </li>
              </ul>
            </li>
          </ul>
        </div>
      </div>
    </nav>
    <!-- End Navbar -->
    
    <script>console.log('<?php echo $transcode; ?>')</script>
    <?php
    $Modalstats = 'info';
    $ModalTitle = 'Transaction Completed';
    if($userdata['transaction_status']=='success'){
			    $Modalstats = 'success';
			    $ModalTitle = 'Transaction Completed';
			    
			}elseif($userdata['transaction_status']=='failed'){
			    $Modalstats = 'error';
			    $ModalTitle = 'Transaction Failed';
			}else{
			    $Modalstats = 'info';
			    if($userdata['transaction_status']=='pending'){
			       $ModalTitle = 'Transaction Processing';  
			    }
			    if($userdata['transaction_status']=='limit'){
			      $ModalTitle = 'Transaction Limit Reached';  
			    }
			    
			}
	function getamount($amt){
	    $amt = str_replace(',','',$amt);
	    return intval($amt);
	}
    if(isset($_POST['int_routing_number'])){
         $int_amount = getamount($_POST['int_amount']);
        
	if($bank->get_balance(account_number) > $int_amount){
		if($bank->send_funds('international',['acct_number'=>account_number], ['acct_number'=>$_POST['int_acct_number'],'routing_number'=>$_POST['int_routing_number'],'acct_bank'=>$_POST['int_bank_name'],'acct_name'=>$_POST['int_acct_name'],'notes'=>''],$int_amount, $userdata['transaction_status'],$currency,$transcode)){
			if($userdata['transaction_status']=='success'){
			    $bank->run_transaction_alert($userdata['acct_email'],'Debit', account_number, $int_amount, $_POST['int_acct_name'],$currency);
			}
			echo modal_alert($ModalTitle,$userdata['message'],$Modalstats);
		  }else{
			echo modal_alert($ModalTitle,'Please try again later!','error');  
		  }
		}else{
			echo modal_alert('Insufficient Funds','Please check your Balance','warning');
		}	
		$active_main_id = "<script>switchTabMode('#international-tab');</script>";
}
if(isset($_POST['lc_routing_number'])){
     $lc_amount = getamount($_POST['lc_amount']);

	if($bank->get_balance(account_number) > $lc_amount){
		if($bank->send_funds('otherbank',['acct_number'=>account_number], ['acct_number'=>$_POST['lc_acct_number'],'routing_number'=>$_POST['lc_routing_number'],'acct_bank'=>$_POST['lc_bank_name'],'acct_name'=>$_POST['lc_acct_name'],'notes'=>''],$lc_amount, $userdata['transaction_status'],$currency,$transcode)){
			if($userdata['transaction_status']=='success'){
			    $bank->run_transaction_alert($userdata['acct_email'],'Debit', account_number, $lc_amount, $_POST['lc_acct_name'],$currency);
			}
			echo modal_alert($ModalTitle,$userdata['message'],$Modalstats);
		  }else{
			echo modal_alert($ModalTitle,'Please try again later!','error');  
		  }
		}else{
			echo modal_alert('Insufficient Funds','Please check your Balance','warning');
		}	
		$active_main_id = "<script>switchTabMode('#localbank-tab');</script>";
}
if(isset($_POST['sb_acct_no'])){
             $sb_amount = getamount($_POST['sb_amount']);
         
	if($bank->get_balance(account_number) > $sb_amount){
	  if($bank->send_funds('intrabank',['acct_number'=>account_number], ['acct_number'=>$_POST['sb_acct_no'],'acct_bank'=>$_POST['sb_bank_name'],'acct_name'=>$_POST['sb_acct_name'],'notes'=>''],$sb_amount, $userdata['transaction_status'],$currency,$transcode)){
		if($userdata['transaction_status']=='success'){
		    $bank->run_transaction_alert($userdata['acct_email'],'Debit', account_number, $sb_amount,$_POST['sb_acct_name'],$currency);
		}
			echo modal_alert($ModalTitle,$userdata['message'],$Modalstats);
	  }else{
		echo modal_alert($ModalTitle,'Please try again later!','error');  
	  }
	}else{
		echo modal_alert('Insufficient Funds','Please check your Balance','warning');
	}
	$active_main_id = "<script>switchTabMode('#samebank-tab');</script>";
}
//WALLET TRANSFER
if(isset($_POST['transfer_from_w'])){
    $transfer_amount_w = getamount($_POST['transfer_amount_w']);
	if($_POST['transfer_from_w'] == 'checking'){
	$acct_data_from = ['acct_number'=>'checking'];
	$acct_data_to = ['acct_number'=>'saving'];
if($bank->get_balance(account_number) > $transfer_amount_w){
    if($bank->send_funds('wallet',$acct_data_from,$acct_data_to,$transfer_amount_w, $userdata['transaction_status'], $currency, $transcode, account_number)){
        $bank->run_transaction_alert($userdata['acct_email'],'Debit', account_number, $transfer_amount_w, ' your '.ucwords($acct_data_from['acct_number'].' Account'),$currency);
        $bank->run_transaction_alert($userdata['acct_email'],'Credit', account_number, $transfer_amount_w, ' your '.ucwords($acct_data_to['acct_number'].' Account'),$currency);
		echo modal_alert('Successful','Wallet Transfer was Successful!','success');
	}else{
		echo modal_alert('Error','Please try again later!','error');

	}
}else{
	echo modal_alert('Insufficient Funds','Please check your Balance','warning');
}
	}elseif($_POST['transfer_from_w'] == 'saving'){
		$acct_data_from = ['acct_number'=>'saving'];
		$acct_data_to = ['acct_number'=>'checking'];
		if($bank->get_balance(account_number, false, false, true) > $transfer_amount_w){
			if($bank->send_funds('wallet',$acct_data_from,$acct_data_to,$transfer_amount_w, $userdata['transaction_status'], $currency, $transcode, account_number)){
		$bank->run_transaction_alert($userdata['acct_email'],'Debit', account_number, $transfer_amount_w, ' your '.ucwords($acct_data_from['acct_number'].' Account'),$currency);
        $bank->run_transaction_alert($userdata['acct_email'],'Credit', account_number, $transfer_amount_w, ' your '.ucwords($acct_data_to['acct_number'].' Account'),$currency);
				echo modal_alert('Successful','Wallet Transfer was Successful!','success');
			}else{
				echo modal_alert('Error','Please try again later!','error');
			}
		}else{
				echo modal_alert('Insufficient Funds','Please check your Balance','warning');

		}
	}
	$active_main_id = "<script>switchTabMode('#wallet-tab');</script>";

}	
$bankUser = new bankUser;
if(isset($_POST['toggle2fa'])){
        if(isset($_POST['toggle_status'])){
            $toggle_status = $_POST['toggle_status'];
        }else{
            $toggle_status = 'false';
        }
	if($bankUser->toggle_2fa(account_number,$toggle_status)){
    }
}
$bank = new bank;
$userdata = $bank->get_acct_data(account_number);
$userdata = $userdata[0];
    ?>
	<!-- <div id="google_translate_element" style="display:none"></div> -->
<script type="text/javascript">

function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: "en"}, 'google_translate_element');
}

function changeLanguageByButtonClick() {
  var language = document.getElementById("language").value;
  var selectField = document.querySelector("#google_translate_element select");
  for(var i=0; i < selectField.children.length; i++){
    var option = selectField.children[i];
    // find desired langauge and change the former language of the hidden selection-field 
    if(option.value==language){
       selectField.selectedIndex = i;
       // trigger change event afterwards to make google-lib translate this side
       selectField.dispatchEvent(new Event('change'));
       break;
    }
  }
}
</script>

<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!--<div style="display:flex; justify-content:end; width:100%; padding:10px;"><span class="small text-light" style="padding-right:12px;">Last Login: <?php //echo $bankUser->get_login(account_number)[0]; ?></span></div>-->
<?php
if($bank->acct_stats_func(account_number) == 'inactive'){
	?>
<div class="alert alert-danger p-1 px-2 text-white small" style="position:absolute; z-index:1000; right:0; background-color:rgba(223, 71, 89, 0.2);margin-right:15px;"><i class="fa fa-info-circle"></i> this account is temporarily inactive! Contact Support for more information.</div>
<?php
}
?>