<?php

/* ==========================
   SARPANCH LIST
========================== */

$sarpanches = mysqli_query($conn,"
SELECT *
FROM village_sarpanches
WHERE village_id='$village_id'
ORDER BY id DESC
LIMIT 4
");

?>

<div class="sarpanch-list-section">

<h2 class="section-title">
Sarpanch List
</h2>

<div class="sarpanch-grid">

<?php while($row=mysqli_fetch_assoc($sarpanches)){ ?>

<div class="sarpanch-card">

<?php if($row['image']){ ?>

<img src="/digital_panchayat/uploads/sarpanches/<?php echo $row['image']; ?>">

<?php } ?>

<h4><?php echo $row['name']; ?></h4>

<p><?php echo $row['duration']; ?></p>

</div>

<?php } ?>

</div>

<div class="view-more">

<a href="sarpanch_list.php?village=<?php echo $slug; ?>">
View More →
</a>

</div>

</div>