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


$queryexclude = "SELECT h.* FROM hheaderads h WHERE	h.userid != '$userid' AND h.approved = 1 AND h.max > h.clicks AND h.id NOT IN (SELECT hheaderadid FROM hheaderadclicks 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 Header Ads</font><br><br>";
echo "<font size=3 color=RED>Click The Links Below To Earn&nbsp;";

if ($memtype=="SUPER JV")
{
$earn = $superjvhheaderadearn;
}
if ($memtype=="JV Member")
{
$earn = $jvhheaderadearn;
}
if (($memtype!="SUPER JV") and ($memtype!="JV Member"))
{
$earn = $prohheaderadearn;
}	

echo "$earn Points For Each Click</font><br><br>\n";
echo "<table align=\"center\" width=\"880\" cellpadding=5 cellspacing=0 bgcolor=\"#FFFFFF\" border=1>";
while($info = mysql_fetch_array($sql))
{
$id = $info['id'];
$banner = $info['banner'];
$bgcolor = $info['bgcolor'];
$heading = $info['heading'];
$headingfontcolor = $info['headingfontcolor'];
$description = $info['description'];
$descriptionfontcolor = $info['descriptionfontcolor'];
mysql_query("update hheaderads set views=views+1 where id=\"$id\"");
?>
<tr>
<td width=480 bgcolor="<?php echo $bgcolor ?>" align="center"><a target="_blank" href="./hheaderadclicks1.php?id=<?php echo $id ?>">
<img src="<?php echo $banner ?>" border="0"></a></td>
<td bgcolor="<?php echo $bgcolor ?>"><font color="<?php echo $headingfontcolor ?>"><b><a style="color:<?php echo $headingfontcolor ?>" target="_blank" href="./hheaderadclicks1.php?id=<?php echo $id ?>"><?php echo $heading ?></a></b><br><font color="<?php echo $descriptionfontcolor ?>"><?php echo $description ?></font></td>
</tr>
<?php

}
echo "</table><br><br>";
}
?>