<?php


if (isset($_GET["sayfa"])) {
    $s = $_GET["sayfa"];
    switch ($s) {
        case "anasayfa":
            $title = BASLIK;
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "sayfalar":
            $TITLESorgu = $db->prepare("SELECT * FROM sayfalar WHERE seo = ? ORDER BY id ASC");
            $TITLESorgu->execute([$_GET["id"]]);
            $TITLESonuc = $TITLESorgu->fetch(PDO::FETCH_ASSOC);
            $title = "" . $TITLESonuc["adi"] . "";
            $keywords = "" . $TITLESonuc["keywords"] . "";
            $description = "" . $TITLESonuc["description"] . "";
            $paylasim = "" . TEMA . "/uploads/sayfalar/" . $TITLESonuc["resim"] . "";
            break;
        case "kategori":
            $TITLESorgu = $db->prepare("SELECT * FROM kategori WHERE seo = ?");
            $TITLESorgu->execute([$_GET["id"]]);
            $TITLESonuc = $TITLESorgu->fetch(PDO::FETCH_ASSOC);
            $title = $TITLESonuc["adi"];
            $keywords = SITEKEYW;
            $description = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "arac-detay":
            $TITLESorgu = $db->prepare("SELECT * FROM araclar WHERE seo = ? ORDER BY id ASC");
            $TITLESorgu->execute([$_GET["id"]]);
            $TITLESonuc = $TITLESorgu->fetch(PDO::FETCH_ASSOC);
            $title = "" . $TITLESonuc["adi"] . "";
            $keywords = "" . $TITLESonuc["keywords"] . "";
            $description = "" . $TITLESonuc["description"] . "";
            $paylasim = "" . TEMA . "/uploads/araclar/" . $TITLESonuc["resim"] . "";
            break;
        case "kirala":
            $TITLESorgu = $db->prepare("SELECT * FROM araclar WHERE seo = ? ORDER BY id ASC");
            $TITLESorgu->execute([$_GET["id"]]);
            $TITLESonuc = $TITLESorgu->fetch(PDO::FETCH_ASSOC);
            $title = "" . $TITLESonuc["adi"] . "";
            $keywords = "" . $TITLESonuc["keywords"] . "";
            $description = "" . $TITLESonuc["description"] . "";
            $paylasim = "" . TEMA . "/uploads/araclar/" . $TITLESonuc["resim"] . "";
            break;
        case "haberler":
            $title = $dil["haberler1"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "haber-detay":
            $TITLESorgu = $db->prepare("SELECT * FROM haberler WHERE seo = ?");
            $TITLESorgu->execute([$_GET["id"]]);
            $TITLESonuc = $TITLESorgu->fetch(PDO::FETCH_ASSOC);
            $title = "" . $TITLESonuc["adi"] . "";
            $keywords = "" . $TITLESonuc["keywords"] . "";
            $description = "" . $TITLESonuc["description"] . "";
            $paylasim = "" . TEMA . "/uploads/haberler/" . $TITLESonuc["kapak"] . "";
            break;
        case "transfer":
            $title = $dil["transfer"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "kampanyalar":
            $title = $dil["kampanyalar"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "arac-listesi":
            $title = $dil["arac_listesi"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "tum-arac-listesi":
            $title = $dil["arac_listesi"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "rezervasyon":
            $title = $dil["odeme_islem"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "ara":
            $title = $dil["arama_sonuclari"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "iletisim":
            $title = $dil["iletisim"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        case "404":
            $title = $dil["404_hata_4"];
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            break;
        default:
            $title = BASLIK;
            $description = SITEDESC;
            $keywords = SITEKEYW;
            $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
            $anasayfa = "class=\"active\"";
    }
} else {
    $title = BASLIK;
    $description = SITEDESC;
    $keywords = SITEKEYW;
    $paylasim = "" . TEMA . "/uploads/logo/" . LOGO . "";
    $anasayfa = "class=\"active\"";
}

?>