<?php include ("phpnews.php")?>
<!DOCTYPE html>
<html lang="zxx">
    
<head>
        
        <title>Learning Tree - Creche Academy</title>
		<?php include ('header.php');?>
		<!-- Main content Start -->
		<div class="main-content">
			<!-- Breadcrumbs Start -->
			<div class="rs-breadcrumbs breadcrumbs-overlay">
					<div class="breadcrumbs-img">
							<img src="assets/images/breadcrumbs/2.jpg" alt="Breadcrumbs Image">
					</div>
					<div class="breadcrumbs-text white-color">
							<h1 class="page-title">News</h1>
							<ul>
								<li>
									<a class="active" href="home.php">Home</a>
								</li>
								<li>News</li>
							</ul>
					</div>
			</div>
			<!-- Breadcrumbs End -->

					    <!-- Events Section Start -->
            <div class="rs-event orange-color pt-100 pb-100 md-pt-70 md-pb-70">
                <div class="container">
                    <div class="row">
					<?php
				if($news_count > 0){
				foreach($all_news as $news){
          $news['news_image'] = str_replace($_SERVER['DOCUMENT_ROOT'], "", $news['news_image']);
				echo '
                        <div class="col-lg-4 mb-60 col-md-6">
                            <div class="event-item">
                                <div class="event-short">
                                   <div class="featured-img">
                                       <img src="'.$news['news_image'].'" alt="Image">
                                   </div>
                                   <div class="categorie">
                                       <a href="#">News</a>
                                   </div>
                                   <div class="content-part">
                                       <h4 class="title"><a href=news-single.php?news-id='.encrypt($news['news_id']).'">';
                                    if(strlen($news['news_title']) > 27){
                                        echo substr($news['news_title'], 0, 27) . "...";
                                    }else{
                                        echo $news['news_title'];
                                    }
                                    echo'</a></h4>
                                       <div class="event-btm">
                                           <div class="date-part">
                                               <div class="date">
                                                   <i class="fa fa-calendar-check-o"></i>
                                                   '.$news['day'].' '.$news['month'].' 
                                               </div>
                                           </div>
                                           <div class="btn-part">
                                               <a href="news-single.php?news-id='.encrypt($news['news_id']).'">Read More</a>
                                           </div>
                                       </div>
                                   </div> 
                                </div>
                            </div>
                        </div>'; 
                    }
                }
                echo'
						
                    </div>
                </div> 
            </div>'; ?>
            <!-- Events Section End --> 
		
        </div> 
        <!-- Main content End --> 
		
	<?php include ('footer.php');?>
</html>