<script>
function clickBanner(id){
var date = new Date();
date.setDate(date.getDate()+1);
var cookie = id+"=1;expires="+date.toUTCString();
document.cookie = cookie;
}
</script>
<?php
$paytoclick = mysql_query("SELECT * FROM paytoclick");
//INIZIA IL CICLO
while ($row = mysql_fetch_assoc($paytoclick)) {
if(!isset($_COOKIE[$row['id']]))
echo '
<a href="Sppc/visione.php?id=', $row['id'], '" onclick="clickBanner(',$row['id'],')">', '<img src="http://forum.mrwebmaster.it/Admin/script/', $row['linkbanner'],'">', '</img>', '</a>', '<div class="sosos"><div id="sxses">Guadagno:</div>', $row['pagamento'], '</div>', "\n
";
}
?>