![]() |
![]() |
![]() |
:: Genel bilgiler |
|
|
|
|
|
|
|
|
|
|
|
|
:: Online Dersler |
|
|
|
|
|
|
|
| |
|
| |
|
|
![]() |
|
| |
" ;
// echo $iip ." " ;
// echo " self ". $_SERVER['PHP_SELF']. " " ;
$sql = "SELECT * from iptable WHERE itarih='$tarih' and iip='$ip'";
$sorgu=mysql_db_query($database,$sql);
$satir= mysql_num_rows($sorgu);
if ($satir > 0):
$sql = "SELECT * from hittable WHERE tarih='$tarih' and sayfa_adi='$sayfa_adi'";
$sorgu=mysql_db_query($database,$sql);
$satir= mysql_num_rows($sorgu);
if ($satir >0):
$cogul = mysql_result($sorgu,0,"cogul") + 1;
$sqlupdate = mysql_db_query($database,"UPDATE hittable SET cogul = $cogul
WHERE tarih='$tarih' and sayfa_adi ='$sayfa_adi'");
else:
$tekil=1;
$cogul=1;
$sql="INSERT into hittable(tarih,ip,sayfa_adi,tekil,cogul) VALUES('$tarih','$ip','$sayfa_adi',$tekil,$cogul)"; //ilk kayıt
@mysql_db_query($database,$sql);
endif;
else:
$sql="INSERT into iptable(itarih,iip) VALUES('$tarih','$ip')"; // bu ip bugun ilk geliyorsa dosyaya ekle
@mysql_db_query($database,$sql);
$sql = "SELECT * from hittable WHERE tarih='$tarih' and sayfa_adi='$sayfa_adi'"; // daha once bu sayfaya girilmiş mi
$sorgu=mysql_db_query($database,$sql);
$satir= mysql_num_rows($sorgu);
if ($satir >0 ):
$tekil = mysql_result($sorgu,0,"tekil") + 1;
$cogul = mysql_result($sorgu,0,"cogul") + 1;
$sqlupdate = mysql_db_query($database,"UPDATE hittable SET tekil=$tekil , cogul=$cogul
WHERE tarih='$tarih' and sayfa_adi ='$sayfa_adi'");
else:
$tekil=1;
$cogul=1;
$sql="INSERT into hittable(tarih,ip,sayfa_adi,tekil,cogul) VALUES('$tarih','$ip','$sayfa_adi',$tekil,$cogul)"; //ilk kayıt
@mysql_db_query($database,$sql);
endif;
endif;
//mysql_close($db);
// ********************** HİT COUNTER STOP ******************************
?>
|
|
|
|