<?php echo !defined("GUVENLIK") ? die("Vaoww! Bu ne cesaret?") : null;?><?php
$yorumsettings = $db->prepare("select * from yorum_ayar where id='1'");
$yorumsettings->execute();
$yorumset = $yorumsettings->fetch(PDO::FETCH_ASSOC);
$yorumlimit = $yorumset["yorum_limit"];

?>
<?php
$num = 1;
$yorum_listele = $db->prepare("select * from yorum where durum='1' and dil='$_SESSION[dil]' order by sira asc limit $yorumlimit");
$yorum_listele->execute();
?>
<style>
    .comments-home-main-div{width:<?php if($yorumset[width]==1){?> 90%; <?php }else {?> 100% <?php }?> ; height: auto; overflow: hidden; background-color: #<?php echo $yorumset[back_color] ?>; padding: <?php echo $yorumset[padding] ?>px 0 <?php echo $yorumset[padding] ?>px 0; }

    /* .owl-dots button{outline: none !important;  margin-top: 50px !important;} */

    /* .owl-theme .owl-dots .owl-dot.active span, .owl-theme .owl-dots .owl-dot span {
        width: 15px;    height: 6px;    margin: 5px 4px;    background: rgba(0,0,0,0.2);    display: block;    -webkit-backface-visibility: visible;    transition: all .2s ease;    border-radius: 30px;
    } */
    .comments-home-main-div .owl-dot.active span {   width: 30px !important; background:#<?php echo $ayar[dots_color] ?> !important;}
</style>

<div class="testimonial-section testimonial-bg ptb-100 comments-home-main-div">
    <div class="testimonial-area">
        <div class="container">
            <div class="section-head text-center">
                <h2 class="font-<?php echo $yorumset[font_weight] ?> font-spacing" style="color:#<?php echo $yorumset[baslik_color] ?>"><?php echo $diller['yorum']?></h2>
                <p  style="color:#<?php echo $yorumset[spot_color] ?>; letter-spacing: 0.07em"><?php echo $diller['yorum-aciklamasi']?></p>
            </div>
            <?php if ($yorum_listele->rowCount() > 0 ) { ?>
                <div class="row">
                    <div class="col-lg-12 offset-lg-0 col-md-10 offset-md-1 col-sm-10 offset-sm-1">
                        <div class="row">
                            <div class="col-lg-6 offset-lg-3 col-md-8 offset-md-2">
                                <div class="testimonial-image-slider slider-nav text-center">
                                    <?php foreach ($yorum_listele as $yorum)  {     ?>
                                        <div class="sin-testiImage">
                                            <?php
                                            if($yorum[gorsel]== "no-image") { ?>
                                                <img src="images/comments/yorum.jpg" alt="<?php echo $yorum[isim] ?>">
                                            <?php } else { ?>
                                                <img src="images/comments/<?php echo $yorum[gorsel] ?>" alt="<?php echo $yorum[isim] ?>">
                                            <?php }?>
                                        </div>
                                    <?php } ?>
                                </div>
                            </div>
                        </div> 
                        <div class="testimonial-text-slider slider-for text-center">
                            <?php
                            $yorum_listele->execute(); ?>
                            <?php foreach ($yorum_listele as $yorum)  {     ?>
                                <div class="sin-testiText">
                                    <?php if($yorum[star_rate] == 0){ ?>
                                        <span style="color:#CCC">★</span><span style="color:#000">★</span><span style="color:#000">★</span><span style="color:#000">★</span><span style="color:#000">★</span>
                                    <?php }?>
                                    <?php if($yorum[star_rate] == 1){ ?>
                                        <span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#000">★</span><span style="color:#000">★</span><span style="color:#000">★</span><span style="color:#000">★</span>
                                    <?php }?>
                                    <?php if($yorum[star_rate] == 2){ ?>
                                        <span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#000">★</span><span style="color:#000">★</span><span style="color:#000">★</span>
                                    <?php }?>
                                    <?php if($yorum[star_rate] == 3){ ?>
                                        <span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#000">★</span><span style="color:#000">★</span>
                                    <?php }?>
                                    <?php if($yorum[star_rate] == 4){ ?>
                                        <span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#000">★</span>
                                    <?php }?>
                                    <?php if($yorum[star_rate] == 5){ ?>
                                        <span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span><span style="color:#<?php echo $yorumset[star_color]?>">★</span>
                                    <?php }?>

                                    <h2 style="color:#<?php echo $yorumset[box_isim_color] ?>"><?php echo $yorum[isim] ?></h2>
                                    <span style="color:#<?php echo $yorumset[box_pozisyon_color] ?>"><?php echo $yorum[pozisyon] ?></span>
                                    <p style="color:#<?php echo $yorumset[box_icerik_color] ?>"><?php echo $yorum[icerik] ?></p>
                                </div>
                            <?php } ?>
                        </div>   
                    </div>
                </div>
            <?php } ?>
        </div>
    </div>
</div>