<?php include 'views/layout/header.php'; ?>

<nav class="navbar navbar-expand-lg navbar-light bg-light mb-4 shadow-sm">
  <div class="container-fluid">
    <a class="navbar-brand" href="#">User Panel</a>
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav me-auto">
        <li class="nav-item"><a class="nav-link active" href="<?php echo BASE_URL; ?>?page=user&action=dashboard">Dashboard</a></li>
        <li class="nav-item"><a class="nav-link" href="<?php echo BASE_URL; ?>?page=user&action=contacts">Contacts</a></li>
        <li class="nav-item"><a class="nav-link" href="<?php echo BASE_URL; ?>?page=user&action=template">Template</a></li>
        <li class="nav-item"><a class="nav-link" href="<?php echo BASE_URL; ?>?page=user&action=birthdays">Today's Birthdays</a></li>
      </ul>
      <a href="<?php echo BASE_URL; ?>?page=auth&action=logout" class="btn btn-outline-danger btn-sm">Logout</a>
    </div>
  </div>
</nav>

<div class="row">
    <div class="col-md-6 mb-4">
        <div class="card text-white bg-primary h-100">
            <div class="card-body">
                <h5 class="card-title">Total Contacts</h5>
                <p class="card-text display-4"><?php echo $totalContacts; ?></p>
                <a href="<?php echo BASE_URL; ?>?page=user&action=contacts" class="btn btn-light btn-sm text-primary">Manage Contacts</a>
            </div>
        </div>
    </div>
    <div class="col-md-6 mb-4">
        <div class="card text-white bg-success h-100">
            <div class="card-body">
                <h5 class="card-title">Today's Birthdays</h5>
                <p class="card-text display-4"><?php echo $todaysBirthdays; ?></p>
                <a href="<?php echo BASE_URL; ?>?page=user&action=birthdays" class="btn btn-light btn-sm text-success">View & Send</a>
            </div>
        </div>
    </div>
</div>

<?php include 'views/layout/footer.php'; ?>
