<?php
include_once "global.php";

$pageTitle = "View/Edit Lead - ";
include_once 'header.php';
$totalRecords = $crm->getTotalRecords();
$activeRecords = $crm->getActiveRecords();
$highRisk = $crm->getHighRiskRecords();
?>

<!--breadcrumb-->
<div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
    <div class="breadcrumb-title pe-3">List Explorer</div>
    <div class="ps-3">
        <nav aria-label="breadcrumb">
            <ol class="breadcrumb mb-0 p-0">
                <li class="breadcrumb-item"><a href="javascript:;"></a>
                </li>
                <li class="breadcrumb-item active" aria-current="page">View List Explorer</li>
            </ol>
        </nav>
    </div>
</div>
<!--end breadcrumb-->
<h6 class="mb-0 text-uppercase">View List Explorer</h6>
<hr>
<!-- TOP STATS -->
<div class="row  g-3 mb-3">
    <div class="col-12 col-md-6 col-xl-3">
  <div class="card ui-card">
    <div class="card-body">
      <div class="stat-label">Total Records</div>
      <p class="stat-value"><?php echo $totalRecords; ?></p>
    </div>
  </div>
</div>

    <div class="col-12 col-md-6 col-xl-3">
      <div class="card ui-card">
        <div class="card-body">
          <div class="stat-label">Active</div>
          <p class="stat-value"><?php echo $activeRecords; ?></p>
        </div>
      </div>
    </div>

    <div class="col-12 col-md-6 col-xl-3">
      <div class="card ui-card">
        <div class="card-body">
          <div class="stat-label">High Risk</div>
          <p class="stat-value"><?php echo $highRisk; ?></p>
        </div>
      </div>
    </div>
</div>


<div class="card">
    <div class="card-body p-4">
        <div class="table-responsive">
            <?php $crm->listExplorerView(); ?>
        </div>
    </div>
</div>

<?php
include_once 'footer.php';
?>