<!doctype html>
<html lang="en" translate="no" class="w-[640px] mx-auto md:w-full">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>News</title>
<?php echo view('user/layout/head');?>
<link href="https://cdn.datatables.net/2.0.8/css/dataTables.dataTables.css">
</head>
<style>
  .dt-paging 
  {
    text-align:center;
    margin-top:15px;
   
  }
  .dt-paging-button
  {
    font-size:20px;
    color:#fff;
    padding:0px 10px 0px 10px;
  }
  .dt-paging .current
  {
    border : 1px solid #e49a00 !important;
    /* border-radius : 20px !important; */
    background : #e49a00 !important;

  }
  .img
  {
    width : 50px;
    height:50px;
    border:none;
    border-radius:23px;
  }
</style>
<body class="reg-overflow">

<section class="dash-banner-bg banner-bg">
<div class="container">
<!---header start---->
<?php echo view('user/layout/header');?>
<!---header end---->

<!---banner start---->

<div class="row">
  <div class="col-lg-12">



<div class="reward-wrap">
  <div class="title text-center py-1">
    <h2 class="text-primary ">Announcement</h2>
  </div>

 <?php 

// if($count > 1)
// {
//   $record = "Records";
// }
// else
// {
//   $record = "Record";
// }


?>
<!--
  <div >
    <h3 class="text-center text-white"><?php echo $count;?>&nbsp;<span><?php echo $record;?></span></h3>
  </div>
  <hr class="text-white"> -->

<table class="trans_info mt-4 reward-info" id="example1" style="width:100%">


<thead style="display:none">
  <td></td>
  <td></td>
</thead>
<tbody>
   <?php if($news) 
  { 
     
    foreach($news as $row)
    {
     
      $date = date('M d, Y',strtotime($row->news_date));
    ?>


   
    <tr>
      <td ><a href="<?php echo base_url();?>/news_details/<?php echo $row->news_id;?>">
      <p><!--<img src="<?php echo base_url();?>/assets/images/news/<?php echo $row->news_image;?>"  class="img">&nbsp;&nbsp;<span class="mb-0" style="text-transform:uppercase;"><?php echo $row->news_header;?></span>--></p>
     <p class="text-white-50 mb-0"><?php echo ucfirst(substr($row->news_content, 0, 70).'...');?></p>
      <span class="text-white-50"><?php echo $date;?></span> </a></td>
  
      <td > 
        <a href="<?php echo base_url();?>/news_details/<?php echo $row->news_id;?>">
        <i class="fa-solid fa-greater-than"></i>
     </a>
    </td>
   
    </tr>

   

    <?php } } ?>
   
    
   


    </tbody>
    <tfoot style="display:none"></tfoot>
 
</table>


</div>
     

   
<!---banner end---->


</div>


</div>
</div>


<?php echo view('user/layout/footer');?>


</div>
</section>


<?php echo view('user/layout/footer-script');?>
<script src="https://cdn.datatables.net/2.0.8/js/dataTables.js"></script>

<script>
$(document).ready(function() {
  $('#example1').DataTable({
    pagingType: 'full_numbers',
    searching: false,
    info:false,
    lengthChange: false,
    pageLength : 5
    
    
  });
});
</script>

</body>
</html>
