<table border=0 cellspacing=0 cellpadding=0 width="780" class="tblist mt10">
<?php QUnit_Templates::printFilter2(1,L_G_IMPRESSIONS.' '.L_G_SORTEDBYUNIQUE,'','header'); ?>
<tr>
  <td height=150 valign=bottom width="100%" align="center">
  <table border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td align=center valign=top>
    <?php echo $this->a_impstop_graph?>
    </td><td align=center valign=top>
    <?php echo $this->a_impstopunique_graph?>
    </td>
  </tr><tr>
    <td align=center valign=middle bgcolor="#FFFFFF"><?php echo L_G_ALL?></td>
    <td align=center valign=middle bgcolor="#FFFFFF"><?php echo L_G_UNIQUE?></td>
  </tr>
  </table>
  </td>
</tr>
<tr>
  <td align=center bgcolor="#FFFFFF">

  <table class=tblist border=0 cellspacing=0 cellpadding=1 width="100%" align=center>
    <tr class="header">
        <td width="10%" class=listheaderLineTop></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_CAMPAIGN?></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_IMPRESSIONS?> <?php echo '('.L_G_ALL.' / '.L_G_UNIQUE.')'?></td>
    </tr>
  <?php foreach($this->a_impstop_data as $k => $data) {
        if($data['campaignid'] == '0' && $data['all'] == 0) continue; // skip empty others
  ?>
        <tr class="listrow<?php echo ($k++)%2?>">
            <td class=listresultnocenter align=center valign=middle><table border=0 cellspacing=0 cellpadding=0><tr><td width=10 height=10 bgcolor="#<?php echo $this->a_seriesColor[count($this->a_impstop_data)-$k]?>"><img src="<?php echo  $this->a_this->getImage('blank.gif') ?>" border="0" width="1px"></td></tr></table></td>
            <td class=listresultnocenter align=left>
                <?php  if($data['campaignid'] != '' && $data['campaignid'] != '0') {
                        showQuickDetails("index_popup2.php?md=Affiliate_Merchants_Views_CampaignManager&action=campdetails&cid=".$data['campaignid'], 300);
                    }
                ?>
                <font color="#0000ff"><?php echo $data['name'].'('.$data['campaignid'].')'; ?></font>
            </td>
            <td class=listresultnocenter align=right><?php echo $data['all']?>/<?php echo $data['unique']?></td>
        </tr>
  <?php }
     if(count($this->a_impstop_data) <= 1 && $this->a_impstop_data[0]['campaignid'] == 0) {
?>
        <tr class="listrow2">
            <td class=listresultnocenter colspan=3 align=center>
            <?php echo L_G_NODATA?>
            </td>
        </tr>
<?php
     }
  ?>
  </table>

  </td>
</tr>
</table>

<?php if($this->a_cpmSupported) { ?>
<table border=0 cellspacing=0 cellpadding=0 width="780" class="tblist mt10">
<?php QUnit_Templates::printFilter2(1,L_G_MILIONIMPRESSIONS.' '.L_G_CPMCOMMISSIONTRANSACTIONS,'','header'); ?>
<tr>
  <td height="150" align="center" valign="bottom">
  <?php echo $this->a_cpmtop_graph?>
  </td>
</tr>
<tr>
  <td align=center bgcolor="#FFFFFF">

  <table class="tblist" border=0 cellspacing=0 cellpadding=1 width="100%" align=center>
    <tr class="header">
        <td width="10%" class=listheaderLineTop></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_CAMPAIGN?></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_CPMCOMMISSIONTRANSACTIONS?></td>
    </tr>
  <?php foreach($this->a_cmptop_data as $k => $data) {
        if($data['campaignid'] == '0' && $data['count'] == 0) continue; // skip empty others
  ?>

        <tr class="listrow<?php echo ($k++)%2?>">
            <td class=listresultnocenter align=center valign=middle><table border=0 cellspacing=0 cellpadding=0><tr><td width=10 height=10 bgcolor="#<?php echo $this->a_seriesColor[count($this->a_clickstop_data)-$k]?>"><img src="<?php echo  $this->a_this->getImage('blank.gif') ?>" border="0" width="1px"></td></tr></table></td>
            <td class=listresultnocenter align=left>
                <?php  if($data['campaignid'] != '' && $data['campaignid'] != '0') {
                        showQuickDetails("index_popup2.php?md=Affiliate_Merchants_Views_CampaignManager&action=campdetails&cid=".$data['campaignid'], 300);
                    }
                ?>
                <font color="#0000ff"><?php echo $data['name'].'('.$data['campaignid'].')'; ?></font>
            </td>
            <td class=listresultnocenter align=right><?php echo $data['count']?></td>
        </tr>
  <?php }
     if(count($this->a_cmptop_data) <= 1 && $this->a_cmptop_data[0]['campaignid'] == 0) {
?>
        <tr class="listrow2">
            <td class=listresultnocenter colspan=3 align=center>
            <?php echo L_G_NODATA?>
            </td>
        </tr>
<?php
     }
  ?>
  </table>

  </td>
</tr>
</table>
<?php } ?>


