<?php
    session_start();
    include "ajax/konnection.php";
    include "ajax/func.php";
    
    if(!isset($_SESSION["user"])){
        header("location: login");
        die();
    }
    
    $email  = $_SESSION["user"];
    $bal = getBal($email);
    $user = getUserDetails($email);
    $verifs = 0;
    $charges = getCharges();
    $page = "VERIFS";
?>
<!DOCTYPE html>

<html lang="en" class="light-style layout-compact layout-navbar-fixed layout-menu-fixed     " dir="ltr" data-theme="theme-default" data-assets-path="/assets/" data-base-url="/assets/" data-framework="laravel" data-template="vertical-menu-theme-default-light">


<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />

  <title><?= $site_title;?> Dashboard</title>
  <meta name="description" content="" />
  <meta name="keywords" content="">
  <link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.googleapis.com/">
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&amp;display=swap" rel="stylesheet">

<link rel="stylesheet" href="assets/vendor/fonts/boxiconsc4a7.css?id=87122b3a3900320673311cebdeb618da" />
<link rel="stylesheet" href="assets/vendor/fonts/fontawesome8a69.css?id=a2997cb6a1c98cc3c85f4c99cdea95b5" />
<link rel="stylesheet" href="assets/vendor/fonts/flag-icons80a8.css?id=121bcc3078c6c2f608037fb9ca8bce8d" />
<!-- Core CSS -->
<link rel="stylesheet" href="assets/vendor/css/rtl/corea8ac.css?id=55b2a9dfaa009c41df62ca8d16e913a8" class="template-customizer-core-css" />
<link rel="stylesheet" href="assets/vendor/css/rtl/theme-default4c4b.css?id=9182924a7b965439eca5e189ba43eba1" class="template-customizer-theme-css" />
<link rel="stylesheet" href="assets/css/demob77a.css?id=69dfc5e48fce5a4ff55ff7b593cdf93d" />
<!-- Vendors CSS -->
<link rel="stylesheet" href="assets/vendor/libs/perfect-scrollbar/perfect-scrollbare482.css?id=73d641bb8db2475ecafc6c68461ed01b" />
<link rel="stylesheet" href="assets/vendor/libs/typeahead-js/typeahead05d2.css?id=de339ead5e9c9e36f12e46cbef7aaffd" />

<!-- Vendor Styles -->
<link rel="stylesheet" href="assets/vendor/libs/apex-charts/apex-charts.css">
<link rel="stylesheet" href="assets/vendor/libs/datatables-bs5/datatables.bootstrap5.css">
<link rel="stylesheet" href="assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.css">
<link rel="stylesheet" href="assets/vendor/libs/flatpickr/flatpickr.css" />

<!-- Page Styles -->

  <!-- Include Scripts for customizer, helper, analytics, config -->
  <!-- $isFront is used to append the front layout scriptsIncludes only on the front layout otherwise the variable will be blank -->
  <!-- laravel style -->
<script src="assets/vendor/js/helpers.js"></script>
<!-- beautify ignore:start -->
  <!--! Template customizer & Theme config files MUST be included after core stylesheets and helpers.js in the <head> section -->
  <!--? Template customizer: To hide customizer set displayCustomizer value false in config.js.  -->
  <script src="assets/vendor/js/template-customizer.js"></script>

  <!--? Config:  Mandatory theme config file contain global vars & default theme options, Set your preferred theme option in this file.  -->
  <script src="assets/js/config.js"></script>

  <script>
    window.templateCustomizer = new TemplateCustomizer({
      cssPath: '',
      themesPath: '',
      defaultStyle: "light",
      defaultShowDropdownOnHover: "true", // true/false (for horizontal layout only)
      displayCustomizer: "true",
      lang: 'en',
      pathResolver: function(path) {
        var resolvedPaths = {
          // Core stylesheets
                      'core.css': '/assets/vendor/css/rtl/core.css?id=55b2a9dfaa009c41df62ca8d16e913a8',
            'core-dark.css': '/assets/vendor/css/rtl/core-dark.css?id=d98ae2a03b5b1b05651411ee58ef81a6',
          
          // Themes
                      'theme-default.css': '/assets/vendor/css/rtl/theme-default.css?id=9182924a7b965439eca5e189ba43eba1',
            'theme-default-dark.css':
            '/assets/vendor/css/rtl/theme-default-dark.css?id=ae30991ef3f62e7c03ca6f8930843e80',
                      'theme-bordered.css': '/assets/vendor/css/rtl/theme-bordered.css?id=a4f95a927b1e2bcdfd57a3bbfb2bd3d9',
            'theme-bordered-dark.css':
            '/assets/vendor/css/rtl/theme-bordered-dark.css?id=2a668deb480284f975db82d0a7277156',
                      'theme-semi-dark.css': '/assets/vendor/css/rtl/theme-semi-dark.css?id=9c02fb39c47f91b2d198f343fa8b4df7',
            'theme-semi-dark-dark.css':
            '/assets/vendor/css/rtl/theme-semi-dark-dark.css?id=c4b1950a14ffd431f752917b97a0ee51',
                  }
        return resolvedPaths[path] || path;
      },
      'controls': ["rtl","style","headerType","contentLayout","layoutCollapsed","layoutNavbarOptions","themes"],
    });
  </script>
