<?
include "ustkisim.php";
$id = $_GET['id'];
?>
<?
function seo($s) {
$tr = array('ş','Ş','ı','İ','ğ','Ğ','ü','Ü','ö','Ö','Ç','ç','I','http://','www.');
$eng = array('s','S','i','i','g','G','u','U','o','O','C','c','i','','');
$s = str_replace($tr,$eng,$s);
$s=trim($s);
$s = str_replace(' ',"_",$s);
for($i=0;$i <= 5;$i++) {
$s = str_replace("--","-",$s);
}
return strtolower($s);
}
?>
<?
//$haber_al = mysql_query("SELECT * FROM haberler WHERE id = '$id'");
//$kontrol = mysql_num_rows($haber_al);
$haber_al = mysql_query("SELECT count(*) FROM haberler WHERE id = '$id'");
while($row = mysql_fetch_array($haber_al)){
$kontrol = $row[0];
}
mysql_free_result($haber_al);
if ($kontrol > 0){
$haber_al = mysql_query("SELECT * FROM haberler WHERE id = '$id'");
while ($haber = mysql_fetch_array($haber_al)){
mysql_query("update haberler set `hit`=$hit+1 where `id`='$id'");
$hit=$c['hit']+1;
$tarih = $haber["tarih"];
$tarih = date("d/m/Y H:i",$tarih);
echo '
<table width="98%">
<tr><h2><font color=white size=2>'.strip_tags($haber["baslik"]).' ile Ayrintilar</font></h2></td></tr>';
echo '<tr><td><br>'.$haber["icerik"].'<br /><br /><br /><br />';
echo '<div align=right>Okunma: <font color=red>'.$haber["hit"].'</font> Tarih: <i>'.$tarih.'</i></div></td></tr></table>';
} // while bitimi
echo '</table>';
} else { // Haber yoksa
echo '<script> document.location="/haber/"; </script>';
}
include "altkisim.php";
?>