= $ratio1 AND id NOT LIKE $yourid ORDER BY RAND() LIMIT 1"); $anzahlrows = mysql_num_rows($abfrage1); if ($anzahlrows <=0){ echo "
"; mysql_query("UPDATE adtausch SET otherviews=otherviews+1 where id=$yourid"); mysql_query("UPDATE adtausch SET credits=credits+$ratio2 where id=$yourid"); } else { while ($row = mysql_fetch_object($abfrage1)) { echo "id target=_blank>image\" border=0 width=$width height=$height>
"; mysql_query("UPDATE adtausch SET otherviews=otherviews+1 where id=$yourid"); mysql_query("UPDATE adtausch SET credits=credits+$ratio2 where id=$yourid"); mysql_query("UPDATE adtausch SET credits=credits-$ratio1 where id=$row->id"); mysql_query("UPDATE adtausch SET hpviews=hpviews+1 where id=$row->id"); } } } function click ($id, $yourid) { include ("config.php"); if ($id==0) { Header("Location: $yoursite"); } else { $abfrage = mysql_query("SELECT id FROM adtausch WHERE id=$yourid"); $id_rows = mysql_num_rows($abfrage); if ($id_rows <= 0){ echo "Button kann nicht gefunden werden!"; exit; } else { $abfrage2 = mysql_query("SELECT homepage FROM adtausch WHERE id=$id"); list($homepage) = mysql_fetch_row($abfrage2); mysql_query("UPDATE adtausch SET otherclicks=otherclicks+1 WHERE id=$id"); mysql_query("UPDATE adtausch SET hpclicks=hpclicks+1 WHERE id=$yourid"); mysql_query("UPDATE adtausch SET credits=credits+$ratio1 WHERE id=$yourid"); Header("Location: $homepage"); } } } ?>