<?php echo !defined("GUVENLIK") ? die("Vaoww! Bu ne cesaret?") : null;?>
<?php
$sosyalmedya_cek=$db->prepare("select * from sosyal order by sira asc");
$sosyalmedya_cek->execute();
?>
<title><?php echo $diller['iletisim-title'] ?> | <?php echo $ayar[site_baslik]?></title>
<meta name="description" content="<?php echo"$ayar[site_desc]" ?>">
<meta name="keywords" content="<?php echo"$ayar[site_tags]" ?>">
<meta name="news_keywords" content="<?php echo"$ayar[site_tags]" ?>">
<meta name="author" content="<?php echo"$ayar[site_baslik]" ?>" />
<meta itemprop="author" content="<?php echo"$ayar[site_baslik]" ?>" />
<meta name="robots" content="index follow">
<meta name="googlebot" content="index follow">
<meta property="og:type" content="website" />
<?php include "includes/config/header_libs.php";?>
<style>
.form-control {
border-radius: 0;
height:  calc(2em + .75rem + 2px);
}
.sc-card{
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: -o-flex;
display: flex;
-ms-align-items: center;
align-items: center;
justify-content: center;
}
.sc-card a{
width: 100%;
}
.sc-card i{
font-size: 16px !important;
}
.sc-card i:after{
width: 30px !important;
height: 30px !important;
left: calc(50% - 16px) !important;
top: calc(50% - 16px) !important;
}
</style>
</head>
<body>
<?php include 'includes/template/pre-loader.php'?>
<?php include 'includes/template/header.php'?>
<!-- CONTENT AREA ============== !-->
<div class="contact-section contact-style-two pt-100">
    <div class="container">
        <div class="contact-area">
            <div class="row align-items-center">
                <div class="col-lg-12">
                    <div class="section-head">
                        <h2><?php echo $diller['iletisime-gec']?></h2>
                    </div>
                    <div class="contact-form">
                        <form method="post" action="includes/post/contactpost.php">
                            <div class="row">
                                <div class="form-group col-md-4 ">
                                    <label for="inputnName"><?=$diller['iletisim-isim']?></label>
                                    <input type="text" name="isim" class="form-control" id="inputnName"  required >
                                </div>
                                <div class="form-group col-md-4">
                                    <label for="inputDate"><?=$diller['iletisim-mail']?></label>
                                    <input type="email" name="eposta" class="form-control"  id="inputDate" required  placeholder="">
                                </div>
                                <div class="form-group col-md-4">
                                    <label for="inputKonu"><?=$diller['iletisim-telno']?></label>
                                    <input type="number" name="telno" class="form-control"  id="inputKonu"  required placeholder="">
                                </div>
                                <div class="form-group col-md-12">
                                    <label for="textareaEgitim"><?=$diller['iletisim-mesaj']?></label>
                                    <textarea class="form-control" id="textareaEgitim"   name="mesaj"  required style="height: 100px!important;"></textarea>
                                </div>
                                <?php
                                if($ayar[site_captcha] == 1)
                                {
                                ?>
                                <?php $kod=$_SESSION['secure_code'];?>
                                <div class="col-lg-12 form-group">
                                    <label for="inputCaptcha"><?=$diller['guvenlik-kodu']?></label>
                                    <div class="input-group mb-2 mr-sm-2">
                                        <div class="input-group-prepend">
                                            <div class="input-group-text"><img src='includes/template/captcha.php'/></div>
                                        </div>
                                        <input type="text" class="form-control form-captcha-height" id="inputCaptcha"  required name="secure_code" maxlength="5" >
                                    </div>
                                </div>
                                <?php }?>
                                <div class="col-lg-12 col-md-12">
                                    <button type="submit" name="contactgonder" class="default-btn page-btn"><?=$diller['iletisim-button-gonder']?></button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Contact Section End -->
