/******************************************************************************* + APPLICATION NAME : Meliksah's Click Counter + +------------------------------------------------------------------------------+ + APPLICATION VERSION : 0.02.04.08.2002 + +------------------------------------------------------------------------------+ + APPLICATION DESCRIPTION : Meliksah's Click Counter is a PHP/MYSQL driven + + link click counter script. + + + +------------------------------------------------------------------------------+ + FILE NAME : ccount.php + +------------------------------------------------------------------------------+ + FILE VERSION : 0.02.04.08.2002 + +------------------------------------------------------------------------------+ + FILE DESCRIPTION : Count Clicks + + + + + +------------------------------------------------------------------------------+ + WEB PAGE : http://www.meliksah.com + +------------------------------------------------------------------------------+ + E-MAIL : software@meliksah.com + +------------------------------------------------------------------------------+ + (C)opyright 2002 Meliksah Ozoral * + All Rights Reserved * + + + Meliksah Ozoral as free distributes this software. It may be used for your + + own use as long as this copyright note remains and link to www.meliksah.com + + You may NOT sell or distribute the code of this software in whole or part. + + This Software is provided "AS IS", without warranty of any kind, express or + + implied. In no event shall the author or copyright holder be liable for + + any claim, damages or other liability, whether in an action of contract or + + otherwise. Arising from, out of or in connection with the software or the + + use or other dealings in the software. + + + *******************************************************************************/ require("config.php"); require("connect.php"); if ($P != "") { if (is_numeric($P)) { $pageget=mysql_query("SELECT * FROM $db_table_clicks WHERE no=$P"); if (mysql_affected_rows() != 0) { $pagerow = mysql_fetch_array($pageget); if ($meliksahcc != "") { $pagenow = "|".$pagerow["no"]."|"; $pos = strpos($meliksahcc, $pagenow); if ($pos === false) { $NEUN = $pagerow["unique"]+1; mysql_query("UPDATE `$db_table_clicks` SET `unique` = '$NEUN' WHERE no=$P"); $meliksahcc.="|$P|"; setcookie("meliksahcc",$meliksahcc,time()+3600); } else { mysql_query("UPDATE $db_table_clicks SET raw=raw+1 WHERE no=$P"); } } else { $NEUN = $pagerow["unique"]+1; mysql_query("UPDATE `$db_table_clicks` SET `unique` = '$NEUN' WHERE no=$P"); $meliksahcc.="|$P|"; setcookie("meliksahcc",$meliksahcc,time()+3600); } header ("Location: ".$pagerow["pageurl"]); } } } ?>