<?php
	if(count($events)>0){
	?>
    <div class="row" style="padding-top:50px;">
          <div class="achievement-slide owl-carousel">
                  
                  <?php 
	  				foreach($events as $event){
	  				?>
                    <div class="carousel-wrapper">
                         <div class="col-md-6 col-sm-5">
                              <div class="caption">
                                    <?php if($event->simage!='' and file_exists('./static/uploadfiles/events/'.$event->simage)){?>
					<img src="./static/uploadfiles/events/<?php echo $event->simage?>" width="150px" height="150px" />
					<?php }else{
					?><img src="images/noimg.jpg" width="150px" height="150px" /><?php
					}?>
                               	</div>
                          </div>

                          <div class="col-md-5 col-sm-7">
                               	<div class="content">
                                  	 <h3>
                                       <a href="#" onclick="gotolink_incl('eventdetails','<?php echo $event->id;?>')"><?php echo $event->title?>.</a>
                                     </h3>
                                      <p><?php echo date('d.m.Y',strtotime($event->startdate))?></p>
                               	 </div>
                          </div><!--end col-md-5-->
                       </div><!--end carousel-->
                  <?php
	  				}
	 			  ?>
                  
		</div><!--end achievement-->
   
     </div><!--end row-->

<?php }else{echo "Not Available";}?>


<form name="frmevent_incl" id="frmevent_incl" method="post">
<input type="hidden" id="event_id" name="event_id" />
</form>
<script>
function gotolink_incl(u,event_id)
{
	document.frmevent_incl.event_id.value=event_id;
	document.frmevent_incl.action = u;
	
	document.frmevent_incl.submit();
}
</script>