</head>

<body>
  
  <!-- Layout Content -->
  <div class="layout-wrapper layout-content-navbar ">
  <div class="layout-container">

       <?php include "includes/aside.php"; ?>
    <!-- Layout page -->
    <div class="layout-page">

      
      

      <!-- BEGIN: Navbar-->
            <!-- Navbar -->
<?php include "includes/navbar.php"; ?>
  <!-- / Navbar -->
            <!-- END: Navbar-->


      <!-- Content wrapper -->
      <div class="content-wrapper">

        <!-- Content -->
           <div class="container-xxl flex-grow-1 container-p-y">
            <h5>Welcome to <?= $site_title;?>, <?php echo $user["firstName"]; ?>!</h5>
            <!-- Advanced Search -->
<div class="card">
  <h5 class="card-header">Verifications History</h5>
  <!--Search Form -->
  <div class="card-body">
    <form class="dt_adv_search" method="POST">
      <div class="row">
        <div class="col-12">
          <div class="row g-3">
            <div class="col-12 col-sm-6 col-lg-4">
              <label class="form-label">Reference:</label>
              <input type="text" class="form-control dt-input dt-full-name" data-column=2 placeholder="" data-column-index="1">
            </div>
            <div class="col-12 col-sm-6 col-lg-4">
              <label class="form-label">Display Name:</label>
              <input type="text" class="form-control dt-input" data-column=3 placeholder="" data-column-index="2">
            </div>
           
            <div class="col-12 col-sm-6 col-lg-4">
              <label class="form-label">Date:</label>
              <div class="mb-0">
                <input type="text" class="form-control dt-date flatpickr-range dt-input" data-column="5" placeholder="StartDate to EndDate" data-column-index="4" name="dt_date" />
                <input type="hidden" class="form-control dt-date start_date dt-input" data-column="5" data-column-index="4" name="value_from_start_date" />
                <input type="hidden" class="form-control dt-date end_date dt-input" name="value_from_end_date" data-column="5" data-column-index="4" />
              </div>
            </div>
            
          </div>
        </div>
      </div>
    </form>
  </div>

  <hr class="mt-0">
  <div class="card-datatable table-responsive">
    <table class="dt-advanced-search table border-top">
      <thead>
        <tr>
          <th></th>
          <th>Avatar</th>
          <th>Report ID</th>
          <th>Display Name</th>
          <th>Report Type</th>
          <th>Date</th>
          <th>Action</th>
        </tr>
      </thead>
      <tfoot>
        <tr>
          <th></th>
          <th>Avatar</th>
          <th>Report ID</th>
          <th>Display Name</th>
          <th>Report Type</th>
          <th>Date</th>
          <th>Action</th>
        </tr>
      </tfoot>
    </table>
  </div>
</div>
<!--/ Advanced Search -->
          </div>
          <!-- / Content -->

          <!-- Footer -->
                    <!-- Footer-->
<footer class="content-footer footer bg-footer-theme">
  <div class="container-xxl d-flex flex-wrap justify-content-between py-2 flex-md-row flex-column">
    <div class="mb-2 mb-md-0">
      © <script>document.write(new Date().getFullYear())</script>
      , All Rights Reserved Developed By <a href="https://wa.me/2349064699773">M SHETTY</a>
    </div>
  
  </div>
</footer>
<!--/ Footer-->
                    <!-- / Footer -->
          <div class="content-backdrop fade"></div>
        </div>
        <!--/ Content wrapper -->
      </div>
      <!-- / Layout page -->
    </div>

        <!-- Overlay -->
    <div class="layout-overlay layout-menu-toggle"></div>
        <!-- Drag Target Area To SlideIn Menu On Small Screens -->
    <div class="drag-target"></div>
  </div>
  <!-- / Layout wrapper -->
    <!--/ Layout Content -->

  
  
  <!-- Include Scripts -->
  <!-- $isFront is used to append the front layout scripts only on the front layout otherwise the variable will be blank -->
  <!-- BEGIN: Vendor JS-->
