<?php
    session_start();
    $isValid = $_SESSION['isValid'];
    if (!$isValid) {
        header("Location: /adminpanel/contents/login.php");
        exit;
    }
 ?>
    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Admin-Dashboard</title>
      <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
      <link href="https://cdn.datatables.net/2.0.8/css/dataTables.bootstrap4.css" rel="stylesheet">
    
    
      <!-- DataTables CSS -->
      <link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
      <link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.0.1/css/buttons.dataTables.min.css">
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
    
      <link rel="stylesheet" href="./assets/css/style.css">
    
    </head>
    <div class="modal fade" id="update_order" role="dialog" aria-labelledby="addsucessModal" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h6 class="modal-title" id="modal-title-default">Product Details</h6>
               <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
            </div>
            <div class="modal-body">
                <ul id="edit-order">
                </ul>
            </div>
        </div>
    </div>
</div>
    <body>
      <div class="d-flex" id="wrapper">
        <!-- Sidebar -->
        <div class="bg-dark border-right" id="sidebar-wrapper">
          <div class="sidebar-heading text-white d-flex justify-content-center mt-2"><img class="" src="https://kiiltavatpinnat.fi/logo.svg" width="70px"></div>
          <hr class="text-white bg-white">
          <div class="list-group list-group-flush">
            <a href="javascript: void(0);" class="list-group-item list-group-item-action bg-dark text-white">Dashboard</a>
            <a href="/adminpanel/contents/change.php" class="list-group-item list-group-item-action bg-dark text-white">Change password</a>
          </div>
        </div>
        <!-- /#sidebar-wrapper -->
    
        <!-- Page Content -->
        <div id="page-content-wrapper">
          <nav class="navbar navbar-expand-lg navbar-light bg-light border-bottom">
            <a href="/adminpanel/contents/logout.php" class="btn btn-danger ml-auto" id="logout-button">Logout</a>
          </nav>
          <div class="container-fluid">
            <div class="col-xl-12 py-3">
              <div>
                <ol class="d-inline-block breadcrumb text-uppercase font-size-xs p-0">
                  <li class="d-inline-block breadcrumb-item bg-white"><span>Dashboard</span></li>
    
                </ol>
                <h2 class=" mt-1 mb-2 font-weight-bold">DASHBOARD - ADMIN</h2>
                <p class="text-black-50 mb-0">Welcome to your admin panel</p>
              </div>
            </div>
            <div class="col-6">
              <div id="section1" class="section py-5">
                <h1>Total Bookings</h1>
                <h4><span id="booking_count">0</span></h4>
              </div>
              <div>
              </div>
            </div>
            <div class="col-12">
              <div class="card">
                <div class="card-header">
                  <small class="text-muted">Booking</small><br>
                  Booking Details
                </div>
                <div class="card-body py-5 table-responsive">
                  <table id="bookingList" class="table table-striped w-100 text-center">
                    <thead>
                      <tr>
                        <th>SRN0</th>
                        <th>Name</th>
                        <th>Phone</th>
                        <th>Email</th>
                        <th>Address</th>
                        <th>Remarks</th>
                        <th>Booking Date</th>
                        <th>Price</th>
                        <th>Price without tax</th>
                        <th>Tax Price</th>
                        <th>Product Detail</th>
                      </tr>
                    </thead>
                  </table>
                </div>
    
              </div>
            </div>
    
            <!-- /#page-content-wrapper -->
          </div>
          <footer class="text-center py-2">&copy; Copyright <?= date("Y"); ?> All Rights Reserved.</footer>
          <!-- /#wrapper
          <!-- Bootstrap and jQuery -->
        <!-- jQuery -->
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <!--=======================BOOTSTRAP JS============================-->
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"></script>
        <!--=======================BOOTSTRAP JS============================-->
        
        <!-- DataTables JS -->
        <script src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
        <script src="https://cdn.datatables.net/buttons/2.0.1/js/dataTables.buttons.min.js"></script>
        <script src="https://cdn.datatables.net/buttons/2.0.1/js/buttons.html5.min.js"></script>
        <script src="https://cdn.datatables.net/buttons/2.0.1/js/buttons.colVis.min.js"></script>
        
          <!--=======================CUSTOM JS============================-->
          <script src="./assets/js/script.js"></script>
          <!--=======================CUSTOM JS============================-->
    </body>
    
    </html>