<?php require_once('../../setup.php'); ?>
<?php
session_start();
ob_start();
if (!isset($_SESSION['hash'])) {
  header("Location: login");
  exit();
} else {
  $hash = $_SESSION['hash'];
}
?>
<!DOCTYPE html>
<html lang="en">

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">

  <title><?= $main_name; ?></title>

  <!-- Custom fonts for this template-->
  <link rel="shortcut icon" href="../../assets/images/logo.png" />
  <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">

  <!-- Custom styles for this template -->
  <link href="css/sb-admin-2.min.css" rel="stylesheet">

  <!-- Custom styles for this page -->
  <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

</head>

<body id="page-top">

  <!-- Page Wrapper -->
  <div id="wrapper">

    <!-- Sidebar -->
    <?php include('admin_nav.php'); ?>
    <!-- End of Sidebar -->

    <!-- Content Wrapper -->
    <div id="content-wrapper" class="d-flex flex-column">

      <!-- Main Content -->
      <div id="content">

        <!-- Topbar -->
        <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">&nbsp;</nav>
        <!-- End of Topbar -->

        <!-- Begin Page Content -->
        <div class="container-fluid">

          <!-- Page Heading -->
          <h1 class="h3 mb-1 text-primary"><i class="fa fa-user"></i> Edit User Profile</h1>
          <p class="mb-4">You can edit user data by changing the form below.</p>

          <!-- Content Row -->
          <div class="row">

            <!-- Border Left Utilities -->
            <div class="col-lg-10">
              <div class="card mb-4 py-3 border-left-primary">
                <div class="card-body">
                  <?php

                  use PHPMailer\PHPMailer\PHPMailer;

                  require_once("../conn.php");

                  if (isset($_GET['e'])) {
                    $track_id = $_GET['e'];
                    $sql3 = "SELECT * FROM accounts WHERE id=$track_id";
                    $result3 = $dbconfig->query($sql3);

                    if ($result3->num_rows > 0) {
                      // output data of each row
                      while ($row3 = $result3->fetch_assoc()) {
                        $dbid = $row3['id'];
                        $dbfirst_name = $row3['first_name'];
                        $dbmiddle_initial = $row3['middle_initial'];
                        $dblast_name = $row3['last_name'];
                        $dbaddress = $row3['address'];
                        $dbzip_code = $row3['zip_code'];
                        $dbcountry = $row3['country'];
                        $dbstate = $row3['state'];
                        $dbemail = $row3['email'];
                        $dbphone = $row3['phone'];
                        $dbsex = $row3['sex'];
                        $dbgov_iss_id_no = $row3['gov_iss_id_no'];
                        $dbssn_tin = $row3['ssn_tin'];
                        $dbdob = $row3['dob'];
                        $dbregistration_date = $row3['registration_date'];
                        $dbbalance = $row3['balance'];
                        $dbcurrency = $row3['currency'];
                        $dbaccount_number = $row3['account_number'];
                        $dbusername = $row3['username'];
                        $dbpin = $row3['pin'];
                        $dbpassword = $row3['password'];
                        $dbsecurity_question = $row3['security_question'];
                        $dbsecurity_answer = $row3['security_answer'];
                        $dbstatus = $row3['status'];
                        $dbcard_status = $row3['card_status'];
                        $dbcard_otp = $row3['card_otp'];
                        $dbcard_name = $row3['card_name'];
                        $dbcard_number = $row3['card_number'];
                        $dbcard_exp = $row3['card_exp'];
                        $dbcard_type = $row3['card_type'];
                      }
                    }
                  } else {
                    header("Location: florence");
                  }


                  require_once("../conn.php");
                  if (isset($_POST['update_profile'])) {
                    $id = mysqli_real_escape_string($dbconfig, $_POST['id']);
                    $first_name = mysqli_real_escape_string($dbconfig, $_POST['first_name']);
                    $middle_initial = mysqli_real_escape_string($dbconfig, $_POST['middle_initial']);
                    $last_name = mysqli_real_escape_string($dbconfig, $_POST['last_name']);
                    $address = mysqli_real_escape_string($dbconfig, $_POST['address']);
                    $zip_code = mysqli_real_escape_string($dbconfig, $_POST['zip_code']);
                    $country = mysqli_real_escape_string($dbconfig, $_POST['country']);
                    $state = mysqli_real_escape_string($dbconfig, $_POST['state']);
                    $email = mysqli_real_escape_string($dbconfig, $_POST['email']);
                    $phone = mysqli_real_escape_string($dbconfig, $_POST['phone']);
                    $sex = mysqli_real_escape_string($dbconfig, $_POST['sex']);
                    $gov_iss_id_no = mysqli_real_escape_string($dbconfig, $_POST['gov_iss_id_no']);
                    $ssn_tin = mysqli_real_escape_string($dbconfig, $_POST['ssn_tin']);
                    $dob = mysqli_real_escape_string($dbconfig, $_POST['dob']);
                    $registration_date = mysqli_real_escape_string($dbconfig, $_POST['registration_date']);
                    $balance = mysqli_real_escape_string($dbconfig, $_POST['balance']);
                    $currency = mysqli_real_escape_string($dbconfig, $_POST['currency']);
                    $account_number = mysqli_real_escape_string($dbconfig, $_POST['account_number']);
                    $username = mysqli_real_escape_string($dbconfig, $_POST['username']);
                    $pin = mysqli_real_escape_string($dbconfig, $_POST['pin']);
                    $password = mysqli_real_escape_string($dbconfig, $_POST['password']);
                    $security_question = mysqli_real_escape_string($dbconfig, $_POST['security_question']);
                    $security_answer = mysqli_real_escape_string($dbconfig, $_POST['security_answer']);
                    $status = mysqli_real_escape_string($dbconfig, $_POST['status']);
                    $card_status = mysqli_real_escape_string($dbconfig, $_POST['card_status']);
                    $card_otp = mysqli_real_escape_string($dbconfig, $_POST['card_otp']);
                    $card_name = mysqli_real_escape_string($dbconfig, $_POST['card_name']);
                    $card_number = mysqli_real_escape_string($dbconfig, $_POST['card_number']);
                    $card_exp = mysqli_real_escape_string($dbconfig, $_POST['card_exp']);
                    $card_type = mysqli_real_escape_string($dbconfig, $_POST['card_type']);

                    if ($status == 'welcome') {
                      /* Exception class. */
                      require 'PHPMailer/src/Exception.php';

                      /* The main PHPMailer class. */
                      require 'PHPMailer/src/PHPMailer.php';

                      /* SMTP class, needed if you want to use SMTP. */
                      require 'PHPMailer/src/SMTP.php';

                      $date = date('Y');

                      /* Create a new PHPMailer object. */
                      $mail = new PHPMailer();

                      /* Set the mail sender. */
                      $mail->setFrom($main_email_support, $main_name);

                      /* Add a recipient. */
                      $mail->addAddress($email);

                      /* Set the subject. */
                      $mail->Subject = 'Account Activation';

                      /* Set the mail message body. */
                      $mail->isHTML(TRUE);
                      $mail->Body = '<html>
                            <head>
                                <meta http-equiv="Content-Type" content="text/html;charset=charset=utf-8" />
                                <title>' . $main_name . '</title>
                                </head>
                                <body>
                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tbody>
                                      <tr>
                                        <td valign="middle" align="center" style="background-color:#333; border-bottom:3px solid #7b59d0;"><h1 style="color:#fff;"><span style="color:#7b59d0; font-weight:bolder;">' . $main_name . '</span></h1></td>
                                      </tr>
                                      <tr>
                                        <td style="background-color:#fff; padding:10px;" width="100">
                                          <h3>Welcome to ' . $main_name . ' Bank</h3>
                                          <p>Dear valued ' . $main_name . ' customer (' . $first_name . '), thanks for opening a checking account with ' . $main_name . '!</p>
                                          <h5>Your account (Acc No. ' . $account_number . ') is now active. <i>Below are your online banking details:</i><br><b>Username:</b> ' . $username . '<br><b>Password:</b> ' . $password . '
                                          <p>To login to your online banking kindly <a href="' . $main_website . '/account/">Click here...</a></p>
                                          <p>If you have any problem trying to access your account, please <a href="mailto:' . $main_email_support . '">click here</a> to write us a mail and one of our banking specialists will be in touch with you. </p>
                                          <p>We appreciate your business and look forward to serving your financial needs for many years to come.</p>
                                          <p>Thank you.</p>
                                        </td>
                                      </tr>
                                      <tr>
                                        <td valign="middle" align="center" style="background-color:#333; border-top:3px solid #7b59d0; padding:10px; color:#fff;">© <span style="color: #7b59d0;">' . $main_name . '</span> ' . $date . '.  All Rights Reserved</td>
                                      </tr>
                                    </tbody>
                                  </table>
                                </body>
                            </html>';
                      /* Finally send the mail. */
                      if ($mail->send()) {
                        echo '';
                      }
                    }

                    if ($status == 'welcome') {
                      $new_status = 'active';
                    } else {
                      $new_status = $status;
                    }

                    $sql = "UPDATE accounts SET
                      first_name='$first_name',
                      middle_initial='$middle_initial',
                      last_name='$last_name',
                      address='$address',
                      zip_code='$zip_code',
                      country='$country',
                      state='$state',
                      email='$email',
                      phone='$phone',
                      sex='$sex',
                      gov_iss_id_no='$gov_iss_id_no',
                      ssn_tin='$ssn_tin',
                      dob='$dob',
                      registration_date='$registration_date',
                      balance='$balance',
                      account_number='$account_number',
                      currency='$currency',
                      username='$username',
                      pin='$pin',
                      password='$password',
                      security_question='$security_question',
                      security_answer='$security_answer',
                      status='$new_status',
                      card_status='$card_status',
                      card_otp='$card_otp',
                      card_name='$card_name',
                      card_number='$card_number',
                      card_exp='$card_exp',
                      card_type='$card_type'
                    WHERE id = $dbid";

                    if ($dbconfig->query($sql) === TRUE) {
                      //header("Refresh: 2; url=florence");
                      echo '<div align="center" class="alert alert-success"><i class="fa fa-check"></i>&nbsp;&nbsp;User <b>Profile</b> was updated successfully...</div>';
                    }
                  }
                  ?>
                  <form action="" method="POST">
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">First Name:</label>
                          <input type="hidden" class="form-control" name="id" value="<?php echo $dbid; ?>" required>
                          <input type="text" class="form-control" name="first_name" value="<?php echo $dbfirst_name; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Middle Initial:</label>
                          <input type="text" class="form-control" name="middle_initial" value="<?php echo $dbmiddle_initial; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Last Name:</label>
                          <input type="text" class="form-control" name="last_name" value="<?php echo $dblast_name; ?>" required>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Address:</label>
                          <input type="text" class="form-control" name="address" value="<?php echo $dbaddress; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Zip Code:</label>
                          <input type="text" class="form-control" name="zip_code" value="<?php echo $dbzip_code; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Country:</label>
                          <input type="text" class="form-control" name="country" value="<?php echo $dbcountry; ?>" required>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">State:</label>
                          <input type="text" class="form-control" name="state" value="<?php echo $dbstate; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Email Address:</label>
                          <input type="text" class="form-control" name="email" value="<?php echo $dbemail; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Phone Number:</label>
                          <input type="text" class="form-control" name="phone" value="<?php echo $dbphone; ?>" required>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Sex:</label>
                          <input type="text" class="form-control" name="sex" value="<?php echo $dbsex; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Government Issued ID No.:</label>
                          <input type="text" class="form-control" name="gov_iss_id_no" value="<?php echo $dbgov_iss_id_no; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">SSN/TIN:</label>
                          <input type="text" class="form-control" name="ssn_tin" value="<?php echo $dbssn_tin; ?>" required>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Date of Birth:</label>
                          <input type="date" class="form-control" name="dob" value="<?php echo $dbdob; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Registration Date:</label>
                          <input type="text" class="form-control" name="registration_date" value="<?php echo $dbregistration_date; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Account Status</label>
                          <select class="form-control" name="status" required>
                            <option value="<?php echo $dbstatus; ?>"><?php echo $dbstatus; ?></option>
                            <option value="active">active</option>
                            <option value="welcome">activate & send welcome message</option>
                            <option value="disabled">disabled</option>
                            <option value="Dormant/Inactive">Dormant/Inactive</option>
                            <option value="pending">pending</option>
                          </select>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Account Number:</label>
                          <input type="number" class="form-control" name="account_number" value="<?php echo $dbaccount_number; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Username:</label>
                          <input type="text" class="form-control" name="username" value="<?php echo $dbusername; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Pin:</label>
                          <input type="text" class="form-control" name="pin" value="<?php echo $dbpin; ?>" required>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Password:</label>
                          <input type="text" class="form-control" name="password" value="<?php echo $dbpassword; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Security Question:</label>
                          <input type="text" class="form-control" name="security_question" value="<?php echo $dbsecurity_question; ?>" required>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Security Answer:</label>
                          <input type="text" class="form-control" name="security_answer" value="<?php echo $dbsecurity_answer; ?>" required>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-8">
                        <div class="form-group">
                      <label for="email">Account Balance:</label>
                      <input type="number" class="form-control" name="balance" value="<?php echo $dbbalance; ?>" required>
                    </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Currency Type:</label>
                          <select class="form-control" id="exampleFormControlSelect2" name="currency" required>
                        <?php if (isset($dbcurrency)) {
                              echo '<option value="' . $dbcurrency . '">' . $dbcurrency . '</option>';
                            } else {
                              echo '<option value="">Select Currency Type</option>';
                            } ?>
                            <option value="؋">Afghan Afghani</option>
                            <option value="Lek">Albanian Lek</option>
                            <option value="دج">Algerian Dinar</option>
                            <option value="Kz">Angolan Kwanza</option>
                            <option value="$">Argentine Peso</option>
                            <option value="֏">Armenian Dram</option>
                            <option value="ƒ">Aruban Florin</option>
                            <option value="$">Australian Dollar</option>
                            <option value="m">Azerbaijani Manat</option>
                            <option value="B$">Bahamian Dollar</option>
                            <option value=".د.ب">Bahraini Dinar</option>
                            <option value="৳">Bangladeshi Taka</option>
                            <option value="Bds$">Barbadian Dollar</option>
                            <option value="Br">Belarusian Ruble</option>
                            <option value="fr">Belgian Franc</option>
                            <option value="$">Belize Dollar</option>
                            <option value="$">Bermudan Dollar</option>
                            <option value="Nu.">Bhutanese Ngultrum</option>
                            <option value="฿">Bitcoin</option>
                            <option value="Bs.">Bolivian Boliviano</option>
                            <option value="KM">Bosnia-Herzegovina Convertible Mark</option>
                            <option value="P">Botswanan Pula</option>
                            <option value="R$">Brazilian Real</option>
                            <option value="£">British Pound Sterling</option>
                            <option value="B$">Brunei Dollar</option>
                            <option value="Лв.">Bulgarian Lev</option>
                            <option value="FBu">Burundian Franc</option>
                            <option value="KHR">Cambodian Riel</option>
                            <option value="$">Canadian Dollar</option>
                            <option value="$">Cape Verdean Escudo</option>
                            <option value="$">Cayman Islands Dollar</option>
                            <option value="CFA">CFA Franc BCEAO</option>
                            <option value="FCFA">CFA Franc BEAC</option>
                            <option value="₣">CFP Franc</option>
                            <option value="$">Chilean Peso</option>
                            <option value="¥">Chinese Yuan</option>
                            <option value="$">Colombian Peso</option>
                            <option value="CF">Comorian Franc</option>
                            <option value="FC">Congolese Franc</option>
                            <option value="₡">Costa Rican ColÃ³n</option>
                            <option value="kn">Croatian Kuna</option>
                            <option value="$, CUC">Cuban Convertible Peso</option>
                            <option value="Kč">Czech Republic Koruna</option>
                            <option value="Kr.">Danish Krone</option>
                            <option value="Fdj">Djiboutian Franc</option>
                            <option value="$">Dominican Peso</option>
                            <option value="$">East Caribbean Dollar</option>
                            <option value="ج.م">Egyptian Pound</option>
                            <option value="Nfk">Eritrean Nakfa</option>
                            <option value="kr">Estonian Kroon</option>
                            <option value="Nkf">Ethiopian Birr</option>
                            <option value="€">Euro</option>
                            <option value="£">Falkland Islands Pound</option>
                            <option value="FJ$">Fijian Dollar</option>
                            <option value="D">Gambian Dalasi</option>
                            <option value="ლ">Georgian Lari</option>
                            <option value="DM">German Mark</option>
                            <option value="GH₵">Ghanaian Cedi</option>
                            <option value="£">Gibraltar Pound</option>
                            <option value="₯, Δρχ, Δρ">Greek Drachma</option>
                            <option value="Q">Guatemalan Quetzal</option>
                            <option value="FG">Guinean Franc</option>
                            <option value="$">Guyanaese Dollar</option>
                            <option value="G">Haitian Gourde</option>
                            <option value="L">Honduran Lempira</option>
                            <option value="$">Hong Kong Dollar</option>
                            <option value="Ft">Hungarian Forint</option>
                            <option value="kr">Icelandic KrÃ³na</option>
                            <option value="₹">Indian Rupee</option>
                            <option value="Rp">Indonesian Rupiah</option>
                            <option value="﷼">Iranian Rial</option>
                            <option value="د.ع">Iraqi Dinar</option>
                            <option value="₪">Israeli New Sheqel</option>
                            <option value="L,£">Italian Lira</option>
                            <option value="J$">Jamaican Dollar</option>
                            <option value="¥">Japanese Yen</option>
                            <option value="ا.د">Jordanian Dinar</option>
                            <option value="лв">Kazakhstani Tenge</option>
                            <option value="KSh">Kenyan Shilling</option>
                            <option value="ك.د">Kuwaiti Dinar</option>
                            <option value="лв">Kyrgystani Som</option>
                            <option value="₭">Laotian Kip</option>
                            <option value="Ls">Latvian Lats</option>
                            <option value="£">Lebanese Pound</option>
                            <option value="L">Lesotho Loti</option>
                            <option value="$">Liberian Dollar</option>
                            <option value="د.ل">Libyan Dinar</option>
                            <option value="Lt">Lithuanian Litas</option>
                            <option value="$">Macanese Pataca</option>
                            <option value="ден">Macedonian Denar</option>
                            <option value="Ar">Malagasy Ariary</option>
                            <option value="MK">Malawian Kwacha</option>
                            <option value="RM">Malaysian Ringgit</option>
                            <option value="Rf">Maldivian Rufiyaa</option>
                            <option value="MRU">Mauritanian Ouguiya</option>
                            <option value="₨">Mauritian Rupee</option>
                            <option value="$">Mexican Peso</option>
                            <option value="L">Moldovan Leu</option>
                            <option value="₮">Mongolian Tugrik</option>
                            <option value="MAD">Moroccan Dirham</option>
                            <option value="MT">Mozambican Metical</option>
                            <option value="K">Myanmar Kyat</option>
                            <option value="$">Namibian Dollar</option>
                            <option value="₨">Nepalese Rupee</option>
                            <option value="ƒ">Netherlands Antillean Guilder</option>
                            <option value="$">New Taiwan Dollar</option>
                            <option value="$">New Zealand Dollar</option>
                            <option value="C$">Nicaraguan CÃ³rdoba</option>
                            <option value="₦">Nigerian Naira</option>
                            <option value="₩">North Korean Won</option>
                            <option value="kr">Norwegian Krone</option>
                            <option value=".ع.ر">Omani Rial</option>
                            <option value="₨">Pakistani Rupee</option>
                            <option value="B/.">Panamanian Balboa</option>
                            <option value="K">Papua New Guinean Kina</option>
                            <option value="₲">Paraguayan Guarani</option>
                            <option value="S/.">Peruvian Nuevo Sol</option>
                            <option value="₱">Philippine Peso</option>
                            <option value="zł">Polish Zloty</option>
                            <option value="ق.ر">Qatari Rial</option>
                            <option value="lei">Romanian Leu</option>
                            <option value="₽">Russian Ruble</option>
                            <option value="FRw">Rwandan Franc</option>
                            <option value="₡">Salvadoran ColÃ³n</option>
                            <option value="SAT">Samoan Tala</option>
                            <option value="﷼">Saudi Riyal</option>
                            <option value="din">Serbian Dinar</option>
                            <option value="SRe">Seychellois Rupee</option>
                            <option value="Le">Sierra Leonean Leone</option>
                            <option value="$">Singapore Dollar</option>
                            <option value="Sk">Slovak Koruna</option>
                            <option value="Si$">Solomon Islands Dollar</option>
                            <option value="Sh.so.">Somali Shilling</option>
                            <option value="R">South African Rand</option>
                            <option value="₩">South Korean Won</option>
                            <option value="SDR">Special Drawing Rights</option>
                            <option value="Rs">Sri Lankan Rupee</option>
                            <option value="£">St. Helena Pound</option>
                            <option value=".س.ج">Sudanese Pound</option>
                            <option value="$">Surinamese Dollar</option>
                            <option value="E">Swazi Lilangeni</option>
                            <option value="kr">Swedish Krona</option>
                            <option value="CHf">Swiss Franc</option>
                            <option value="LS">Syrian Pound</option>
                            <option value="Db">São Tomé and Príncipe Dobra</option>
                            <option value="SM">Tajikistani Somoni</option>
                            <option value="TSh">Tanzanian Shilling</option>
                            <option value="฿">Thai Baht</option>
                            <option value="$">Tongan pa'anga</option>
                            <option value="$">Trinidad & Tobago Dollar</option>
                            <option value="ت.د">Tunisian Dinar</option>
                            <option value="₺">Turkish Lira</option>
                            <option value="T">Turkmenistani Manat</option>
                            <option value="USh">Ugandan Shilling</option>
                            <option value="₴">Ukrainian Hryvnia</option>
                            <option value="إ.د">United Arab Emirates Dirham</option>
                            <option value="$">Uruguayan Peso</option>
                            <option value="$">US Dollar</option>
                            <option value="лв">Uzbekistan Som</option>
                            <option value="VT">Vanuatu Vatu</option>
                            <option value="Bs">Venezuelan BolÃ­var</option>
                            <option value="₫">Vietnamese Dong</option>
                            <option value="﷼">Yemeni Rial</option>
                            <option value="ZK">Zambian Kwacha</option>
                          </select>
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Card Status:</label>
                          <select class="form-control" name="card_status" required>
                            <option value="<?php echo $dbcard_status; ?>"><?php echo $dbcard_status; ?></option>
                            <option value="ACTIVE">ACTIVE</option>
                            <option value="NOT ACTIVE">NOT ACTIVE</option>
                          </select>
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Card Name:</label>
                          <input type="text" class="form-control" name="card_name" value="<?php echo $dbcard_name; ?>" maxlength="20">
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Card Number:</label>
                          <input type="text" class="form-control" name="card_number" value="<?php echo $dbcard_number; ?>" maxlength="19">
                        </div>
                      </div>
                    </div>
                    <div class="row">
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Card EXP:</label>
                          <input type="text" class="form-control" name="card_exp" value="<?php echo $dbcard_exp; ?>" maxlength="5">
                        </div>
                      </div>
                      <div class="col-md-4">
                        <div class="form-group">
                          <label for="email">Card OTP:</label>
                          <input type="text" class="form-control" name="card_otp" value="<?php echo $dbcard_otp; ?>" maxlength="4">
                        </div>
                      </div>
                      <div class="col-md-4">
                        <label for="email">Card Type:</label>
                        <select class="form-control" name="card_type">
                          <option value="<?php echo $dbcard_type; ?>"><?php echo $dbcard_type; ?></option>
                          <option value="Credit">Credit</option>
                          <option value="Debit">Debit</option>
                          <option value="Prepaid">Prepaid</option>
                        </select>
                      </div>
                    </div>
                    <button type="submit" name="update_profile" class="btn btn-primary">Update Profile</button>
                  </form>
                </div>
              </div>
            </div>

          </div>

        </div>
        <!-- /.container-fluid -->

      </div>
      <!-- End of Main Content -->

    </div>
    <!-- End of Content Wrapper -->

  </div>
  <!-- End of Page Wrapper -->

  <!-- Scroll to Top Button-->
  <a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
  </a>

  <!-- Bootstrap core JavaScript-->
  <script src="vendor/jquery/jquery.min.js"></script>
  <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>

  <!-- Core plugin JavaScript-->
  <script src="vendor/jquery-easing/jquery.easing.min.js"></script>

  <!-- Custom scripts for all pages-->
  <script src="js/sb-admin-2.min.js"></script>

  <!-- Page level plugins -->
  <script src="vendor/datatables/jquery.dataTables.min.js"></script>
  <script src="vendor/datatables/dataTables.bootstrap4.min.js"></script>

  <!-- Page level custom scripts -->
  <script src="js/demo/datatables-demo.js"></script>

</body>

</html>
