<?php
echo "<font size=3 face='$fonttype' color='$fontcolour'><center>";
echo "<font size=6>View Hot Headline Ads</font><br>";
echo "<font size=1>(Members cannot see thier own Hot Headline Ads)</font><br><br>";

$queryexclude = "SELECT h.* FROM hheadlineads h WHERE h.userid != '$userid' AND h.approved = 1 AND h.max > h.clicks AND h.id NOT IN (SELECT hheadlineadid FROM hheadlineadclicks WHERE userid = '$userid') ORDER BY RAND()";

$sql = mysql_query($queryexclude);
if(@mysql_num_rows($sql))
{
echo "<font size=3 face='$fonttype' color='$fontcolour'><center>";
//echo "<p><font size=6>View Hot Headline Ads</font><br><br>";
echo "<font size=3 color=RED>Click The Links Below To Earn&nbsp;";

if ($memtype=="SUPER JV")
{
	$earn = $superjvhheadlineadearn;
}
if ($memtype=="JV Member")
{
	$earn = $jvhheadlineadearn;
}
if (($memtype!="SUPER JV") and ($memtype!="JV Member"))
{
	$earn = $prohheadlineadearn;
}	

echo "$earn Points For Each Click</font><br><br>\n";
echo "<table cellpadding=5 width=\"700\" align=\"center\" bordercolor=#000000 border=1><tr>";

while($info = mysql_fetch_array($sql))
{
	if($count==4)
	{
		echo "</tr><tr>";
		$count=0;
	}

	$count++;
	mysql_query("update hheadlineads set views=views+1 where id='".$info['id']."'");

	if($info['bold'])
		echo "<td bgcolor=\"".$info['bgcolor']."\" align=center><a href=\"./hheadlineclicks1.php?id=".$info['id']."\" target=\"_blank\"><font color=\"".$info['color']."\"><b>".$info['title']."</b></font></a></td>";
	else
		echo "<td bgcolor=\"".$info['bgcolor']."\" align=center><a href=\"./hheadlineclicks1.php?id=".$info['id']."\" target=\"_blank\"><font color=\"".$info['color']."\">".$info['title']."</font></a></td>";
}
echo "</tr></table><br><br>";
}
?>