<?php


echo !defined("GUVENLIK") ? exit : NULL;
if (isset($_GET["id"])) {
    $Sorgu = $db->prepare("SELECT * FROM haberler WHERE seo = ? AND dil = ?");
    $Sorgu->execute([$_GET["id"], $_SESSION["k_dil"]]);
    if ($Sorgu->rowCount()) {
        $Sonuc = $Sorgu->fetch(PDO::FETCH_ASSOC);
    } else {
        echo "<meta http-equiv=\"refresh\" content=\"0; url=404.html\">";
    }
} else {
    $Sorgu = $db->prepare("SELECT * FROM haberler WHERE dil = ? ORDER BY id ASC");
    $Sorgu->execute([$_SESSION["k_dil"]]);
    if ($Sorgu->rowCount()) {
        $Sonuc = $Sorgu->fetch(PDO::FETCH_ASSOC);
    } else {
        echo "<meta http-equiv=\"refresh\" content=\"0; url=404.html\">";
    }
}
echo "<section class=\"site-content\">\r\n    <div class=\"page-content\">\r\n        <div class=\"container\">\r\n            <div class=\"row\">\r\n                <div class=\"col-md-12\">\r\n\r\n                    <div class=\"page-block\">\r\n                        <div class=\"block-title\">\r\n                            <h1>";
echo $Sonuc["adi"];
echo "</h1>\r\n                        </div>\r\n                        <div class=\"block-body\">\r\n                            <article><img src=\"";
echo TEMA;
echo "/uploads/haberler/";
echo $Sonuc["resim"];
echo "\" style=\"float:left; max-width: 40%;\">\r\n                                <p>";
echo $Sonuc["aciklama"];
echo "</p>\r\n                            </article>\r\n                            <hr>\r\n                            <div class=\"social\">\r\n                                <ul>\r\n                                    <li><a target=\"_blank\" href=\"https://www.facebook.com/sharer/sharer.php?u=";
echo $uri . $_SERVER["REQUEST_URI"];
echo "\" class=\"facebook\" data-type=\"facebook\"><i class=\"fa fa-facebook\"></i> <span>";
echo $dil["footer_facebook"];
echo "</span> </a></li>\r\n                                    <li><a target=\"_blank\" href=\"https://twitter.com/intent/tweet?url=";
echo $uri . $_SERVER["REQUEST_URI"];
echo "&text=";
echo $title;
echo "\" class=\"twitter\" data-type=\"twitter\"><i class=\"fa fa-twitter\"></i> <span>";
echo $dil["footer_twitter"];
echo "</span> </a></li>\r\n                                </ul>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</section>";

?>