<!-- Contact Info Section Start -->
<div class="contact-info">
    <div class="container">
        <div class="row contact-card-area">
            <?php if($ayar[site_tel] ==! null){?>
            <div class="col-md-4 col-sm-6">
                <div class="contact-card">
                    <i class="icofont-phone"></i>
                    <h3>Telefon</h3>
                    <p><?=$ayar[site_tel]?></p>
                </div>
            </div>
            <?php } ?>
            <?php if($ayar[site_gsm] ==! null){?>
            <div class="col-md-4 col-sm-6">
                <div class="contact-card">
                    <i class="icofont-phone"></i>
                    <h3>GSM</h3>
                    <p><?=$ayar[site_gsm]?></p>
                </div>
            </div>
            <?php } ?>
            <?php if($ayar[site_whatsapp] ==! null){?>
            <div class="col-md-4 col-sm-6">
                <div class="contact-card">
                    <i class="icofont-phone"></i>
                    <h3>Whatsapp</h3>
                    <p><?=$ayar[site_whatsapp]?></p>
                </div>
            </div>
            <?php } ?>
            <?php if($ayar[site_mail] ==! null){?>
            <div class="col-md-4 col-sm-6">
                <div class="contact-card">
                    <i class="icofont-ui-message"></i>
                    <h3>E-Posta</h3>
                    <p><?=$ayar[site_mail]?></p>
                </div>
            </div>
            <?php } ?>
            <?php if($ayar[adres_bilgisi] ==! null){?>
            <div class="col-md-4 col-sm-6">
                <div class="contact-card">
                    <i class="icofont-location-pin"></i>
                    <h3>Adres</h3>
                    <p><?=$ayar[adres_bilgisi]?></p>
                </div>
            </div>
            <?php } ?>
            <?php if($ayar[site_workhour] == !null){?>
            <div class="col-md-4 col-sm-6">
                <div class="contact-card">
                    <i class="fa fa-clock-o"></i>
                    <h3><?php echo $diller['calisma-saatleri'] ?></h3>
                    <p>
                        <?=$ayar[site_workhour]?>
                    </p>
                </div>
            </div>
            <?php } ?>
            <?php if($sosyalmedya_cek->rowCount() > 0) {?>
            <div class="col-md-4 offset-4">
                <div class="contact-card sc-card">
                    <?php foreach ($sosyalmedya_cek as $sosyal) {?>
                    <a href="<?=$sosyal[url]?>" target="_blank"><i class="fa <?=$sosyal[icon]?>" data-toggle="tooltip" data-placement="bottom" title="<?=$sosyal['baslik']?>"></i></a>
                    <?php } ?>
                </div>
            </div>
            <?php } ?>
        </div>
    </div>
</div>
<?php if ($ayar['site_maps_kodu'] == !null) {?>
<div class="map">
    <div class="container-fluid p-0">
        <?=$ayar[site_maps_kodu]?>
    </div>
</div>
<?php } ?>
<?php if($_GET[status]=='success'){ ?>
<script>
$(document).ready(function () {
swal({
title: "<?=$diller['post-basarili']?>",
text: "<?=$diller['post-iletisim-basarili-aciklamasi']?>",
type: "success",
timer: '3500',
showConfirmButton: true,
confirmButtonText:"<?=$diller['button-tamam']?>",
});
});
</script>
<meta http-equiv="refresh" content="3; URL=index.html">
<?php }?>
<?php if($_GET[status]=='warning'){ ?>
<script>
$(document).ready(function () {
swal({
title: "<?=$diller['post-hata']?>",
text: "<?=$diller['post-guvenlik-kod-hata']?>",
type: "warning",
showConfirmButton: true,
confirmButtonText:"<?=$diller['button-tamam']?>",
});
});
</script>
<?php }?>
<?php if($_GET[status]=='critical'){ ?>
<script>
$(document).ready(function () {
swal({
title: "KRİTİK HATA!",
text: "SMTP Ayarlarınız hatalı! Başvuru sisteme girildi ancak bildirim gönderilemedi.",
type: "warning",
timer: '3500',
showConfirmButton: true,
confirmButtonText:"<?=$diller['button-tamam']?>",
});
});
</script>
<meta http-equiv="refresh" content="3; URL=index.html">
<?php }?>
<?php if(isset($_SESSION['contact_array']) && $_SESSION['contact_array']['status'] == 'error'){ ?>
<script>
$(document).ready(function () {
swal({
title: "<?=$diller['post-hata']?>",
text: "<?=$diller['form-eksik-alan']?>",
type: "warning",
timer: '3500',
showConfirmButton: true,
confirmButtonText:"<?=$diller['button-tamam']?>",
});
});
</script>
<meta http-equiv="refresh" content="3; URL=iletisim">
<?php unset($_SESSION['contact_array']); ?>
<?php }?>
<?php include 'includes/template/footer.php'?>
</body>
</html>
<?php include "includes/config/footer_libs.php";?>