given in /home/*******/public_html/in.php on line 105
Warning: Cannot modify header information - headers already sent by (output started at /home/*******/public_html/in.php:105) in /home/********/public_html/in.php on line 121
Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/in.php:105) in /home/****
if ($anti_cheating && $status=="OK") { // anti-cheating
$votetimestamp=time()-($vote_timeout*3600);
$sql = "SELECT * FROM votes WHERE id='$site' AND timestamp>'$votetimestamp' AND ip='$ipaddr' AND status='OK'";
$query = mysql_db_query($database, $sql) or die(geterrdesc($sql));
$votesresult = mysql_fetch_array($query);
$sql = "SELECT id FROM votes WHERE id='$site' AND timestamp>'$tilttimestamp' AND status='OK'";
$query = mysql_db_query($database, $sql) or die(geterrdesc($sql));
$tiltresultok = mysql_num_rows($query);
if ($tiltresultok>=$tilt_insp_maxvotesok) {
$status="TILT";
}
$sql = "SELECT id FROM votes WHERE id='$site' AND timestamp>'$tilttimestamp' AND status='NOK'";
$query = mysql_db_query($database, $sql) or die(geterrdesc($sql));
$tiltresultnok = mysql_num_rows($query);
if ($tiltresultnok>=$tilt_insp_maxvotesnok) {
$status="TILT";
}
if ($status=="TILT") { // ban this site for $tilt_insp_timeout
$sql = "SELECT * FROM sites WHERE id='$site' ";
$query = mysql_db_query($database, $sql) or die(geterrdesc($sql));
$result = mysql_fetch_array($query);
$tilt_time=time()+($tilt_insp_timeout*60);
$sql = "UPDATE sites SET tilt_time='$tilt_time' WHERE id='$site'";
mysql_db_query($database, $sql) or die(geterrdesc($sql));
if ($result[tilt_time]<($tilt_time-(2*$tilt_insp_timeout*60))) { // check if this is a new tilt
if ($tilt_insp_adminnotify) { // send notification to admin
mail_tiltuser($result);
}
if ($tilt_insp_sitenotify) { // send notification to site-admin
mail_tiltadmin($result);
}
}
}
}
if ($show_rating && $gateway && $vote && $rating && $rating<=10) {
if ($status=="OK") {
$newrating=round((($result[votes]*$result[rating])+$rating)/($result[votes]+1)*10)/10;
$sql = "UPDATE sites SET votes=votes+1,rating='$newrating' WHERE id='$site'";
mysql_db_query($database, $sql) or die(geterrdesc($sql));
}
$sql = "INSERT INTO votes VALUES ('$site','$ipaddr','".time()."','$referer','$status')";
mysql_db_query($database, $sql) or die(geterrdesc($sql));
} elseif ($status=="OK") {
if ($status=="OK") {
$sql = "UPDATE sites SET votes=votes+1 WHERE id='$site'";
mysql_db_query($database, $sql) or die(geterrdesc($sql));
}
$sql = "INSERT INTO votes VALUES ('$site','$ipaddr','".time()."','$HTTP_REFERER','$status')";
mysql_db_query($database, $sql) or die(geterrdesc($sql));
}
if ($votelog_timeout>0) { // delete old votelogs
if ($votelog_timeout<$vote_timeout) {$votelog_timeout=$vote_timeout;}
$deletetimestamp=time()-($votelog_timeout*3600);
$sql = "DELETE FROM votes WHERE timestamp<'$deletetimestamp'";
mysql_db_query($database, $sql) or die(geterrdesc($sql));
}
} else { // ERROR - Site not found
header("location: $list_url/list.php?status=NF$catlink");
}
} else { // ERROR - NO SiteId
header("location: $list_url/list.php?status=NF$catlink");
}
mysql_close();
?>
and these important lines in config.php
$cookievotesonly = true; // enable ONLY votes with cookie-enabled browsers !!! (ture) or not (false)
// $gateway MUST true, for this function !!!
$cookiepath ="/"; // enter your listpro-url-path (eg. "/listpro/") here or "/" for hole domain
$exiturl = ""; // if you want an popup-window on exit, enter url here. "" is disabled
$outexiturl[0] = ""; // if you want an additional (advertising) exitwindow on outclick,
// enter url here. enter "SELFLINK" to open VoteGateway, "" is disabled.
$outexiturl[1] = ""; // possible url-array for random outexiturl generation
$outexiturl[2] = ""; // add as many you want ...
$outexiturl[3] = "";
Ok, there is 150 strings of code. I am not compiller to take a look on code and say "Hay, error is here", sorry.
And I could not run it on my server to see where is error too.
So, may be you could provide us with URL of your script? May be it could help us help you
I read through the code a few times and I didn't find any obvious errors (I'm sure the code was tested extensively before release anyway) so the next thing was compatibility.
I noticed there were two instances of $HTTP_COOKIE_VARS which have been deprecated in newer versions of PHP, I am not sure if this would cause output but as a suggestion, if your PHP is greater than PHP 4.1 then change those two instances to $_COOKIE and see if that makes any difference.