<?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">
About Sarpanch
</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,350)); ?>
</p>

</div>

</div>

<?php } ?>

</div>