<?php
auth.php
session_start();
if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) {
    header("Location: login.php");
    exit;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Admin Panel | Dashboard</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/css/adminlte.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">

  <!-- Navbar -->
  <nav class="main-header navbar navbar-expand navbar-white navbar-light">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
      </li>
      <li class="nav-item d-none d-sm-inline-block">
        <a href="#" class="nav-link">Home</a>
      </li>
    </ul>
    <ul class="navbar-nav ml-auto">
      <li class="nav-item dropdown">
        <a class="nav-link" data-toggle="dropdown" href="#">
          <i class="far fa-bell"></i>
          <span class="badge badge-warning navbar-badge">3</span>
        </a>
        <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
          <span class="dropdown-header">3 Notifications</span>
          <div class="dropdown-divider"></div>
          <a href="#" class="dropdown-item">
            <i class="fas fa-envelope mr-2"></i> 1 new message
          </a>
          <a href="#" class="dropdown-item">
            <i class="fas fa-users mr-2"></i> 2 new blood requests
          </a>
        </div>
      </li>
      <li class="nav-item">
        <a href="logout.php" class="nav-link text-danger"><i class="fas fa-sign-out-alt"></i> Logout</a>
      </li>
    </ul>
  </nav>
  <!-- /.navbar -->

  <!-- Main Sidebar Container -->
  <aside class="main-sidebar sidebar-dark-primary elevation-4">
    <a href="#" class="brand-link">
      <span class="brand-text font-weight-light">My Admin Panel</span>
    </a>
    <div class="sidebar">
      <nav class="mt-2">
        <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu">
          <li class="nav-item">
            <a href="#" class="nav-link active target-frame" data-link="dashboard_home.html">
              <i class="nav-icon fas fa-tachometer-alt"></i>
              <p> Dashboard </p>
            </a>
          </li>
          <li class="nav-item">
            <a href="#" class="nav-link target-frame" data-link="https://shitolkar.top/clint/donation/admin_panel.php">
              <i class="fas fa-hand-holding-usd nav-icon"></i>
              <p>Donation Info</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="#" class="nav-link target-frame" data-link="https://shitolkar.top/clint/bloodregi/admin.html">
              <i class="fas fa-tint nav-icon"></i>
              <p>Blood Donor List</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="#" class="nav-link target-frame" data-link="https://shitolkar.top/clint/ClubRegi/admin.php">
              <i class="fas fa-users nav-icon"></i>
              <p>Club Registrations</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="#" class="nav-link target-frame" data-link="https://shitolkar.top/clint/slider/newAdminPannel/">
              <i class="fas fa-images nav-icon"></i>
              <p>Home Slider</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="#" class="nav-link target-frame" data-link="https://shitolkar.top/clint/urgentnumber/admin.php">
              <i class="fas fa-phone-alt nav-icon"></i>
              <p>Emergency Numbers</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="#" class="nav-link target-frame" data-link="messages.php">
              <i class="fas fa-envelope nav-icon"></i>
              <p>Messages</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="#" class="nav-link target-frame" data-link="https://shitolkar.top/clint/Html/html.html">
              <i class="fas fa-location-dot nav-icon ml-1" style="color: white;"></i>
              <p>User Track</p>
            </a>
          </li>
          <li class="nav-item">
            <a href="#" class="nav-link target-frame" data-link="settings.php">
              <i class="fas fa-cog nav-icon"></i>
              <p>Settings</p>
            </a>
          </li>
        </ul>
      </nav>
    </div>
  </aside>

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <iframe id="content-frame" src="dashboard_home.html" style="width:100%; height:100vh; border:none;"></iframe>
  </div>
  <!-- /.content-wrapper -->

<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/js/adminlte.min.js"></script>
<script>
  $(document).ready(function(){
    $('.target-frame').click(function(e){
      e.preventDefault();
      var url = $(this).data('link');
      $('#content-frame').attr('src', url);
    });
  });
</script>
</body>
</html>