
        <?php include 'include/navbar.php';?>
        <?php include 'include/sidebar.php';?>
     
            <div id="layoutSidenav_content">
                <main>
                    <div class="container-fluid px-4">
                        <h1 class="mt-4">Dashboard</h1>
                        <ol class="breadcrumb mb-4">
                            <li class="breadcrumb-item active">Dashboard</li>
                        </ol>
                        <div class=" mt-4">
  <div class="row">
    <!-- Card 1: Total Users -->
    <?php
// Total Users
$totalUsers = mysqli_num_rows(mysqli_query($conn, "SELECT id FROM users"));

// Pending Users (status = 0)
$pendingUsers = mysqli_num_rows(mysqli_query($conn, "SELECT id FROM users WHERE status = 0"));

// Approved Users (status = 1)
$approvedUsers = mysqli_num_rows(mysqli_query($conn, "SELECT id FROM users WHERE status = 1"));

// Total Blogs
$totalBlogs = mysqli_num_rows(mysqli_query($conn, "SELECT id FROM blogs"));

$todayUsers = mysqli_num_rows(mysqli_query($conn, "SELECT id FROM users WHERE DATE(created_at) = CURDATE()"));
?>

<div class="col-md-4 mb-4">
  <div class="card text-white bg-dark shadow">
    <div class="card-body">
      <h5 class="card-title">Today Users</h5>
      <h3><?= $todayUsers ?></h3>
    </div>
  </div>
</div>



<div class="col-md-4 mb-4">
  <div class="card text-white bg-primary shadow">
    <div class="card-body">
      <h5 class="card-title">Total Users</h5>
      <h3><?= $totalUsers ?></h3>
    </div>
  </div>
</div>



<div class="col-md-4 mb-4">
  <div class="card text-white bg-secondary shadow">
    <div class="card-body">
      <h5 class="card-title">Pending Users</h5>
      <h3><?= $pendingUsers ?></h3>
    </div>
  </div>
</div>

<div class="col-md-4 mb-4">
  <div class="card text-white bg-info shadow">
    <div class="card-body">
      <h5 class="card-title">Approve Users</h5>
      <h3><?= $approvedUsers ?></h3>
    </div>
  </div>
</div>

<div class="col-md-4 mb-4">
  <div class="card text-white bg-warning shadow">
    <div class="card-body">
      <h5 class="card-title">Total Blogs</h5>
      <h3><?= $totalBlogs ?></h3>
    </div>
  </div>
</div>


  </div>
</div>

                        <div class="row">
                            <!-- <div class="col-xl-3 col-md-6">
                                <div class="card bg-dark text-white mb-4">
                                    <div class="card-body">Add Blog</div>
                                    <div class="card-footer d-flex align-items-center justify-content-between">
                                        <a class="small text-white stretched-link" href="add-blog.php">View Details</a>
                                        <div class="small text-white"><i class="fas fa-angle-right"></i></div>
                                    </div>
                                </div>
                            </div> -->
                            


                        </div>
                    </div>
                </main>
                <?php include "include/footer.php";?>
            </div>
        </div>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
        <script src="js/scripts.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js" crossorigin="anonymous"></script>
        <script src="assets/demo/chart-area-demo.js"></script>
        <script src="assets/demo/chart-bar-demo.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" crossorigin="anonymous"></script>
        <script src="js/datatables-simple-demo.js"></script>
    </body>
</html>
