<?php
session_start();

require('../../includes/database.php');
include("../../log.php");

if (isset($_SESSION['accUsername']) && $_SESSION['accPassword'] != "") {
} else {
   header("Location:../../login/");
}
$accUsername = $_SESSION['accUsername'];

$accUsername = $_SESSION['accUsername'];
$accPassword = $_SESSION['accPassword'];

$query = "SELECT * FROM accounts	
			WHERE username = '$accUsername'
			&&   password = '$accPassword'";

$result = mysqli_query($con, $query) or die(mysqli_connect_error());
$rows = mysqli_num_rows($result);
if ($rows == 1) {
   while ($data = mysqli_fetch_assoc($result)) {

      extract($data);


      include('../components/head.php');
?>

      <body x-data class="is-header-blur is-sidebar-open" x-bind="$store.global.documentBody">
         <!-- App preloader-->
         <?php
         include("../components/preloader.php");
         include("../components/sidebar.php");
         include("../components/sidebar-body.php");
         include("../components/nav.php");
         include("../components/mobile-search.php");
         include("../components/right-sidebar.php");

         ?>

         <!-- Main Content Wrapper -->
         <main class="main-content w-full px-[var(--margin-x)] pb-8">
            <div class="flex items-center justify-between py-5 lg:py-6">
               <h2 class="text-xl font-medium text-slate-700 line-clamp-1 dark:text-navy-50 lg:text-2xl">
                  Account Deactivated
               </h2>
               <div class="flex">
                  <a href="../transactions/" class="btn h-8 w-8 rounded-full p-0 hover:bg-slate-300/20 focus:bg-slate-300/20 active:bg-slate-300/25 dark:hover:bg-navy-300/20 dark:focus:bg-navy-300/20 dark:active:bg-navy-300/25 sm:h-9 sm:w-9">
                     <i class="fa-solid fa-home"></i>
                  </a>
               </div>
            </div>
            <div class="grid grid-cols-lg-2">
               <div class="card px-5 py-12 sm:px-18">
                  <div>
                     <div class="text-right sm:text-right">
                        <div class="space-y-1 pt-2 text-left">
                           <p><img style="width:100px" src="../images/logo.png" alt=""></p>
                           <p><?php echo $siteName ?></p>
                           <p><?php echo $siteCountry ?></p>
                        </div>
                     </div>
                     <div class="text-right">
                        <h1 class="text-lg font-medium text-slate-600 dark:text-navy-100">
                           Online Banking
                        </h1>
                        <div class="space-y-1 text-right">
                           <p class="text-error">Transaction Receipt (Cancelled)</p>
                        </div>
                     </div>
                     <div style="border:1px solid" class="my-1 h-px bg-slate-500 dark:bg-navy-500"></div>
                     <div class="mt-4 sm:mt-0 sm:text-right">
                        <p style="text-align:left;" class="text-lg font-medium text-slate-600 dark:text-navy-100">
                           Account Status
                        </p>
                        <div class="space-y-1 text-right">
                           <p class="text-lg font-medium"><?php echo $account_number ?></p>
                           <p class="text-lg font-medium"><?php echo ucfirst($fname . ' ' . $lname) ?></p>
                           <p class="text-lg  text-error">
                              We are sorry to let you know that your account is currently
                              <b>NOT ACTIVE!!!</b>. Please contact our customer care.
                           </p>
                           <a href="../messages/" class="btn bg-slate-150 font-medium text-slate-800 hover:bg-slate-200 focus:bg-slate-200 active:bg-slate-200/80 dark:bg-navy-500 dark:text-navy-50 dark:hover:bg-navy-450 dark:focus:bg-navy-450 dark:active:bg-navy-450/90">
                              Contact Account Manager
                           </a>
                        </div>
                     </div>
                     <div style=" border:1px solid" class="my-4 h-px bg-slate-500 dark:bg-navy-700"></div>
                  </div>
                  <div class="my-1 h-px bg-slate-200 dark:bg-navy-500"></div>
                  <div class="flex flex-col justify-between sm:flex-row">
                     <div class="text-left mt-4">
                        <div class="qr-code center sm:text-center">
                           <img style="margin:auto; width:120px" src="https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl=http%3A%2F%2Fwww.<?php echo $siteDomain ?>%2F&choe=UTF-8" title="Link to <?php echo $siteDomain ?>" />
                        </div>
                     </div>
                     <div class="mt-2 text-right sm:mt-0">
                        <div class="space-y-1 pt-2 text-right">
                           <p style="text-align:justify" class="p-4">
                              This is an electronic receipt of a transaction and does not require any signature.
                              The authenticity of transaction can be confirmed with the Bank.
                              For any other assistance, kindly call True Serve on <a href="Tel:<?php echo $sitePhone ?>"><?php echo $sitePhone ?></a> or
                              email <a href="mailto:<?php echo $siteMail ?>"><?php echo $siteMail ?></a>
                           </p>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </main>
         </div>


         <div id="trans-invoice"></div>
         <script>
            window.addEventListener("DOMContentLoaded", () => Alpine.start());
         </script>
      </body>

      </html>


<?php
   }
}
?>