<script src="assets/vendor/libs/jquery/jquery1e84.js?id=0f7eb1f3a93e3e19e8505fd8c175925a"></script>
<script src="assets/vendor/libs/popper/popper0a73.js?id=baf82d96b7771efbcc05c3b77135d24c"></script>
<script src="assets/vendor/js/bootstrapcfc4.js?id=4648227467e3fd3f4cf976cfb0e43aea"></script>
<script src="assets/vendor/libs/perfect-scrollbar/perfect-scrollbar6188.js?id=44b8e955848dc0c56597c09f6aebf89a"></script>
<script src="assets/vendor/libs/hammer/hammer2de0.js?id=0a520e103384b609e3c9eb3b732d1be8"></script>
<script src="assets/vendor/libs/typeahead-js/typeahead60e7.js?id=f6bda588c16867a6cc4158cb4ed37ec6"></script>
<script src="assets/vendor/js/menu2dc9.js?id=c6ce30ded4234d0c4ca0fb5f2a2990d8"></script>
<script src="assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js"></script>
<!-- Flat Picker -->
<script src="assets/vendor/libs/moment/moment.js"></script>
<script src="assets/vendor/libs/flatpickr/flatpickr.js"></script>

<!-- END: Page Vendor JS-->
<!-- BEGIN: Theme JS-->
<script src="assets/js/maind63d.js?id=6bea3f2e092d5fe7327c226f3242f31b"></script>

<!-- END: Theme JS-->
<!-- Pricing Modal JS-->
<!-- END: Pricing Modal JS-->
<!-- BEGIN: Page JS-->
<script>
    "use strict";
