<?php echo !defined("GUVENLIK") ? die("Vaoww! Bu ne cesaret?") : null;?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-117170495-2"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-117170495-2');
</script>

<?php
$footersettings = $db->prepare("select * from footer_ayar where id='1'");
$footersettings->execute();
$footset = $footersettings->fetch(PDO::FETCH_ASSOC);

$footer_about_text = $db->prepare("select * from about_page where dil='$_SESSION[dil]' ");
$footer_about_text->execute();
$about = $footer_about_text->fetch(PDO::FETCH_ASSOC);

$footer_social_links = $db->prepare("select * from sosyal order by sira asc ");
$footer_social_links->execute();

$footer_links_0 = $db->prepare("select * from footer_menu where yer='0' and durum='1' and dil='$_SESSION[dil]' order by sira asc ");
$footer_links_0->execute();

$footer_links_1 = $db->prepare("select * from footer_menu where yer='1' and durum='1' and dil='$_SESSION[dil]' order by sira asc ");
$footer_links_1->execute();
?>
<style>
    .footer-main-div{width:<?php if($footset[width]==1){?> 90%; <?php }else {?> 100% <?php }?> ; height: auto; overflow: hidden; }
</style>
<footer class="footer-area footer-main-div" >
    <?php if($footset[tip] == 0) { ?>
    <div class="container">
        <div class="row">
            <div class="col-lg-3 col-md-6">
                <div class="footer-widget">
                    <div class="logo">
                        <img src="images/logo/<?php echo $ayar[site_footer_logo] ?>" alt="<?php echo $ayar[site_baslik] ?>">
                    </div>
                    <?php if($about[spot] == null) {} else { ?>
                    <p><?php echo $about[spot] ?></p>
                    <?php } ?>
                </div>
            </div>

            <div class="col-lg-3 col-md-6">
                <div class="footer-widget pl-40">
                    <h3>
                        <?php echo $diller['kurumsal'] ?>
                    </h3>
                    <ul>
                    <?php foreach ($footer_links_0 as $flink0) { ?>
                        <li>
                            <i class="icofont-simple-right"></i>
                            <a href="<?php echo $flink0[url] ?>"><?php echo $flink0[baslik] ?></a>
                        </li>
                    <?php } ?>
                    </ul>
                </div>
            </div>

            <div class="col-lg-3 col-md-6">
                <div class="footer-widget pl-40">
                    <h3>
                       <?php echo $diller['baglantilar'] ?>
                    </h3>
                    <ul>
                    <?php foreach ($footer_links_1 as $flink1) { ?>
                        <li>
                            <i class="icofont-simple-right"></i>
                            <a href="<?php echo $flink1[url] ?>"><?php echo $flink1[baslik] ?></a>
                        </li>
                    <?php }?>
                    </ul>
                </div>
            </div>

            <div class="col-lg-3 col-md-6">
                <div class="footer-widget">
                    <h3> <?php echo $diller['calisma-saatleri'] ?></h3>
                    <ul class="find-us">
                        <?php if($ayar[site_workhour] == null) {} else { ?>
                            <li>
                                <?php echo $ayar[site_workhour] ?>
                            </li>
                        <?php } ?>
                        <?php if($ayar[adres_bilgisi] == null) {} else { ?>
                            <li>                                   
                                <i class="fa fa-globe"></i> <?php echo $ayar[adres_bilgisi] ?>
                            </li>
                        <?php } ?>
                        <?php if($ayar[site_tel] == null) {} else { ?>
                            <li>
                                <i class="fa fa-phone"></i>
                                <a href="tel:<?=$telsonuc?>">
                                    <?php echo $ayar[site_tel] ?>
                                </a>
                            </li>
                        <?php } ?>
                        <?php if($ayar[site_gsm] == null) {} else { ?>
                            <li>
                                <i class="fa fa-mobile"></i>
                                <a href="tel:<?=$gsmsonuc?>">
                                    <?php echo $ayar[site_gsm] ?>
                                </a>
                            </li>
                        <?php } ?>
                        <?php if($ayar[site_whatsapp] == null) {} else { ?>
                            <li>
                                <i class="fa fa-whatsapp"></i>
                                <a href="https://api.whatsapp.com/send?phone=<?=$whtsonuc2?>&text=Merhaba&source=&data=" target="_blank">
                                    <?php echo $whtsonuc1 ?>
                                </a>
                            </li>
                        <?php } ?>

                        <?php if($ayar[site_mail] == null) {} else { ?>
                            <li>
                                <i class="fa fa-envelope-o" style="margin-top: 1px"></i> <?php echo $ayar[site_mail] ?>
                            </li>
                        <?php } ?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="bottom-footer">
        <div class="container">
            <div class="row  align-items-center">
                <div class="col-lg-4">
                    <div class="footer-social">
                        <ul>
                            <?php foreach ($footer_social_links as $soc) { ?>
                                <li>
                                    <a href="<?php echo $soc[url] ?>" target="_blank"><i class="fa <?php echo $soc[icon] ?>" data-toggle="tooltip" data-placement="bottom" title="<?php echo $soc[baslik] ?>"></i></a>
                                </li>
                            <?php }?>
                        </ul>
                    </div>
                </div>
                <div class="col-lg-8">
                    <div class="copyright-text text-right">
                        <p><?php echo $ayar[copyright_1] ?></p>
                        <p style="font-size: 10px"><?php echo $ayar[copyright_2] ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php } ?>
    <?php if($footset[tip] == 1) { ?>
    <?php } ?>
</footer>