<?php
include 'back/auth-core.php';
include 'back/admin-core.php';
include 'back/transaction-details.php';
?>
<!DOCTYPE html>
<html dir="ltr">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <!-- Favicon -->
    <link rel="apple-touch-icon" sizes="180x180" href="app-assets/favicon/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="app-assets/favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="app-assets/favicon/favicon-16x16.png">
    <link rel="manifest" href="app-assets/favicon/site.webmanifest.txt">
    <link rel="mask-icon" href="app-assets/favicon/safari-pinned-tab.svg" color="#0010f7">
    <meta name="msapplication-TileColor" content="#0010f7">
    <meta name="theme-color" content="#ffffff">

    <!-- Font -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&amp;display=swap" rel="stylesheet" />

    <!-- Plugin -->
    <link rel="stylesheet" type="text/css" href="app-assets/css/plugin/swiper-bundle.min.css">
    <link rel="stylesheet" type="text/css" href="app-assets/icons/iconly/index.min.css">
    <link rel="stylesheet" type="text/css" href="app-assets/icons/remix-icon/index.min.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/colors.css">

    <!-- Base -->
    <link rel="stylesheet" type="text/css" href="app-assets/css/base/typography.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/base/base.css">

    <!-- Theme -->
    <link rel="stylesheet" type="text/css" href="app-assets/css/theme/colors-dark.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/theme/theme-dark.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/custom-rtl.css">

    <!-- Layouts -->
    <link rel="stylesheet" type="text/css" href="app-assets/css/layouts/sider.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/layouts/header.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/layouts/page-content.css">
    <link rel="stylesheet" type="text/css" href="app-assets/css/components.css">
    <!-- Customizer -->
    <link rel="stylesheet" type="text/css" href="app-assets/css/layouts/customizer.css">

    <!-- Custom -->
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">

    <title> Transaction Info </title>

</head>