<?php if($this->a_clickSupported) { ?>
<table border=0 cellspacing=0 cellpadding=0 width="780" class="tblist mt10">
<?php QUnit_Templates::printFilter2(1,L_G_CLICKS,'','header'); ?>
<tr>
  <td height="150" align="center" valign="bottom">
  <?php echo $this->a_clickstop_graph?>
  </td>
</tr>
<tr>
  <td align=center bgcolor="#FFFFFF">

  <table class=tblist border=0 cellspacing=0 cellpadding=1 width="100%" align=center>
    <tr class="header">
        <td width="10%" class=listheaderLineTop></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_CAMPAIGN?></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_CLICKS?></td>
    </tr>
  <?php foreach($this->a_clickstop_data as $k => $data) {
        if($data['campaignid'] == '0' && $data['count'] == 0) continue; // skip empty others
  ?>

        <tr class="listrow<?php echo ($k++)%2?>">
            <td class=listresultnocenter align=center valign=middle><table border=0 cellspacing=0 cellpadding=0><tr><td width=10 height=10 bgcolor="#<?php echo $this->a_seriesColor[count($this->a_clickstop_data)-$k]?>"><img src="<?php echo  $this->a_this->getImage('blank.gif') ?>" border="0" width="1px"></td></tr></table></td>
            <td class=listresultnocenter align=left>
                <?php  if($data['campaignid'] != '' && $data['campaignid'] != '0') {
                        showQuickDetails("index_popup2.php?md=Affiliate_Merchants_Views_CampaignManager&action=campdetails&cid=".$data['campaignid'], 300);
                    }
                ?>
                <font color="#0000ff"><?php echo $data['name'].'('.$data['campaignid'].')'; ?></font>
            </td>
            <td class=listresultnocenter align=right><?php echo $data['count']?></td>
        </tr>
  <?php }
     if(count($this->a_clickstop_data) <= 1 && $this->a_clickstop_data[0]['campaignid'] == 0) {
?>
        <tr class="listrow2">
            <td class=listresultnocenter colspan=3 align=center>
            <?php echo L_G_NODATA?>
            </td>
        </tr>
<?php
     }
  ?>
  </table>

  </td>
</tr>
</table>
<?php } ?>

<?php if($this->a_saleSupported) { ?>
<table border=0 cellspacing=0 cellpadding=0 width="780" class="tblist mt10">
<?php QUnit_Templates::printFilter2(1,L_G_SALES,'','header'); ?>
<tr>
  <td height="150" align="center" valign="bottom">
  <?php echo $this->a_salestop_graph?>
  </td>
</tr>
<tr>
  <td align=center bgcolor="#FFFFFF">

  <table class="tblist" border=0 cellspacing=0 cellpadding=1 width="100%" align=center>
    <tr class="header">
        <td width="10%" class=listheaderLineTop></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_CAMPAIGN?></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_SALES?></td>
    </tr>
  <?php foreach($this->a_salestop_data as $k => $data) {
        if($data['campaignid'] == '0' && $data['count'] == 0) continue; // skip empty others
  ?>

        <tr class="listrow<?php echo ($k++)%2?>">
            <td class=listresultnocenter align=center valign=middle>
            <table border=0 cellspacing=0 cellpadding=0><tr><td width=10 height=10 bgcolor="#<?php echo $this->a_seriesColor[count($this->a_salestop_data)-$k]?>"><img src="<?php echo  $this->a_this->getImage('blank.gif') ?>" border="0" width="1px"></td></tr></table></td>
            <td class=listresultnocenter align=left>
                <?php  if($data['campaignid'] != '' && $data['campaignid'] != '0') {
                        showQuickDetails("index_popup2.php?md=Affiliate_Merchants_Views_CampaignManager&action=campdetails&cid=".$data['campaignid'], 300);
                    }
                ?>
                <font color="#0000ff"><?php echo $data['name'].'('.$data['campaignid'].')'; ?></font>
            </td>
            <td class=listresultnocenter align=right><?php echo $data['count']?></td>
        </tr>
  <?php }
     if(count($this->a_salestop_data) <= 1 && $this->a_salestop_data[0]['campaignid'] == 0) {
?>
        <tr class="listrow2">
            <td class=listresultnocenter colspan=3 align=center>
            <?php echo L_G_NODATA?>
            </td>
        </tr>
<?php
     }
  ?>
  </table>

  </td>
</tr>
</table>
<?php } ?>

