<?php

$query=$db->prepare("SELECT * FROM sayfalar where seourl=:seourl");
$query->execute(array(
	'seourl' => route(1)
));
$row=$query->fetch(PDO::FETCH_ASSOC);
$total=$query->rowCount();

$sidebarpages=$db->prepare("SELECT * FROM sayfalar where seourl!=:seourl order by id DESC");
$sidebarpages->execute(array(
	'seourl' => route(1)
));

$title=$row['seo_title'];
$description=$row['seo_description'];
$keywords=$row['seo_keywords'];
 
if ($total>0) {
	require view('sayfa');
} else {
	header('Location:' . site_url('404'));
}