<body >
    <main class="hp-bg-color-dark-90 d-flex min-vh-100">
        <?php include 'aside.php'; ?>

        <div class="hp-main-layout">
            <?php include 'top-nav.php'; ?>
            <?php include 'mobile-nav.php'; ?>

            <div class="hp-main-layout-content">
                <div class="row mb-32 gy-32">

                  <div class="col-12">
                      <div class="row align-items-center justify-content-between g-24">
                          <div class="col-12 col-md-6">
                              <h3> <?php echo $fullname; ?> Rental </h3>
                              <p> Transaction ID: <?php echo $agentID; ?> </p>
                              <?php if(ISSET($_GET['error'])): ?>
                                <?php echo $error; ?>
                              <?php endif; ?>
                          </div>
                      </div>
                  </div>

                  <div class="col-12">
                      <div class="hp-faq-tabs bg-white hp-bg-dark-100 rounded py-12 px-24">
                          <ul class="nav nav-pills hp-overflow-x-auto flex-nowrap">

                              <li class="nav-item me-4">
                                  <button class="nav-link py-4 active" id="faq-menu-2-tab" data-bs-toggle="pill" data-bs-target="#tenant" type="button" role="tab" aria-controls="faq-menu-2" aria-selected="false">
                                      <span class="d-flex align-items-center">
                                         Tenant
                                      </span>
                                  </button>
                              </li>
                              <li class="nav-item me-4">
                                  <button class="nav-link py-4 " id="faq-menu-2-tab" data-bs-toggle="pill" data-bs-target="#property" type="button" role="tab" aria-controls="faq-menu-2" aria-selected="false">
                                      <span class="d-flex align-items-center">
                                         Property
                                      </span>
                                  </button>
                              </li>
                              <li class="nav-item me-4">
                                  <button class="nav-link py-4" id="faq-menu-2-tab" data-bs-toggle="pill" data-bs-target="#landlord" type="button" role="tab" aria-controls="faq-menu-2" aria-selected="false">
                                      <span class="d-flex align-items-center">
                                         Landlord
                                      </span>
                                  </button>
                              </li>
                              <li class="nav-item me-4">
                                  <button class="nav-link py-4" id="faq-menu-2-tab" data-bs-toggle="pill" data-bs-target="#agent" type="button" role="tab" aria-controls="faq-menu-2" aria-selected="false">
                                      <span class="d-flex align-items-center">
                                         Agent
                                      </span>
                                  </button>
                              </li>
                              <li class="nav-item me-4">
                                  <button class="nav-link py-4" id="faq-menu-2-tab" data-bs-toggle="pill" data-bs-target="#rent" type="button" role="tab" aria-controls="faq-menu-2" aria-selected="false">
                                      <span class="d-flex align-items-center">
                                         Rent Info
                                      </span>
                                  </button>
                              </li>
                              <li class="nav-item me-4">
                                  <button class="nav-link py-4" id="faq-menu-2-tab" data-bs-toggle="pill" data-bs-target="#repayment" type="button" role="tab" aria-controls="faq-menu-2" aria-selected="false">
                                      <span class="d-flex align-items-center">
                                         Repayment
                                      </span>
                                  </button>
                              </li>
                          </ul>
                      </div>
                  </div>

                  <div class="col-12">
                      <div class="tab-content">
                          <div class="tab-pane fade show active" id="tenant" role="tabpanel" aria-labelledby="faq-menu-2-tab">
                            <div class="row g-32">
                              <div class="col-md-4">
                              </div>
                              <div class="col-md-4">
                                  <div class="card">
                                      <div class="card-body">
                                          <div class="row justify-content-between">
                                                <div class="col-12 hp-profile-content-list">
                                                  <div class="row">
                                                    <h3> Tenant Info </h3>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Name: <?php echo $tenantName; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Phone: <?php echo $tenantPhone; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>
                                                </div>
                                          </div>
                                      </div>
                                  </div>
                              </div>
                            </div>
                          </div>
                          <div class="tab-pane fade" id="property" role="tabpanel" aria-labelledby="faq-menu-2-tab">
                            <div class="row g-32">
                              <div class="col-md-3">
                              </div>
                              <div class="col-md-6">
                                  <div class="card">
                                      <div class="card-body">
                                          <div class="row justify-content-between">

                                                <div class="col-12 hp-profile-content-list">

                                                  <div class="row">
                                                    <h3> Property Info </h3>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Property ID: <a href="property-details.php?m=<?php echo $propertyID; ?>"> <?php echo $propertyID; ?> </a> </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Title: <?php echo $propertyName; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Description <br> <?php echo $description; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Location: <?php echo $location; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Rental Fee: NGN <?php echo $rentalFee; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>


                                                </div>

                                          </div>
                                      </div>
                                  </div>
                              </div>
                            </div>
                          </div>
                          <div class="tab-pane fade" id="landlord" role="tabpanel" aria-labelledby="faq-menu-2-tab">
                            <div class="row g-32">
                              <div class="col-md-3">
                              </div>
                              <div class="col-md-6">
                                  <div class="card">
                                      <div class="card-body">
                                          <div class="row justify-content-between">

                                                <div class="col-12 hp-profile-content-list">

                                                  <div class="row">
                                                    <h3> Landlord Info </h3>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Name: <?php echo $landlordName; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Email: <?php echo $landlordEmail; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Phone: <?php echo $landlordPhone; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>
                                                </div>

                                          </div>
                                      </div>
                                  </div>
                              </div>
                            </div>
                          </div>
                          <div class="tab-pane fade" id="agent" role="tabpanel" aria-labelledby="faq-menu-2-tab">
                            <div class="row g-32">
                              <div class="col-md-3">
                              </div>
                              <div class="col-md-6">
                                  <div class="card">
                                      <div class="card-body">
                                          <div class="row justify-content-between">

                                                <div class="col-12 hp-profile-content-list">

                                                  <div class="row">
                                                    <h3> Agent Info </h3>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Agent ID: <a href="single-agent-info.php?m=<?php echo $agentsID; ?>"><?php echo $agentID; ?> </a>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Name: <?php echo $agentName; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Email: <?php echo $agentEmail; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Username: <?php echo $agentUsername; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Phone: <?php echo $agentPhone; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>
                                                  <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Location: <?php echo $agentState; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Reg Date: <?php echo $agentRegDate; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>
                                                </div>

                                          </div>
                                      </div>
                                  </div>
                              </div>
                            </div>
                          </div>
                          <div class="tab-pane fade" id="rent" role="tabpanel" aria-labelledby="faq-menu-2-tab">
                            <div class="row g-32">
                              <div class="col-md-3">
                              </div>
                              <div class="col-md-6">
                                  <div class="card">
                                      <div class="card-body">
                                          <div class="row justify-content-between">

                                                <div class="col-12 hp-profile-content-list">

                                                  <div class="row">
                                                    <h3> Rent Info </h3>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Rental Amount: NGN <?php echo $rentalAmount; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> First Payment Amount: NGN <?php echo $totalPaymentAmount; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Agent Fee: NGN <?php echo $agent_fee; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Caution Fee: NGN <?php echo $caution_fee; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Service Fee: NGN <?php echo $service_fee; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>
                                                  <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Monthly Repayment: NGN <?php echo $monthlyRepayment; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> First Payment Amount Paid: NGN <?php echo $totalPaid; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>

                                                  <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> First Payment Date: <?php echo $paymentDate; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p>  Rent Commencement Date : <?php echo $startDate; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Rent Status : <?php echo $rentStatus; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>
                                                  <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p>  Rent Start Date: <?php echo $startDate; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p>  Rent End Date: <?php echo $endDate; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>
                                                </div>

                                          </div>
                                      </div>
                                  </div>
                              </div>
                            </div>
                          </div>
                          <div class="tab-pane fade" id="repayment" role="tabpanel" aria-labelledby="faq-menu-2-tab">
                            <div class="row g-32">
                              <div class="col-md-3">
                              </div>
                              <div class="col-md-6">
                                  <div class="card">
                                      <div class="card-body">
                                          <div class="row justify-content-between">

                                                <div class="col-12 hp-profile-content-list">

                                                  <div class="row">
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Monthly Repayment: NGN <?php echo $fixedMonthlyRepayment; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Repayment Paid: NGN <?php echo $RepaymentPaid; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Amount Remaining: NGN <?php echo $paymentRemaining; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="row align-items-center g-24">
                                                            <div class="col-12 col-md-12">
                                                                <p> Total Payment: NGN <?php echo $rentalFee; ?>  </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                  </div>
                                                </div>

                                          </div>
                                      </div>
                                  </div>
                              </div>
                            </div>
                          </div>
                      </div>
                  </div>

                </div>
            </div>

        </div>
    </main>

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

    <div class="scroll-to-top">
        <button type="button" class="btn btn-primary btn-icon-only rounded-circle hp-primary-shadow">
            <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="16px" width="16px" xmlns="http://www.w3.org/2000/svg">
                <g>
                    <path fill="none" d="M0 0h24v24H0z"></path>
                    <path d="M13 7.828V20h-2V7.828l-5.364 5.364-1.414-1.414L12 4l7.778 7.778-1.414 1.414L13 7.828z"></path>
                </g>
            </svg>
        </button>
    </div>

    <!-- Plugin -->
    <script src="app-assets/js/plugin/jquery.min.js"></script>
    <script src="app-assets/js/plugin/bootstrap.bundle.min.js"></script>
    <script src="app-assets/js/plugin/swiper-bundle.min.js"></script>
    <script src="app-assets/js/plugin/jquery.mask.min.js"></script>
    <script src="app-assets/js/plugin/autocomplete.min.js"></script>
    <script src="app-assets/js/plugin/moment.min.js"></script>

    <!-- Layouts -->
    <script src="app-assets/js/layouts/header-search.js"></script>
    <script src="app-assets/js/layouts/sider.js"></script>
    <script src="app-assets/js/components/input-number.js"></script>

    <!-- Base -->
    <script src="app-assets/js/base/index.js"></script>
    <!-- Customizer -->
    <script src="app-assets/js/customizer.js"></script>

    <!-- Custom -->
    <script src="assets/js/main.js"></script>

    <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

    <script type="text/javascript">
    function googleTranslateElementInit() {
      new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
    }
    </script>
</body>

</html>