<?php if($this->a_leadSupported) { ?>
<table border=0 cellspacing=0 cellpadding=0 width="780" class="tblist mt10">
<?php QUnit_Templates::printFilter2(1,L_G_LEADS,'','header'); ?>
<tr>
  <td height="150" align="center" valign="bottom">
  <?php echo $this->a_leadstop_graph?>
  </td>
</tr>
<tr>
  <td align=center bgcolor="#FFFFFF">

  <table class="tblist" border=0 cellspacing=0 cellpadding=1 width="100%" align=center>
    <tr class="header">
        <td width="10%" class=listheaderLineTop></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_CAMPAIGN?></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_LEADS?></td>
    </tr>
  <?php foreach($this->a_leadstop_data as $k => $data) {
        if($data['campaignid'] == '0' && $data['count'] == 0) continue; // skip empty others
  ?>

        <tr class="listrow<?php echo ($k++)%2?>">
            <td class=listresultnocenter align=center valign=middle><table border=0 cellspacing=0 cellpadding=0><tr><td width=10 height=10 bgcolor="#<?php echo $this->a_seriesColor[count($this->a_leadstop_data)-$k]?>"><img src="<?php echo  $this->a_this->getImage('blank.gif') ?>" border="0" width="1px"></td></tr></table></td>
            <td class=listresultnocenter align=left>
                    <font color="#0000ff"><?php echo $data['campaignid'].': '.$data['name']?></font>
                    <?php  if($data['campaignid'] != '' && $data['campaignid'] != '0') {
                            showQuickDetails("index_popup2.php?md=Affiliate_Merchants_Views_CampaignManager&action=campdetails&cid=".$data['campaignid'], 300);
                        }
                    ?>
            </td>
            <td class=listresultnocenter align=right><?php echo $data['count']?></td>
        </tr>
  <?php }
     if(count($this->a_leadstop_data) <= 1 && $this->a_leadstop_data[0]['campaignid'] == 0) {
?>
        <tr class="listrow2">
            <td class=listresultnocenter colspan=3 align=center>
            <?php echo L_G_NODATA?>
            </td>
        </tr>
<?php
     }
  ?>
  </table>

  </td>
</tr>
</table>
<?php } ?>

<table border=0 cellspacing=0 cellpadding=0 width="780" class="tblist mt10">
<?php QUnit_Templates::printFilter2(1,L_G_REVENUES.' '.L_G_IN.' '.$this->a_Auth->getSetting('Aff_system_currency'),'','header'); ?>
<tr>
  <td height="150" align="center" valign="bottom">
  <?php echo $this->a_revenuetop_graph?>
  </td>
</tr>
<tr>
  <td align=center bgcolor="#FFFFFF">

  <table class="tblist" border=0 cellspacing=0 cellpadding=1 width="100%" align=center>
    <tr class="header">
        <td width="10%" class=listheaderLineTop></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_CAMPAIGN?></td>
        <td width="45%" class=listheaderLineTop><?php echo L_G_REVENUES?></td>
    </tr>
  <?php foreach($this->a_revenuetop_data as $k => $data) {
        if($data['campaignid'] == '0' && $data['sum'] == 0) continue; // skip empty others
  ?>

        <tr class="listrow<?php echo ($k++)%2?>">
            <td class=listresultnocenter align=center valign=middle><table border=0 cellspacing=0 cellpadding=0><tr><td width=10 height=10 bgcolor="#<?php echo $this->a_seriesColor[count($this->a_revenuetop_data)-$k]?>"><img src="<?php echo  $this->a_this->getImage('blank.gif') ?>" border="0" width="1px"></td></tr></table></td>
            <td class=listresultnocenter align=left>
                <?php  if($data['campaignid'] != '' && $data['campaignid'] != '0') {
                        showQuickDetails("index_popup2.php?md=Affiliate_Merchants_Views_CampaignManager&action=campdetails&cid=".$data['campaignid'], 300);
                    }
                ?>
                <font color="#0000ff"><?php echo $data['name'].'('.$data['campaignid'].')'; ?></font>
            </td>
            <td class=listresultnocenter align=right><?php echo Affiliate_Merchants_Bl_Settings::showCurrency($data['sum'])?></td>
        </tr>
  <?php }
     if(count($this->a_revenuetop_data) <= 1 && $this->a_revenuetop_data[0]['campaignid'] == 0) {
?>
        <tr class="listrow2">
            <td class=listresultnocenter colspan=3 align=center>
            <?php echo L_G_NODATA?>
            </td>
        </tr>
<?php
     }
  ?>
  </table>

  </td>
</tr>
</table>