require_once("../conn.php");
require_once("access.php");
include_once("LeftStyles.php");
require_once("BannersNav.php");
?>
//get the advertiseres list
$q1 = "select * from yellow_agents order by AgentID ";
$r1 = mysql_query($q1) or die(mysql_error());
if(mysql_num_rows($r1) > '0')
{
?>
Name |
Banners |
Clicks |
$col = "white";
while($a1 = mysql_fetch_array($r1))
{
if($col == "white")
{
$col = "#dddddd";
}
else
{
$col = "white";
}
//get the banners
$q2 = "select BannerID from yellow_banners where ClientID = '$a1[AgentID]' ";
$r2 = mysql_query($q2) or die(mysql_error());
$banners = mysql_num_rows($r2);
$a2 = mysql_fetch_array($r2);
if($banners > '0')
{
$mybanners = implode("', '", $a2);
$mystr = "'$mybanners'";
//get the clicks
$q3 = "select count(*) from yellow_stats where BannerID in ($mystr) ";
$r3 = mysql_query($q3) or die(mysql_error());
$a3 = mysql_fetch_array($r3);
$clicks = $a3[0];
}
else
{
$clicks = '0';
}
echo "\n\t$a1[FirstName] $a1[LastName] | \n\t$banners | \n\t$clicks | \n
\n\n";
}
echo "
\n\n
";
}
?>