<?php include ("phpevent.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">Events</h1>
							<ul>
								<li>
									<a class="active" href="home.php">Home</a>
								</li>
								<li>Events</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($event_count > 0){
					foreach($all_events as $event){
						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="'.$event['event_image'].'" alt="Image">
                                   </div>
                                   <div class="categorie">
                                       <a href="#">Events</a>
                                   </div>
                                   <div class="content-part">
                                       <div class="address"><i class="fa fa-map-o"></i>'.$event['location'].'</div>
                                       <h4 class="title"><a href=event-single.php?event-id='.encrypt($event['event_id']).'">';
                                        if(strlen($event['event_title']) > 20){
                                            echo substr($event['event_title'], 0, 20) . "..";
                                        }else{
                                            echo $event['event_title'];
                                        }
                                        echo'</a></h4>
                                       <div class="event-btm">
                                           <div class="date-part">
                                               <div class="date">
                                                   <i class="fa fa-calendar-check-o"></i>
                                                   '.$event['day'].'</span> '.$event['month'].' 
                                               </div>
                                           </div>
                                           <div class="btn-part">
                                               <a href="event-single.php?event-id='.encrypt($event['event_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>