<?php 
use Source\Helpers\Check;

?>
<div class="static-area mb-4 ">
    <?php
$x = 0;
$indicators = '';
$slide_item = ''; 
$Read->ExeRead(DB_SLIDE, "WHERE slide_status=1 ORDER BY slide_order LIMIT :limit", "limit=" . SLIDE_LIMIT);
if ($Read->getResult()):

    foreach ($Read->getResult() as $value):
        extract($value);
        $img = Check::CheckPhoto($value['slide_image'], DIR_UPLOADS, true, 1200, 300);
        $thumb_mobile = Check::CheckPhoto($value['slide_image_mobile'], DIR_UPLOADS, false, 800, 600);
        $ativo = ($x == 0 ? 'active' : "");
        $style = 'style="background-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), rgba(0, 0, 0, .75))"';
        $indicators .= "<li data-target='#carouselExampleIndicators' data-slide-to='{$x}' class='{$ativo}'> </li>";
        $slide_item .= "<div class='carousel-item $ativo'><a target='_blank' href='{$slide_link}' class='slidelink' data-target='{$slide_link}' title='{$slide_title}'><img class='is-mobile img-fluid w-100 mx-auto rounded ' src='" . $thumb_mobile . "'><img class='is-desktop img-fluid w-100 mx-auto rounded ' src='" . $img . "'> <div class='carousel-caption d-md-block' >&nbsp;</a></div></div>";
        $x++;
    endforeach;
endif;
?> 


<div class="carousel-box">
    <div id="carouselExampleIndicators" class="carousel slide carousel-fade " data-ride="carousel">
        <ol class="carousel-indicators"><?= $indicators ?>  </ol>
        <div class="carousel-inner" <?= $style ?>>
            <?= $slide_item ?>                     
        </div> 
    </div>
</div> 
</div> 
<?php  
require REQUIRE_PATH."/comp-area-detalhes.php" ?>
<?php  require "dist/rozer/comp/comp-banner-2.php" ?>
<?php  require "dist/ecommerce/comp/comp-ofertas.php" ?>
<?php require "dist/ecommerce/comp/comp-destaque.php" ?>
<?php  require "dist/ecommerce/comp/comp-banner-3.php" ?>
<?php require "dist/ecommerce/comp/comp-departamento.php" ?>
<?php require "dist/ecommerce/comp/comp-banner-2.php" ?> 
<?php  require "dist/ecommerce/comp/comp-parceiros.php" ?>
<?php require "dist/ecommerce/comp/comp-novos.php" ?>

<!-- Category Tab Area end -->