<div class="hero-area">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800' rel='stylesheet'
          type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Raleway:100,200,300,700,800,900' rel='stylesheet'
          type='text/css'>
    <div class="tp-banner-container">
        <div class="tp-banner">
            <ul>
                <?php global $connection; ?>
                <?php $query = $connection->prepare("SELECT * FROM slide LEFT JOIN slideshow ON slide.idslideshow = slideshow.idslideshow WHERE slideshow.`status`=1 AND slideshow.idregion={$_SESSION['geolocation']->idregion}"); ?>
                <?php $query->execute(); ?>
                <?php if ($query->rowCount()) : ?>
                    <?php foreach ($query->fetchAll(PDO::FETCH_OBJ) as $slide) : ?>
                        <li data-transition="slidevertical" data-slotamount="1" data-masterspeed="1000"
                            data-saveperformance="off" data-title="">
                            <img src="<?php echo SITE_URL; ?>upload/slide/<?php echo $slide->source; ?>"
                                 alt="fullslide1" data-bgposition="center top" data-bgfit="cover"
                                 data-bgrepeat="no-repeat">
                        </li>
                    <?php endforeach; ?>
                <?php else : ?>
                    <li data-transition="slidevertical" data-slotamount="1" data-masterspeed="1000"
                        data-saveperformance="off" data-title="Slide 1">
                        <img src="<?php echo SITE_URL; ?>images/slider1.jpg" alt="fullslide1" data-bgposition="center top" data-bgfit="cover" data-bgrepeat="no-repeat">
                    </li>
                <?php endif; ?>
            </ul>
            <div class="tp-bannertimer"></div>
        </div>
    </div>
