require("include/top.php");
$query ="SELECT * FROM prods ";
$query.="WHERE id=".$which;
$result = mysql_query($query);
$prod = mysql_fetch_array($result);
$currentip=getenv("REMOTE_ADDR");
$referer=getenv("HTTP_REFERER");
if(basename($referer)=="prod.php?which=".$which && $prod["downloads_ip"]!=$currentip)
{
mysql_query("UPDATE prods SET downloads=downloads+1,downloads_ip='".$currentip."' WHERE id=".$prod["id"]);
}
$prod["download"] = str_replace("%2F","/",$prod["download"]);
?>
require("include/bottom.php"); ?>