<?php

/* ==========================
   CURRENT SARPANCH
========================== */

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

$data = mysqli_fetch_assoc($sarpanch);

?>

<div class="sarpanch-section">

<h2 class="section-title">
सरपंच के बारे में जानकारी
</h2>

<?php if($data){ ?>

<div class="sarpanch-box">

<div class="sarpanch-image">

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

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

<?php } ?>

</div>

<div class="sarpanch-text">

<h3><?php echo $data['name']; ?></h3>

<p style="color:#777;">
<?php echo $data['duration']; ?>
</p>

<p>
<?php echo nl2br(substr($data['description'],0,220)); ?>...
<br><br>

<a href="sarpanch_detail.php?id=<?php echo $data['id']; ?>" class="view-btn">
पूरा पढ़ें →
</a>
</p>

</div>

</div>

<?php } ?>

</div>