<?php echo !defined("GUVENLIK") ? die("Vaoww! Bu ne cesaret?") : null;?>
<?php
$page_header_setting = $db->prepare("select * from page_header where page_id='proje' order by id");
$page_header_setting->execute();
$pagehead = $page_header_setting->fetch(PDO::FETCH_ASSOC);
?>
<?php
$pro_id = $_GET['pro_id'];
$projects = $db->prepare("select * from proje where id=:id and durum=:durum and dil=:dil");
$projects->execute(array(
        'id' => $pro_id,
        'durum' => '1',
    'dil' => $_SESSION['dil']
));
$proje = $projects->fetch(PDO::FETCH_ASSOC);
$etiketler = $proje['tags'];
$etiketler = explode(',', $etiketler);

$proje_kat = $db->prepare("select * from proje_kat where id=:id and durum=:durum and dil=:dil");
$proje_kat->execute(array(
        'id' => $proje['kat_id'],
    'durum' => '1',
    'dil' => $_SESSION['dil']
));
$kat = $proje_kat->fetch(PDO::FETCH_ASSOC);

$proje_galeri = $db->prepare("select * from proje_resim where proje_id=:proje_id order by sira asc");
$proje_galeri->execute(array(
        'proje_id' => $proje['id']
));
?>
<?php
if($projects->rowCount() == 0)
{
    header('Location:'.$siteurl.'');

    exit;

}
?>
<title><?php echo ucwords_tr($proje['baslik']) ?> | <?php echo $ayar[site_baslik]?></title>
<meta name="description" content="<?php echo"$proje[meta_desc]" ?>">
<meta name="keywords" content="<?php echo"$proje[tags]" ?>">
<meta name="news_keywords" content="<?php echo"$proje[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";?>

</head>
<body>
<?php include 'includes/template/pre-loader.php'?>
<?php include 'includes/template/header.php'?>


<!-- Page Header ====================== !-->
<style>
    .page-headers-main{width:<?php if($pagehead[width]==1){?> 90%; <?php }else {?> 100% <?php }?> ;  padding:<?php echo $pagehead[padding] ?>px 0 <?php echo $pagehead[padding] ?>px 0 ; border:1px solid #<?php echo $pagehead[border_color] ?>;

        <?php if($pagehead[shadow] == 1 ) {?>

        -webkit-box-shadow: inset 0px 5px 10px -7px rgba(0,0,0,0.1);
        -moz-box-shadow: inset 0px 5px 10px -7px rgba(0,0,0,0.1);
        box-shadow: inset 0px 5px 10px -7px rgba(0,0,0,0.1);

        <?php } ?>

        <?php if($pagehead[tip] == 0 ) {?>

        background:#<?php echo $pagehead[bg_color] ?> ;

        <?php } ?>

        <?php if($pagehead[tip] == 1 ) {?>

        background:url(images/uploads/<?php echo $pagehead[bg_image] ?>) ;

        box-shadow: inset 5000px 0 0 0 rgba(0, 0, 0, 0.7); border-color: rgba(0, 0, 0, 1);

        <?php } ?>

    }
    .product-detail-header-right-social a{
        width: 50px;
        height: 50px;
        justify-content: center;
        -ms-align-items: center;
        align-items: center;
        display: -webkit-inline-flex;
        display: -moz-inline-flex;
        display: -ms-inline-flex;
        display: -o-inline-flex;
        display: inline-flex;
        background: whitesmoke;
        border: 1px solid #00000010;
        border-radius: 10px;
    }
</style>
<div class="page-headers-main page-headers-main about-title about-title-bg">
    <div class="d-table">
        <div class="d-table-cell">
            <div class="container">
                <div class="about-title-text">
                    <h2 style="color:#<?php echo $pagehead[text_color] ?>">
                        <?php echo ucwords_tr($proje['baslik']) ?>
                    </h2>
                    <span style="color:#<?php echo $pagehead[pasif_text_color] ?>; padding-right: 15px;"><?php echo $diller['buradasiniz'] ?>:</span>
                    <ul>
                        <li>
                            <a href="index.html" style="color:#<?php echo $pagehead[text_color] ?> !important;"><span style="padding-right: 15px; font-weight: 600;color:#<?php echo $pagehead[text_color] ?> !important;"><?php echo $diller['anasayfa'] ?></span></a>
                        </li>
                        <li>
                            <i class="icofont-rounded-double-right" style="color:#<?php echo $pagehead[pasif_text_color] ?>; padding-right: 15px;"></i>
                            <span style="padding-right: 15px; color:#<?php echo $pagehead[text_color] ?>;"><?php echo ucwords_tr($proje['baslik']) ?></span>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="service-details-area main-service-area pt-100 services-details-page">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="service-details-post">
                    <strong><?php echo $diller['proje-adi'] ?></strong>
                    <h3>
                        <?=$proje[baslik]?>
                    </h3>
                    <?php if($proje[spot] ==!null){ ?>
                        <p>
                            <?=$proje[spot]?>
                        </p>
                    <?php }?>
                    <?php if($proje[adres] ==!null){ ?>
                        <div class="proje-detail-ust-info-it font-spacing">

                         <i class="fa fa-map-marker"></i>
                         <?=$proje[adres]?>

                     </div>
                 <?php }?>
                 <?php if($proje[kat_id] ==!null){ ?>
                    <div class="proje-detail-ust-info-it font-spacing">

                        <i class="fa fa-hashtag" style="color:dodgerblue; font-size:16px; margin-right: 10px; margin-top: 2px;"></i>
                        <strong><?=$kat[baslik]?></strong>

                    </div>
                <?php }?>
                <?php if($proje[start_date] ==!null){ ?>
                    <div class="proje-detail-ust-info-it font-spacing">

                        <i class="fa fa-calendar-plus-o" style="font-size:17px; margin-top:1px"></i>
                        <strong><?php echo $diller['proje-baslangic'] ?> : </strong> <?php echo date_tr('j F Y', ''.$proje[start_date].''); ?>

                    </div>
                <?php }?>

                <?php if($proje[finish_date] ==!null){ ?>
                    <div class="proje-detail-ust-info-it font-spacing">

                        <i class="fa fa-calendar-check-o" style="font-size:17px; margin-top:1px"></i>
                        <strong><?php echo $diller['proje-bitis'] ?> : </strong> <?php echo date_tr('j F Y', ''.$proje[finish_date].''); ?>

                    </div>
                <?php }?>
                <?php if($proje[url] ==!null){ ?>
                    <a href="<?=$proje[url]?>" class="btn btn-danger" role="button" aria-pressed="true" target="_blank" >
                        <i class="fa fa-link"></i>
                        <?php echo $diller['proje-link'] ?>
                    </a>
                <?php }?>
             <div id="tab-projects" >

                 <ul class='projects_tabs_ul'>


                    <?php if($proje[icerik] ==!null) {?>
                    <li>
                        <a href="#info">
                            <i class="fa fa-info-circle"></i>
                            <?php echo $diller['proje-hakkinda'] ?>
                        </a>
                    </li>
                    <?php }?>

                    <?php if($proje[maps] ==!null) {?>
                    <li>
                        <a href="#map">
                            <i class="fa fa-map-o"></i>
                            <?php echo $diller['proje-ulasim'] ?>
                        </a>
                    </li>
                    <?php }?>

                    <?php if ($proje_galeri->rowCount() >0 ){ ?>
                    <li>
                        <a href="#gallery">
                            <i class="fa fa-camera"></i>
                            <?php echo $diller['proje-galeri'] ?>
                        </a>
                    </li>
                    <?php }?>


                    <?php if($proje[embed] ==!null) {?>
                    <li>
                        <a href="#video">
                            <i class="fa fa-video-camera"></i>
                            <?php echo $diller['proje-videosu'] ?>
                        </a>
                    </li>
                    <?php }?>

                </ul>
                 <div id="info" class="projects_tabs_content" >
                     <?php
                     $icerik  = $proje['icerik'];
                     $eski   = "../images";
                     $yeni   = "images";
                     $icerik = str_replace($eski, $yeni, $icerik);
                     ?>
                     <?=$icerik?>
                 </div>

                 <div id="map" class="projects_tabs_content" >
                     <?=$proje[maps]?>
                 </div>

                <div id="gallery" class="projects_tabs_content"  style="text-align: center" >
                     <div class="product-slider owl-carousel owl-theme">
                        <a data-fancybox href="images/projects/<?=$proje[gorsel]?>"><img src="images/projects/<?=$proje[gorsel]?>" ></a>
                        <?php foreach ($proje_galeri as $galeri) {?>
                            <a data-fancybox href="images/projects/<?=$galeri[gorsel]?>"><img src="images/projects/<?=$galeri[gorsel]?>" ></a>
                        <?php } ?>
                    </div>
                </div>
                <style>
                    #video iframe{
                        height: 100%;
                        width: 100%;
                    }
                </style>
                 <div id="video" class="projects_tabs_content" style="display: flex;justify-content: center;align-items: center;height: 450px">
                     <?=$proje[embed]?>
                 </div>
             </div>
                    <p>
                        
                        <strong><?=$diller['etiketler']?></strong> :
                        <?php
                        foreach( $etiketler as $anahtar => $deger ){ ?>
                            <a alt="<?=$deger?>" title="<?=$deger?>"><div class="product-detail-etiket-box"><?=$deger?></div></a>
                        <?php } ?>
                    </p>
                    <div class="product-detail-header-right-social pb-3">

                        <a style="background: #3b5998;color:white;" href="https://www.facebook.com/sharer.php?u=<?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>" onclick="window.open('https://www.facebook.com/sharer.php?u=<?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>','popup','width=900,height=450');" target="popup" ><i aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="<?=$diller['paylas']?>" class="fa fa-facebook"></i></a>

                        <a style="background: #00acee;color:white;" href="https://twitter.com/intent/tweet?url=<?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>"  onclick="window.open('https://twitter.com/intent/tweet?url=<?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>','popup','width=900,height=450');" target="popup" ><i class="fa fa-twitter" data-toggle="tooltip" data-placement="bottom" title="<?=$diller['paylas']?>"></i></a>

                        <a style="background: #0e76a8;color:white;" href="http://www.linkedin.com/shareArticle?mini=true&url=<?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>"  onclick="window.open('http://www.linkedin.com/shareArticle?mini=true&url=<?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>','popup','width=900,height=450');" target="popup"  ><i class="fa fa-linkedin" data-toggle="tooltip" data-placement="bottom" title="<?=$diller['paylas']?>"></i></a>

                        <a style="background: #c8232c;color:white;" href="https://www.pinterest.com/pin/create/button/?url=<?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>&media=<?=$ayar['site_url']?>images/product/<?=$urun[gorsel]?>&description=<?=$urun[baslik]?>" onclick="window.open('https://www.pinterest.com/pin/create/button/?url=<?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>&media=<?=$ayar['site_url']?>images/product/<?=$urun[gorsel]?>&description=<?=$urun[baslik]?>','popup','width=900,height=450');" target="popup" ><i class="fa fa-pinterest-p" data-toggle="tooltip" data-placement="bottom" title="<?=$diller['paylas']?>"></i></a>

                        <a style="background: #25d366;color:white;" href="https://api.whatsapp.com/send?text=<?=$urun[baslik]?> <?=$ayar[site_url]?>proje/<?=$proje[id]?>/<?=seo($proje[baslik])?>" target="_blank"><i class="fa fa-whatsapp" data-toggle="tooltip" data-placement="bottom" title="<?=$diller['paylas']?>"></i></a>

                    </div>
                    <div id="info" class="products_tabs_contents" >

                        <?php
                        $icerik  = $urun['icerik'];
                        $eski   = "../images";
                        $yeni   = "images";
                        $icerik = str_replace($eski, $yeni, $icerik);
                        ?>
                        <?=$icerik?>

                    </div>

                    <div id="map" class="products_tabs_contents" >

                        <?php
                        $ek_bilgi  = $urun['ek_bilgi'];
                        $eski   = "../images";
                        $yeni   = "images";
                        $ek_bilgi = str_replace($eski, $yeni, $ek_bilgi);
                        ?>
                        <?=$ek_bilgi?>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php include 'includes/template/footer.php'?>
</body>
    </html>
<?php include "includes/config/footer_libs.php";?>

