<!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>RBT Ringba</title>

    <!-- Custom fonts for this template-->
    <link href="<?= $template ?>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="<?= $template ?>css/sb-admin-2.min.css" rel="stylesheet">

    <!-- Custom styles for this page -->
    <link href="<?= $template ?>vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
    <!-- Bootstrap core JavaScript-->
    <script src="<?= $template ?>vendor/jquery/jquery.min.js"></script>
    <script src="<?= $template ?>vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
    <!-- Page level plugins -->
    <script src="<?= $template ?>vendor/datatables/jquery.dataTables.min.js"></script>
    <script src="<?= $template ?>vendor/datatables/dataTables.bootstrap4.min.js"></script>
    <script src="//cdn.datatables.net/buttons/2.3.2/js/dataTables.buttons.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
    <script src="//cdn.datatables.net/buttons/2.3.2/js/buttons.html5.min.js"></script>

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

    <!-- Custom scripts for all pages-->
    <script src="<?= $template ?>js/sb-admin-2.min.js"></script>
    <script src="<?= $template ?>custom.js"></script>
    <script type="text/javascript" charset="utf-8">
        localStorage.setItem('path', '<?= $path ?>');
        localStorage.setItem('template', '<?= $template ?>');
    </script>

    <script src="<?= $template ?>jquery_validator/jquery.validationEngine.js" type="text/javascript"
            charset="utf-8"></script>
    <script src="<?= $template ?>jquery_validator/jquery.validationEngine-en.js" type="text/javascript"
            charset="utf-8"></script>
    <link rel="stylesheet" href="<?= $template ?>jquery_validator/validationEngine.jquery.css">
    <style>
        .dt-buttons, .dataTables_length {
            float: left;
            margin-right: 15px;
        }
    </style>

</head>

<body id="page-top">

<!-- Page Wrapper -->
<div id="wrapper">
    <!-- Sidebar -->
    <!-- End of Sidebar -->

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

        <!-- Main Content -->


        <!-- Topbar -->
        <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
            <h1 class="h3 mb-2 text-gray-800 ml-2"> Records </h1>
            <!-- Sidebar Toggle (Topbar) -->
            <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
                <i class="fa fa-bars"></i>
            </button>


            <!-- Topbar Navbar -->
            <ul class="navbar-nav ml-auto">


                <div class="topbar-divider d-none d-sm-block"></div>

                <!-- Nav Item - User Information -->
                <li class="nav-item dropdown no-arrow">
                    <a class="btn btn-primary" href="<?= $path ?>admin/logout">Logout</a>
                </li>

            </ul>

        </nav>
        <!-- End of Topbar -->


        <!-- End of Main Content -->


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

            <!-- Page Heading -->


            <!-- DataTales Example -->
            <div class="card shadow mb-4">
                <div class="card-header py-3">
                    <h6 class="m-0 font-weight-bold text-primary">Latest Records</h6>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table id="DbRecords" class="table table-bordered" width="100%" cellspacing="0">
                            <thead>
                            <tr>
                                <th>S.NO</th>
                                <th>Date</th>
                                <th>Bid ID</th>
                                <th>Phone Number</th>
                                <th>Request PhoneNumber</th>
                                <th>State</th>
                                <th>Bid Amount</th>
                                <th>ZipCode</th>
                                <th>Reject Reason</th>

                            </tr>
                            </thead>
                            <tbody>
                            <!--                    <tr>-->
                            <!--                        <td>Tiger Nixon</td>-->
                            <!--                        <td>System Architect</td>-->
                            <!--                        <td>Edinburgh</td>-->
                            <!--                        <td>61</td>-->
                            <!--                        <td>2011/04/25</td>-->
                            <!--                        <td>$320,800</td>-->
                            <!--                    </tr>-->
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

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

        <!-- Page level plugins -->


        <footer class="sticky-footer bg-white">
            <div class="container my-auto">
                <div class="copyright text-center my-auto">
                    <span>Copyright &copy; Errands Services <?= date('Y') ?></span>
                </div>
            </div>
        </footer>
        <!-- End of Footer -->

    </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>

<!-- Logout Modal-->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
                <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
            <div class="modal-footer">
                <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
                <a class="btn btn-primary" href="<?= $path ?>admin/logout">Logout</a>
            </div>
        </div>
    </div>
</div>


<script>
    $(document).ready(function () {
        // $('#DbRecords').DataTable();
        $('#DbRecords').DataTable({
            'processing': true,
            'searching': true,
            'pageLength': 100,
            'serverSide': true,
            'lengthMenu': [[100, 500, 1000, -1], [100, 500, 1000, 'All']],
            "ajax": {
                url: '<?=$path?>admin/fetch_all_record',
                type: 'POST'
            },

        });
    });
</script>

</body>

</html>
