<?php 
include_once "../view/partials/template/message.php";
include_once "../view/partials/banner/bannerEvents.php";
include_once  "../view/partials/search/ticketSearch.php"; 
?>
<!-- ==========Event-Section========== -->
<section class="event-section padding-top padding-bottom">
    <div class="container">
        <div class="row flex-wrap-reverse justify-content-center">

            <?php include_once "../view/partials/template/promoSideBar.php"; ?>
            
            <div class="col-lg-9 mb-50 mb-lg-0">
                <div class="filter-tab">
                    <!-- <div class="filter-area">
                        <div class="filter-main">
                            <div class="left w-100 justify-content-between">
                                <div class="item">
                                    <span class="show">Show :</span>
                                    <select class="select-bar">
                                        <option value="12">12</option>
                                        <option value="15">15</option>
                                        <option value="18">18</option>
                                        <option value="21">21</option>
                                        <option value="24">24</option>
                                        <option value="27">27</option>
                                        <option value="30">30</option>
                                    </select>
                                </div>
                                <div class="item mr-0">
                                    <span class="show">Sort By :</span>
                                    <select class="select-bar">
                                        <option value="showing">now showing</option>
                                        <option value="exclusive">exclusive</option>
                                        <option value="trending">trending</option>
                                        <option value="most-view">most view</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div> -->
                    <div class="row mb-10 justify-content-center">
                        <?php foreach ($events as $ev) {?>
                            <div class="col-sm-6 col-lg-4" style="min-height: 173px;">
                                <div class="event-grid">
                                    <div class="movie-thumb c-thumb">
                                        <a href="<?= getUrl("events","Events","eventDetails", array('idE'=>$ev['evenid'])); ?>">
                                            <img src="<?= $ev['evenimg1']; ?>" alt="event">
                                        </a>
                                        <div class="event-date">
                                            <h6 class="date-title"><?= strftime('%d', strtotime($ev['evenfech'])); ?></h6>
                                            <span><?= strftime('%b', strtotime($ev['evenfech'])); ?></span>
                                        </div>
                                    </div>
                                    <div class="movie-content bg-one" style="min-height: 173px;">
                                        <h5 class="title m-0">
                                            <a href="<?= getUrl("events","Events","eventDetails", array('idE'=>$ev['evenid'])); ?>"><?= $ev['evennomb']." ".date('Y', strtotime($ev['evenfech'])); ?></a>
                                        </h5>
                                        <div class="movie-rating-percent">
                                            <span><?= $ev['ciudad']." - ".strftime('%d %b %Y', strtotime($ev['evenfech'])); ?></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php } ?>
                    </div>
                    <!-- <div class="pagination-area text-center">
                        <a href="#0"><i class="fas fa-angle-double-left"></i><span>Prev</span></a>
                        <a href="#0">1</a>
                        <a href="#0">2</a>
                        <a href="#0" class="active">3</a>
                        <a href="#0">4</a>
                        <a href="#0">5</a>
                        <a href="#0"><span>Next</span><i class="fas fa-angle-double-right"></i></a>
                    </div> -->
                </div>
            </div>
        </div>
        <div class="pt-5">                     
        <?php include_once "../view/partials/template/sponsors.php"; ?>
        </div>                    
    </div>
</section>
<!-- ==========Event-Section========== -->