</div>
<div class="main" role="main">
    <div id="content" class="content full padding-b0" style="padding: 0px 0;">
        <div class="search-form">
            <div class="chevron_wrapper_down">
                <a href="javascript:void(0)" class="chevron_down_search"><span class="txt_dd">SLOT SEARCH </span><i class="fa fa-chevron-down"></i></a>
            </div>
            <div class="search-form-inner" style="">
                <form class="form-container" id="form-slot-search" method="get" action="<?php echo SITE_URL; ?>listing.php">
                    <input type="hidden" name="model" id="model" value="">
                    <!-- <input type="hidden" name="make" id="make" value=""> -->
                    <div class="row">
                        <?php if (true) { ?>
                            <div class="col-md-12 col-sm-12">
                                <div class="row">
                                    <div class="col-md-4 col-sm-6 col-xs-6 pad_lr_5">
                                        <div>
                                            <h5 style="color: #fff; margin-bottom: 0px;">Make</h5>
                                            <div class="counter_container counter_main">
                                                <?php $query = $connection->prepare("SELECT * FROM  `make` WHERE `status`=1 ORDER BY `name`"); ?>
                                                <?php $query->execute(); ?>
                                                <?php $makes = NULL; ?>
                                                <?php if ($query->rowCount()) { $makes = $query->fetchAll(PDO::FETCH_OBJ); ?>

                                                    <?php  $first =  true; ?>
                                                    <?php foreach ($makes as $make) { ?>
                                                        <div  class="make_to_get" data-selector=".<?php echo $make->name; ?>"  style="display:none;" > </div>
                                                        <div  class="modelIdForAJAX" data-selector=".<?php echo $make->idmake; ?>"  style="display:none;" > </div>
                                                        <?php  if($first):?>
                                                            <input type="hidden" name="make" id="make" value="<?php echo $make->name;?>">
                                                            <?php if (empty($make->imglogo)) { ?>
                                                                <img src="http://via.placeholder.com/890x600?text=No Preview"/>
                                                                <span><?php echo $make->name; ?>,</span>
                                                            <?php } else { ?>
                                                                <img src="<?php echo SITE_URL . "upload/make/" . $make->imglogo; ?>" style="<?php echo($make->namehidden ? 'max-height: 80px !important;':'');?>"/>
                                                                <?php if ($make->namehidden) { ?>
                                                                    <span>,</span>
                                                                <?php } else { ?>
                                                                    <span><?php echo $make->name; ?>,</span>
                                                                <?php } ?>
                                                            <?php } ?>

                                                            <?php $first = false; ?>
                                                        <?php else: ?>

                                                            <?php if (empty($make->imglogo)) { ?>
                                                                <img src="http://via.placeholder.com/890x600?text=No Preview"/>
                                                                <span><?php echo $make->name; ?>,</span>
                                                            <?php } else { ?>
                                                                <img src="<?php echo SITE_URL . "upload/make/" . $make->imglogo; ?>" style="<?php echo($make->namehidden ? 'max-height: 80px !important;':'');?>"/>
                                                                <?php if ($make->namehidden) { ?>
                                                                    <span>,</span>
                                                                <?php } else { ?>
                                                                    <span><?php echo $make->name; ?>,</span>
                                                                <?php } ?>
                                                            <?php } ?>

                                                        <?php endif; ?>
                                                    <?php }// enfor each ?>

                                                <?php } ?>
                                            </div>
                                        </div>
                                    </div>
                                    <script>
                                        // $('.modelIdForAJAX').on('load', function (e, index) {
                                        //     var sub = $(".modelIdForAJAX").eq(index).data("selector");
                                        //     // sub = sub.replace('.','');
                                        //     alert(sub);
                                        // });
                                    </script>
                                    <div class="col-md-4 col-sm-6 col-xs-6 pad_lr_5">
                                        <div>
                                            <h5 style="color: #fff; margin-bottom: 0px;">Model</h5>
                                            <?php //foreach ($makes as $make) {  ?>
                                            <div class="counter_container counter_subcontainers" style="display:block;">
                                                <?php $orderby = ($make->name == 'ABARTH') ? 'idmodel' : 'name'; ?>
                                                <?php $query = $connection->prepare("SELECT * FROM  `make` WHERE `status`=1 ORDER BY `{$orderby}` ASC Limit 1"); ?>
                                                <?php $query->execute(); ?>
                                                <?php $makes = $query->fetch(PDO::FETCH_OBJ);
                                                ?>
                                                <?php $query = $connection->prepare("SELECT * FROM `model` WHERE `idmake`={$makes->idmake} ORDER BY `name` ASC"); ?>
                                                <?php if ($query ->execute() AND $query->rowCount()) { ?>
                                                    <img src="<?php echo SITE_URL; ?>images/placeholder_any.png"/> <span>&nbsp;,</span>
                                                    <?php foreach ($query->fetchAll(PDO::FETCH_OBJ) as $model) { ?>
                                                        <?php if (empty($model->imgfeatured)) { ?>
                                                            <img src="http://via.placeholder.com/890x600?text=No+Preview"/> <span>,</span>
                                                        <?php } else { ?>
                                                            <img src="<?php echo SITE_URL; ?>upload/model/<?php echo $model->imgfeatured; ?>" /> <span class="custome" ><?php echo $model->name; ?>,</span>
                                                        <?php } ?>
                                                    <?php } ?>
                                                <?php } ?>
                                                <img src="<?php echo SITE_URL; ?>images/placeholder_other.png"/> <span style="display:none;">other,</span>
                                                <!-- hare -->
                                            </div>
                                            <?php //} ?>
                                        </div>
                                    </div>
                                    <div class="col-md-4 col-sm-12 col-xs-12 pad_lr_5">
                                        <div class="row">
                                            <div class="form-group">
                                                <div class="col-md-12 col-xs-12">
                                                    <label>Mileage</label>
                                                </div>
                                                <div class="col-md-6 col-xs-6">
                                                    <input type="text" value="" maxlength="100" class="form-control margin_xs_0" name="minmile" placeholder="Min">
                                                </div>
                                                <div class="col-md-6 col-xs-6">
                                                    <input type="text" value="" maxlength="100" class="form-control margin_xs_0" name="maxmile" placeholder="Max">
                                                </div>
                                                <div class="col-md-12 col-xs-12">
                                                    <label>Price</label>
                                                </div>
                                                <div class="col-md-6 col-xs-6">
                                                    <input type="text" value="" maxlength="100" class="form-control margin_xs_0" name="minprice" placeholder="Min">
                                                </div>
                                                <div class="col-md-6 col-xs-6">
                                                    <input type="text" value="" maxlength="100" class="form-control margin_xs_0" name="maxprice" placeholder="Max">
                                                </div>
                                                <div class="col-md-12 col-xs-12">
                                                    <label>Min and Max Year</label>
                                                </div>
                                                <div class="col-md-6 col-xs-6">
                                                    <select name="minyear" class="form-control year_dd margin_xs_0">
                                                        <option value="">Any</option>
                                                        <?php for ($y=1970; $y<=date('Y'); $y++) { ?>
                                                            <option value="<?php echo $y; ?>" <?php echo ($_get->minyear==$y) ? 'selected' : ''; ?>><?php echo $y; ?></option>
                                                        <?php } ?>
                                                    </select>
                                                </div>

                                                <div class="col-md-6 col-xs-6">
                                                    <!-- <label>Min Year</label> -->
                                                    <select name="maxyear" class="form-control year_dd margin_xs_0">
                                                        <option value="">Any</option>
                                                        <?php for ($y=1970; $y<=date('Y'); $y++) { ?>
                                                            <option value="<?php echo $y; ?>" <?php echo ($_get->maxyear==$y) ? 'selected' : ''; ?>><?php echo $y; ?></option>
                                                        <?php } ?>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="search_field">
                                            <div class="button-main btn-search" onclick="document.getElementById('form-slot-search').submit()">
                                                <div class="button-inside">
                                                    <h1>Search</h1>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="chevron_wrapper_up">
                                            <a href="javascript:void(0)" class="chevron_up_search"><i class="fa fa-chevron-up"></i></a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php } ?>
                    </div> <!-- END oF ROW -->
            </div>
            </form>
        </div>
    </div>
    <div class="spacer-20"></div>
    <div class="container">

        <?php $query = $connection->prepare("SELECT * FROM `vehicle` WHERE `status`=1 AND `idregion`={$_SESSION['geolocation']->idregion}  ORDER BY `idvehicle` DESC LIMIT 12"); ?>
        <?php $query->execute(); ?>
        <?php if ($query->rowCount()) { ?>
            <div class="spacer-20"></div>
            <!-- Recently Listed Vehicles -->
            <section class="listing-block recent-vehicles">
                <!-- <div class="listing-header"> -->
                <div class="listing-header">
                    <a href="<?php echo SITE_URL; ?>listing.php" class="btn btn-sm btn-default pull-right">All vehicle</a>
                    <h3>Recently Viewed Vehicles</h3>
                </div>
                <div class="listing-container">
                    <div class="carousel-wrapper">
                        <div class="row">
                            <ul class="owl-carousel carousel-fw" id="vehicle-slider" data-columns="4" data-autoplay="" data-pagination="yes" data-arrows="no" data-single-item="no" data-items-desktop="4" data-items-desktop-small="3" data-items-tablet="2" data-items-mobile="1">
                                <style>
                                    .media-box {
                                        width: 245px;
                                        height: 138px;
                                    }
                                </style>
                                <?php foreach ($query->fetchAll(PDO::FETCH_OBJ) as $result) { ?>
                                    <?php $query = $connection->prepare("SELECT * FROM `vehicle` WHERE `idvehicle`={$result->idvehicle}"); ?>
                                    <?php $query ->execute(); ?>
                                    <?php if ($query->rowCount()) { $vehicle = $query->fetch(PDO::FETCH_OBJ); ?>
                                        <li class="item">
                                            <div class="vehicle-block format-standard">
                                                <a href="<?php echo SITE_URL; ?>listing-detail.php?id=<?php echo $vehicle->idvehicle; ?>" class="media-box">
                                                    <?php $query = $connection->prepare("SELECT * FROM `media` WHERE `idvehicle`={$vehicle->idvehicle} AND `type`='image' LIMIT 1"); ?>
                                                    <?php $query ->execute(); ?>
                                                    <?php  if(!empty($result->featureimage)) :?>
                                                        <img sdf src="<?php echo SITE_URL; ?>upload/vehicle/<?php echo $result->featureimage; ?>" alt="<?php echo $vehicle->title; ?> inner">

                                                    <?php else: ?>
                                                        <?php if ($query->rowCount()) { ?>
                                                            <img src="<?php echo SITE_URL; ?>upload/vehicle/<?php echo $query->fetch(PDO::FETCH_OBJ)->source; ?>" alt="<?php echo $vehicle->title; ?> outer">
                                                        <?php } else { ?>
                                                            <img src="http://via.placeholder.com/245x138?text=No+Preview" alt="<?php echo $vehicle->title; ?> outer">
                                                        <?php }?>

                                                    <?php endif;?>
                                                </a>
                                                <div class="vehicle-block-content">
                                                    <span class="label label-default vehicle-age"><?php echo $vehicle->year; ?></span>
                                                    <?php if ($vehicle->istoptilli) { ?>
                                                        <span class="label label-success premium-listing">Premium Listing</span>
                                                    <?php } ?>
                                                    <h5 class="vehicle-title"><a href="<?php echo SITE_URL; ?>listing-detail.php?id=<?php echo $vehicle->idvehicle; ?>"><?php echo $vehicle->title; ?></a></h5>
                                                    <span class="vehicle-meta"><?php echo ucwords(get_make($vehicle->idmake)); ?>, <?php echo ucwords(get_model($vehicle->idmodel)); ?>
                                                        <?php $query = $connection->prepare("SELECT * FROM `user` WHERE `iduser`={$vehicle->iduser}"); ?>
                                                        <?php $query ->execute(); ?>
                                                        <?php if ($query->rowCount()) { $user = $query->fetch(PDO::FETCH_OBJ); ?>
                                                            <br>by <abbr class="user-type" title="<?php echo ucwords($user->fname).' '.ucwords($user->lname); ?>"><?php echo ucwords($user->fname).' '.ucwords($user->lname); ?></abbr>
                                                        <?php } ?>
                                                    </span>
                                                    <?php $query = $connection->prepare("SELECT * FROM `bodytype` WHERE `idbodytype`={$vehicle->idbodytype}"); ?>
                                                    <?php $query ->execute(); ?>
                                                    <?php if ($query->rowCount()) { $bodytype = $query->fetch(PDO::FETCH_OBJ); ?>
                                                        <a href="#" title="View all <?php echo $bodytype->name; ?>" class="vehicle-body-type"><img src="<?php echo SITE_URL;?>upload/bodytype/<?php echo $bodytype->imglogo; ?>" width="30" alt=""></a>
                                                    <?php } ?>
                                                    <span class="vehicle-cost"><?php echo number_format($vehicle->price); ?> <?php echo strtoupper($vehicle->currency); ?></span>
                                                </div>
                                            </div>
                                        </li>
                                    <?php } else {
                                        continue;
                                    }?>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </section>

        <?php } ?>
        <!-- djksh -->
        <?php $query = $connection->prepare("SELECT DISTINCT(`idvehicle`) FROM `view` ORDER BY `idview` DESC LIMIT 12"); ?>
        <?php $query ->execute(); ?>
        <?php if ($query->rowCount()) { ?>
            <div class="spacer-20"></div>
            <!-- Recently Listed Vehicles -->
            <section class="listing-block recent-vehicles">
                <!-- <div class="listing-header"> -->
                <div class="listing-header">
                    <a href="<?php echo SITE_URL; ?>listing.php" class="btn btn-sm btn-default pull-right">All vehicle</a>
                    <h3>Recently Viewed Vehicles</h3>
                </div>
                <div class="listing-container">
                    <div class="carousel-wrapper">
                        <div class="row">
                            <ul class="owl-carousel carousel-fw" id="vehicle-slider" data-columns="4" data-autoplay="" data-pagination="yes" data-arrows="no" data-single-item="no" data-items-desktop="4" data-items-desktop-small="3" data-items-tablet="2" data-items-mobile="1">
                                <style>
                                    .media-box {
                                        width: 245px;
                                        height: 138px;
                                    }
                                </style>
                                <?php foreach ($query->fetchAll(PDO::FETCH_OBJ) as $result) { ?>
                                    <?php $query = $connection->prepare("SELECT * FROM `vehicle` WHERE `idvehicle`={$result->idvehicle}"); ?>
                                    <?php $query ->execute(); ?>
                                    <?php if ($query->rowCount()) { $vehicle = $query->fetch(PDO::FETCH_OBJ); ?>
                                        <li class="item">
                                            <div class="vehicle-block format-standard">
                                                <a href="<?php echo SITE_URL; ?>listing-detail.php?id=<?php echo $vehicle->idvehicle; ?>" class="media-box">
                                                    <?php $query = $connection->prepare("SELECT * FROM `media` WHERE `idvehicle`={$vehicle->idvehicle} AND `type`='image' LIMIT 1"); ?>
                                                    <?php $query ->execute(); ?>
                                                    <?php  if(!empty($result->featureimage)) :?>
                                                        <img sdf src="<?php echo SITE_URL; ?>upload/vehicle/<?php echo $result->featureimage; ?>" alt="<?php echo $vehicle->title; ?> inner">

                                                    <?php else: ?>
                                                        <?php if ($query->rowCount()) { ?>
                                                            <img src="<?php echo SITE_URL; ?>upload/vehicle/<?php echo $query->fetch(PDO::FETCH_OBJ)->source; ?>" alt="<?php echo $vehicle->title; ?> outer">
                                                        <?php } else { ?>
                                                            <img src="http://via.placeholder.com/245x138?text=No+Preview" alt="<?php echo $vehicle->title; ?> outer">
                                                        <?php }?>

                                                    <?php endif;?>
                                                </a>
                                                <div class="vehicle-block-content">
                                                    <span class="label label-default vehicle-age"><?php echo $vehicle->year; ?></span>
                                                    <?php if ($vehicle->istoptilli) { ?>
                                                        <span class="label label-success premium-listing">Premium Listing</span>
                                                    <?php } ?>
                                                    <h5 class="vehicle-title"><a href="<?php echo SITE_URL; ?>listing-detail.php?id=<?php echo $vehicle->idvehicle; ?>"><?php echo $vehicle->title; ?></a></h5>
                                                    <span class="vehicle-meta"><?php echo ucwords(get_make($vehicle->idmake)); ?>, <?php echo ucwords(get_model($vehicle->idmodel)); ?>
                                                        <?php $query = $connection->prepare("SELECT * FROM `user` WHERE `iduser`={$vehicle->iduser}"); ?>
                                                        <?php $query ->execute(); ?>
                                                        <?php if ($query->rowCount()) { $user = $query->fetch(PDO::FETCH_OBJ); ?>
                                                            <br>by <abbr class="user-type" title="<?php echo ucwords($user->fname).' '.ucwords($user->lname); ?>"><?php echo ucwords($user->fname).' '.ucwords($user->lname); ?></abbr>
                                                        <?php } ?>
                                                    </span>
                                                    <?php $query = $connection->prepare("SELECT * FROM `bodytype` WHERE `idbodytype`={$vehicle->idbodytype}"); ?>
                                                    <?php $query ->execute(); ?>
                                                    <?php if ($query->rowCount()) { $bodytype = $query->fetch(PDO::FETCH_OBJ); ?>
                                                        <a href="#" title="View all <?php echo $bodytype->name; ?>" class="vehicle-body-type"><img src="<?php echo SITE_URL;?>upload/bodytype/<?php echo $bodytype->imglogo; ?>" width="30" alt=""></a>
                                                    <?php } ?>
                                                    <span class="vehicle-cost"><?php echo number_format($vehicle->price); ?> <?php echo strtoupper($vehicle->currency); ?></span>
                                                </div>
                                            </div>
                                        </li>
                                    <?php } else {
                                        continue;
                                    }?>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </section>

        <?php } ?>
        <div class="spacer-60"></div>
        <div class="row">
            <div class="col-md-8 col-sm-6">
                <?php $query = $connection->prepare("SELECT * FROM `blog` WHERE `status`=1 AND `idregion`={$_SESSION['geolocation']->idregion} OR `idregion`=0   ORDER BY `idblog` DESC LIMIT 6"); ?>
                <?php $query->execute(); ?>
                <?php if ($query->rowCount()) : ?>

                    <section class="listing-block latest-news">
                        <div class="listing-header">
                            <a href="<?php echo SITE_URL; ?>blog.php" class="btn btn-sm btn-default pull-right">All news</a>
                            <h3>Latest Oktilli News</h3>
                        </div>
                        <div class="listing-container">
                            <div class="carousel-wrapper">
                                <div class="row">
                                    <ul class="owl-carousel" id="news-slider" data-columns="2" data-autoplay=""
                                        data-pagination="yes" data-arrows="yes" data-single-item="no"
                                        data-items-desktop="2" data-items-desktop-small="1" data-items-tablet="2"
                                        data-items-mobile="1">
                                        <?php foreach ($query->fetchAll(PDO::FETCH_OBJ) as $blog) : ?>
                                            <li class="item">
                                                <div class="post-block format-standard">
                                                    <a href="blog-detail.php?idblog=<?php echo $blog->idblog; ?>" class="media-box post-image">
                                                        <img style="height: 112px !important;width: 245px !important;" src="<?php echo SITE_URL; ?>upload/blog/<?php echo $blog->imgfeatured; ?>"
                                                             alt="<?php echo $blog->title; ?>">
                                                    </a>
                                                    <div class="post-actions">
                                                        <?php ?>
                                                        <div class="post-date"><?php echo date("F j, Y", strtotime($blog->dtcreated)); ?></div>
                                                        <div class="comment-count"><a href="#"><i
                                                                ></i></a>
                                                        </div>
                                                    </div>
                                                    <h3 class="post-title"><a href="blog-detail.php?idblog=<?php echo $blog->idblog; ?>"><?php echo $blog->title; ?></a>
                                                    </h3>
                                                    <div class="post-content">
                                                        <p><?php echo $blog->excerpt; ?></p>
                                                    </div>
                                                    <div class="post-meta">
                                                        Posted in: <a
                                                            href="#"><?php echo get_blog_category($blog->idtaxonomy); ?></a>
                                                    </div>
                                                </div>
                                            </li>
                                        <?php endforeach; ?>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </section>
                <?php endif; ?>
                <div class="spacer-40"></div>
                <?php $query = $connection->prepare("SELECT * FROM `testimonial` WHERE `status`=1 ORDER BY `idtestimonial` DESC LIMIT 3"); ?>
                <?php $query->execute(); ?>
                <?php if ($query->rowCount()) : ?>
                    <section class="listing-block latest-testimonials">
                        <div class="listing-header">
                            <h3>Testimonials</h3>
                        </div>
                        <div class="listing-container">
                            <div class="carousel-wrapper">
                                <div class="row">
                                    <ul class="owl-carousel carousel-fw" id="testimonials-slider" data-columns="2"
                                        data-autoplay="5000" data-pagination="no" data-arrows="no" data-single-item="no"
                                        data-items-desktop="2" data-items-desktop-small="1" data-items-tablet="1"
                                        data-items-mobile="1">
                                        <?php foreach ($query->fetchAll(PDO::FETCH_OBJ) as $testimonial) : ?>
                                            <li class="item">
                                                <div class="testimonial-block">
                                                    <blockquote>
                                                        <p><?php echo $testimonial->content; ?></p>
                                                    </blockquote>
                                                    <div class="testimonial-avatar">
                                                        <img src="<?php echo SITE_URL; ?>upload/testimonial/<?php echo $testimonial->thumbnail; ?>"
                                                             alt="<?php echo $testimonial->name; ?>" width="60"
                                                             height="60">
                                                    </div>
                                                    <div class="testimonial-info">
                                                        <div class="testimonial-info-in">
                                                            <strong><?php echo $testimonial->name; ?></strong><span><?php echo $testimonial->title; ?></span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </li>
                                        <?php endforeach; ?>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </section>
                <?php endif; ?>
            </div>
            <!-- Latest Added Vahicle -->
            <div class="col-md-4 col-sm-6 sidebar">

                <div class="spacer-40"></div>
                <section class="connect-with-us widget-block">
                    <h4><i class="fa fa-rss"></i> Connect with us</h4>
                    <form role="form">
                        <label for="NewsletterInput" class="sr-only">Email</label>
                        <input type="email" class="form-control" id="NewsletterInput"
                               placeholder="Subscribe via email">
                        <button type="submit" class="btn btn-sm btn-primary">Subscribe</button>
                        <span class="meta-data">Don't worry, we won't spam you</span>
                    </form>
                    <hr>
                    <h4><i class="fa fa-twitter"></i> Twitter feed</h4>
                    <div class="twitter-widget" data-tweets-count="2"></div>
                </section>
            </div>
        </div>
    </div>
    <?php $query = $connection->prepare("SELECT * FROM `make` WHERE `status`=1 ORDER BY `name` ASC"); ?>
    <?php $query ->execute(); ?>
    <?php if ($query->rowCount()) { ?>
        <div class="spacer-50"></div>
        <div class="lgray-bg make-slider">
            <div class="container">
                <div class="row">
                    <div class="col-md-3 col-sm-4">
                        <h3>Search by make </h3>
                        <a href="#" class="btn btn-default btn-lg">All make &amp; models</a>
                    </div>
                    <div class="col-md-9 col-sm-8">
                        <div class="row">
                            <ul class="owl-carousel" id="make-carousel" data-columns="5" data-autoplay="6000" data-pagination="no" data-arrows="no" data-single-item="no" data-items-desktop="5" data-items-desktop-small="4" data-items-tablet="3" data-items-mobile="3">
                                <?php foreach ($query->fetchAll(PDO::FETCH_OBJ) as $make) { ?>
                                    <li class="item">
                                        <a href="<?php echo SITE_URL; ?>listing.php?make=<?php echo $make->idmake; ?>">
                                            <img src="<?php echo SITE_URL; ?>upload/make/<?php echo $make->imglogo; ?>" alt="<?php echo ucwords($make->name); ?>">
                                        </a>
                                    </li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php } ?>
</div>
</div><!-- .body -->