$((function() {
    var a = $(".datatables-ajax"),
        t = $(".dt-column-search"),
        e = $(".dt-advanced-search"),
        l = $(".dt-responsive"),
        n = $(".start_date"),
        o = $(".end_date"),
        s = $(".flatpickr-range");
    s.length && s.flatpickr({
        mode: "range",
        dateFormat: "m/d/Y",
        orientation: isRtl ? "auto right" : "auto left",
        locale: {
            format: "MM/DD/YYYY"
        },
        onClose: function(a, t, e) {
            var l = "",
                r = new Date;
            null != a[0] && (l = moment(a[0]).format("MM/DD/YYYY"), n.val(l)), null != a[1] && (r = moment(a[1]).format("MM/DD/YYYY"), o.val(r)), $(s).trigger("change").trigger("keyup")
        }
    }), $.fn.dataTableExt.afnFiltering.length = 0;
    var r = function(a, t, e) {
            $.fn.dataTableExt.afnFiltering.push((function(l, n, o) {
                var s = d(n[a]),
                    r = d(t),
                    c = d(e);
                return r <= s && s <= c || (s >= r && "" === c && "" !== r || s <= c && "" === r && "" !== c)
            }))
        },
        d = function(a) {
            var t = new Date(a);
            return t.getFullYear() + "" + ("0" + (t.getMonth() + 1)).slice(-2) + ("0" + t.getDate()).slice(-2)
        };
    if (a.length) a.dataTable({
        processing: !0,
        ajax: assetsPath + "json/ajax.php",
        dom: '<"row"<"col-sm-12 col-md-6"l><"col-sm-12 col-md-6 d-flex justify-content-center justify-content-md-end"f>><"table-responsive"t><"row"<"col-sm-12 col-md-6"i><"col-sm-12 col-md-6"p>>'
    });
    if (t.length) {
        $(".dt-column-search thead tr").clone(!0).appendTo(".dt-column-search thead"), $(".dt-column-search thead tr:eq(1) th").each((function(a) {
            var t = $(this).text();
            $(this).html('<input type="text" class="form-control" placeholder="Search ' + t + '" />'), $("input", this).on("keyup change", (function() {
                c.column(a).search() !== this.value && c.column(a).search(this.value).draw()
            }))
        }));
        var c = t.DataTable({
            ajax: assetsPath + "json/table-datatable.json",
            columns: [{
                data: "full_name"
            }, {
                data: "email"
            }, {
                data: "post"
            }, {
                data: "city"
            }, {
                data: "start_date"
            }, {
                data: "salary"
            }],
            orderCellsTop: !0,
            dom: '<"row"<"col-sm-12 col-md-6"l><"col-sm-12 col-md-6 d-flex justify-content-center justify-content-md-end"f>><"table-responsive"t><"row"<"col-sm-12 col-md-6"i><"col-sm-12 col-md-6"p>>'
        })
    }
    if (e.length) e.DataTable({
        dom: "<'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-6'i><'col-sm-12 col-md-6 dataTables_pager'p>>",
        ajax: "/ajax/getVerifications.php",
        columns: [{
            data: ""
        }, {
            data: "full_name"
        }, {
            data: "email"
        }, {
            data: "post"
        }, {
            data: "city"
        }, {
            data: "start_date"
        }, {
            data: "salary"
        }],
        columnDefs: [{
            className: "control",
            orderable: !1,
            targets: 0,
            render: function(a, t, e, l) {
                return ""
            }
        }],
        orderCellsTop: !0,
        responsive: {
            details: {
                display: $.fn.dataTable.Responsive.display.modal({
                    header: function(a) {
                        return "Details of " + a.data().email
                    }
                }),
                type: "column",
                renderer: function(a, t, e) {
                    var l = $.map(e, (function(a, t) {
                        return "" !== a.title ? '<tr data-dt-row="' + a.rowIndex + '" data-dt-column="' + a.columnIndex + '"><td>' + a.title + ":</td> <td>" + a.data + "</td></tr>" : ""
                    })).join("");
                    return !!l && $('<table class="table"/><tbody />').append(l)
                }
            }
        }
    });
    if ($("input.dt-input").on("keyup", (function() {
            ! function(a, t) {
                if (5 == a) {
                    var l = n.val(),
                        s = o.val();
                    "" !== l && "" !== s && ($.fn.dataTableExt.afnFiltering.length = 0, e.dataTable().fnDraw(), r(a, l, s)), e.dataTable().fnDraw()
                } else e.DataTable().column(a).search(t, !1, !0).draw()
            }($(this).attr("data-column"), $(this).val())
        })), l.length) l.DataTable({
        ajax: assetsPath + "json/table-datatable.json",
        columns: [{
            data: ""
        }, {
            data: "full_name"
        }, {
            data: "email"
        }, {
            data: "post"
        }, {
            data: "city"
        }, {
            data: "start_date"
        }, {
            data: "salary"
        }, {
            data: "age"
        }, {
            data: "experience"
        }, {
            data: "status"
        }],
        columnDefs: [{
            className: "control",
            orderable: !1,
            targets: 0,
            searchable: !1,
            render: function(a, t, e, l) {
                return ""
            }
        }, {
            targets: -1,
            render: function(a, t, e, l) {
                var n = e.status,
                    o = {
                        1: {
                            title: "Current",
                            class: "bg-label-primary"
                        },
                        2: {
                            title: "Professional",
                            class: " bg-label-success"
                        },
                        3: {
                            title: "Rejected",
                            class: " bg-label-danger"
                        },
                        4: {
                            title: "Resigned",
                            class: " bg-label-warning"
                        },
                        5: {
                            title: "Applied",
                            class: " bg-label-info"
                        }
                    };
                return void 0 === o[n] ? a : '<span class="badge rounded-pill ' + o[n].class + '">' + o[n].title + "</span>"
            }
        }],
        destroy: !0,
        dom: '<"row"<"col-sm-12 col-md-6"l><"col-sm-12 col-md-6 d-flex justify-content-center justify-content-md-end"f>>t<"row"<"col-sm-12 col-md-6"i><"col-sm-12 col-md-6"p>>',
        responsive: {
            details: {
                display: $.fn.dataTable.Responsive.display.modal({
                    header: function(a) {
                        return "Details of " + a.data().full_name
                    }
                }),
                type: "column",
                renderer: function(a, t, e) {
                    var l = $.map(e, (function(a, t) {
                        return "" !== a.title ? '<tr data-dt-row="' + a.rowIndex + '" data-dt-column="' + a.columnIndex + '"><td>' + a.title + ":</td> <td>" + a.data + "</td></tr>" : ""
                    })).join("");
                    return !!l && $('<table class="table"/><tbody />').append(l)
                }
            }
        }
    });
    setTimeout((() => {
        $(".dataTables_filter .form-control").removeClass("form-control-sm"), $(".dataTables_length .form-select").removeClass("form-select-sm")
    }), 200)
}));
</script>

</body>
</html>
